> For the complete documentation index, see [llms.txt](https://ce-docs.keywordrush.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ce-docs.keywordrush.com/ai-agents/connect-claude.md).

# Connect Claude

Claude works on your site directly over the WordPress REST API. Allow your domain in Claude's settings, give it your WordPress login, and point it at your site's agent guide — about two minutes, and it's ready to build.

{% hint style="success" %}
**Using Claude Code?** Skip step 1 — [**Claude Code**](https://www.anthropic.com/claude-code) (Anthropic's terminal tool) already reaches your site. Go straight to step 2.
{% endhint %}

### 1. Allow your site's domain

Claude runs code in a sandbox that can only reach domains you've approved. Your site has to be on that list.

1. In Claude, open **Settings → Capabilities**.
2. Check that **Cloud code execution and file creation** and **Allow network egress** are both on — they normally are. Switch on whichever isn't; the domain list below does nothing without them.
3. Under **Domain allowlist → Additional allowed domains**, type your site's domain and click **Add**.

The **Content Egg → AI Agents** page shows the exact domain to paste, on its **Claude** tab. Use the host your site actually runs on — if that's `www.example.com`, add that rather than the bare version, or add `*.example.com` to cover both.

You can leave the **Domain allowlist** dropdown on its default: whatever it's set to, the domains you add below are allowed on top of it.

<figure><img src="/files/Y3JHX9S9XCL2Tr5V6Mgw" alt=""><figcaption><p>Adding your site's domain in Claude's Settings → Capabilities</p></figcaption></figure>

{% hint style="info" %}
**On a Team or Enterprise plan?** This capability is off by default and controlled by your organization's owner in **Organization settings → Capabilities**. If you can't find the setting, that's why — ask your admin to enable it and allow your domain.
{% endhint %}

### 2. Give Claude your login details

From [**Turning on Agent Access**](/ai-agents/turning-on-agent-access.md) you'll have your WordPress **username** and an **application password**. Paste both into the chat when you start working.

{% hint style="warning" %}
**Anything you type in a chat stays in that conversation.** Use a dedicated WordPress user for Claude rather than your own admin account, and revoke the application password when you're done with it — see [**Where your password ends up**](/ai-agents/safety-and-permissions.md#where-your-password-ends-up).
{% endhint %}

### 3. Give it the guide (don't skip this)

Credentials let Claude *reach* your site; the guide teaches it how to **use** it. Without the guide it tends to build pages with Markdown tables and bare product blocks instead of the right Content Egg blocks.

Copy your **Agent guide** link from the AI Agents page (**Copy link**) and open a chat with something like:

> Read this guide and follow it when working on my site: `https://YOUR-SITE.com/wp-json/content-egg/v1/agent-guide` My WordPress username is `USERNAME` and the application password is `xxxx xxxx xxxx xxxx xxxx xxxx`.

That's the whole setup. Claude reads the guide, learns your site's abilities, and gets to work.

<figure><img src="/files/6JOhH3x65OHvoJJBSq21" alt=""><figcaption><p>Starting a chat with the agent guide link and credentials</p></figcaption></figure>

{% hint style="info" %}
**Doing this often?** Put the guide link and your username into a **Project**'s instructions so every chat in that project starts ready. Think twice before storing the application password there — it's convenient, but it's then saved on every chat in the project.
{% endhint %}

### Test it

Start a chat and try:

> **Using Content Egg, show my active modules and search Amazon for wireless earbuds.**

Claude should list your active modules and come back with a few products and prices.

<figure><img src="/files/odXWyNjphpQTKkWGOagR" alt=""><figcaption><p>Claude listing modules and searching for products</p></figcaption></figure>

If that works, you're connected. See [**Example prompts & workflows**](/ai-agents/prompts-and-workflows.md) for what to ask next.

### Prefer a permanent connection? (advanced)

The setup above asks for your credentials in each new conversation. If you'd rather set them once, Claude Desktop can connect over **MCP** (Model Context Protocol) instead. It's more work up front, and it buys you two things:

* Your application password lives in a config file on your own computer — it never goes into a conversation.
* You get a connector entry in Claude with per-tool permission controls.

You'll need the free **WordPress MCP Adapter** plugin and **Node.js** installed.

1. Download the latest release **`.zip`** from the [MCP Adapter releases page](https://github.com/WordPress/mcp-adapter/releases).
2. In WordPress, go to **Plugins → Add New Plugin → Upload Plugin**, choose the zip, **Install**, then **Activate**. Your **MCP endpoint** now appears on the AI Agents page.
3. In Claude Desktop, open **Settings → Developer → Edit Config** and add a `content-egg` server:

```json
{
  "mcpServers": {
    "content-egg": {
      "command": "npx",
      "args": ["-y", "@automattic/mcp-wordpress-remote@latest"],
      "env": {
        "WP_API_URL": "https://YOUR-SITE.com/wp-json/content-egg/mcp",
        "WP_API_USERNAME": "YOUR_WP_USERNAME",
        "WP_API_PASSWORD": "YOUR_APPLICATION_PASSWORD"
      }
    }
  }
}
```

4. Save and **restart Claude Desktop**. Under **Settings → Connectors** you'll see **content-egg** — click it to set tool permissions.

<figure><img src="/files/KWZyFZP8NoW9EREdNXoe" alt=""><figcaption><p>The content-egg connector in Claude Desktop — set tool permissions here</p></figcaption></figure>

{% hint style="success" %}
You don't have to type this by hand. Once the adapter is active, the **Claude** tab on the AI Agents page gains a **Permanent connection for Claude Desktop (MCP)** section with the whole block ready to copy, pre-filled with your endpoint and username — just drop in your application password. (It isn't there before you install the adapter.)
{% endhint %}

<figure><img src="/files/M1ajezhftuZ5zQJkBSuy" alt=""><figcaption><p>Adding the Content Egg MCP server to Claude Desktop</p></figcaption></figure>

Once connected this way, Claude can call the **`get-guide`** tool to fetch the guide through the MCP channel — no link to paste.

{% hint style="info" %}
MCP in the **browser** is a different story: claude.ai's **Add custom connector** dialog only offers OAuth sign-in, and the MCP Adapter authenticates with an application password. If the beta **Request headers** option appears in your account, you can add the endpoint with an `Authorization: Basic <token>` header — the AI Agents page builds that token for you. Otherwise use the REST setup at the top of this page, which works everywhere.
{% endhint %}

### If something goes wrong

* **"I can't reach that site" / connection errors** — the domain isn't allowed yet, or it's spelled differently than your site (`www.` matters). Recheck step 1.
* **401 errors even though the password is right** — some servers strip the login details before WordPress ever sees them. Ask your host to enable `Authorization` header pass-through; it's a one-line change they'll recognise.
* **Requests blocked or timing out** — a firewall or security plugin may be blocking Claude. Allow the requests, or ask your host to whitelist the REST API.
* **"Unauthorized"** — use the **application password**, not your normal login password, and confirm Agent Access is switched on.
* **It can search but can't build or edit** — building and editing require **Content Egg Pro**.
* **Claude sees no Content Egg tools (MCP setup)** — confirm the MCP Adapter plugin is active, the endpoint shows on your AI Agents page, and you restarted Claude Desktop.
