# Connect your AI client to WordPress through Widejoin

## What is my MCP server address?

Your MCP server address is `https://widejoin.com/mcp`. Create a token in the Widejoin console under Settings, Tokens, then paste the address and token into your AI client. Claude Code takes one paste of two lines. Prefer no console account? Point the client at your own site's plugin route instead.

Widejoin is a WordPress plugin and MCP (Model Context Protocol) server for AI agents.

## What do I need before I connect?

A Widejoin console account with your site connected, and an AI client that speaks MCP. The site needs WordPress 6.9 or later with PHP 8.2 to 8.4, served over HTTPS, with the Widejoin plugin active and a backup from the last 24 hours. It also needs the MCP Adapter plugin 0.7.x from WordPress.org, installed first. On a Hostinger site with Hostinger AI active, the Adapter 0.6.2 copy that Hostinger AI bundles is already there and works too. Widejoin does not support 0.8.0 yet. The [install docs](/docs/) cover the plugin.

## Which AI clients are tested?

Claude Code was tested in the real app. For 15 other named clients, among them Cursor, Codex CLI, VS Code with GitHub Copilot, Windsurf and OpenCode, we ran a test client with the config format each app uses, against a lab gateway; the apps themselves were not run. That test client was a dummy MCP client set up from each app's config format, transport and auth, and it made three calls: initialize, tools/list and one read-only tool call. The custom setup for clients that take a server address and an Authorization header passed the same test client run. A block marked Tested below connected in one of these two ways. GLM, DeepSeek and Kimi models also run inside a host. Six model makers' own coders (ZCode, DeepSeek Harness, Qwen Code, MiniMax Code, Mistral Vibe and Grok Build) follow their vendor's docs and are not verified by us yet. Four clients need a bridge. claude.ai's custom connector and ChatGPT sign in with OAuth. The hosted server offers it, but we have not completed a sign-in from either app yet. Each client's status appears under its name below, in the same words the console uses. The direct Application Password connection further down was tested with the official TypeScript MCP SDK client.

## How do I connect my AI client?

Every client needs the same two things: the endpoint `https://widejoin.com/mcp` and the header `Authorization: Bearer <token>`. Create the token on Settings > Tokens in the console. It is shown once. A site token reaches one site. On paid plans and the Pro trial, the account connection on the same tab reaches every site in your organization, up to your plan's site count.

### Claude Code

1. **Connect the site in the console.** Add your site under Sites in the Widejoin console.
2. **Create a token.** On Settings > Tokens in the console, create a token for Claude Code and copy it. It is shown once. A site token reaches one site, so a second site needs its own token and its own entry, unless you use the account connection, which reaches every site on paid plans and the Pro trial.
3. **Add Widejoin to Claude Code.** Run the two lines below in a terminal. Paste the token when the first line waits for it.

   ```
   read -rs WIDEJOIN_TOKEN
   claude mcp add --transport http widejoin https://widejoin.com/mcp --header "Authorization: Bearer $WIDEJOIN_TOKEN" --scope user
   ```

   The first line reads the token without showing it, so it stays out of your shell history.

   `--scope user` makes Widejoin available in every folder. Without it, Claude Code adds the server to the current project folder only.
4. **Check the connection.** Run `claude mcp list`. The widejoin entry should show as connected.
5. **Ask for a first draft.** Ask Claude Code to list your sites and create a small draft. Claude Code asks you to allow each Widejoin tool the first time it uses it. The draft is saved at once and stays unpublished.
6. **Publish it.** Ask Claude Code to publish the draft. On a site in Direct, the default for a new install, it publishes at once as the agent's WordPress user. Claude Code gets back status applied, the change's id and a history link. If that user may not publish (a Contributor cannot), or the site is in Review first, the publish waits: open the review link Claude Code gives you and approve it in wp-admin. Approve, decline and restore are buttons in wp-admin. The console lists each change under Reviews and links to that page, but has no approve or restore button of its own. Claude Code can read the result back and confirm it. Hosted calls and more sites come with [Widejoin Pro, from $99 a year](/pricing/).

Claude Code warns when a tool's output passes 10,000 tokens and stops at 25,000 by default; the `MAX_MCP_OUTPUT_TOKENS` setting changes that cap for large page reads.

### Claude Desktop and claude.ai

Claude Desktop connects through its config file, which runs Widejoin through the mcp-remote bridge and needs Node.js 18 or later:

1. **Open the config file.** Install Node.js 18 or later first if this computer does not have it. Then open Settings from the Claude menu in your system's menu bar (not the settings inside the Claude window), go to the Developer tab and click Edit Config. That opens `claude_desktop_config.json`: on macOS in `~/Library/Application Support/Claude/`, on Windows in `%APPDATA%\Claude\` and on Linux in `~/.config/Claude/`.
2. **Add Widejoin.** Add this entry under `mcpServers`, with your token:

   ```json
   "widejoin": {
     "command": "npx",
     "args": ["-y", "mcp-remote", "https://widejoin.com/mcp", "--header", "Authorization:${WIDEJOIN_AUTH}"],
     "env": { "WIDEJOIN_AUTH": "Bearer <token>" }
   }
   ```

3. **Save the file and restart.** Save `claude_desktop_config.json`, then quit Claude Desktop completely and open it again. Closing the window is not enough.
4. **Allow the tools.** Claude Desktop asks you to allow each Widejoin tool the first time it uses it.

The token sits in plain text in that file, so keep the file to yourself. On our lab, Claude Desktop 2.31226.1 connected and listed the tools; the full chat workflow is still to check. [Connecting Claude Desktop to WordPress](/clients/claude/) has these steps next to the Claude Code ones.

claude.ai's custom connector signs in with OAuth. When we added `https://widejoin.com/mcp` with a request header on 2 November 2026, it did not connect. Anthropic's page now says the Request headers field for a fixed token is in beta for a limited set of organizations. The hosted server offers the OAuth sign-in. In Claude's Add custom connector dialog, choose **Register automatically** under OAuth client, because the hosted server does not support the recommended **Use Claude's published identity** yet. We have not completed a sign-in from claude.ai yet. The Connectors screen in Claude Desktop adds that same account connector, so use the config file above. Claude Code also connects today.

### ChatGPT and Codex CLI

ChatGPT is not on our tested list yet. On ChatGPT on the web, a custom MCP server is added under Plugins, with no need to turn on developer mode first. It takes OAuth or no authentication, with no field for a fixed header. The hosted server offers OAuth sign-in, but we have not completed one from ChatGPT yet. ChatGPT may limit write tools by plan, so check your plan's connector settings. Codex CLI is the OpenAI route that connects today, over standard MCP. We ran the test client described above with its config format; the Codex CLI app itself was not run. Add this to your Codex config, and put the token in the `WIDEJOIN_TOKEN` environment variable:

```toml
[mcp_servers.widejoin]
url = "https://widejoin.com/mcp"
bearer_token_env_var = "WIDEJOIN_TOKEN"
```

If you also set a header by hand, the bearer token variable wins.

### Cursor

Add this to `~/.cursor/mcp.json`, with the token in the `WIDEJOIN_TOKEN` environment variable:

```json
{"mcpServers":{"widejoin":{"url":"https://widejoin.com/mcp","headers":{"Authorization":"Bearer ${env:WIDEJOIN_TOKEN}"}}}}
```

Cursor asks you to approve each tool call by default. Remote servers do not read an `envFile`, so set the variable in your environment.

### VS Code with GitHub Copilot

Add this to `~/.copilot/mcp-config.json`, with the token in the `WIDEJOIN_TOKEN` environment variable. It is the file VS Code's **Copilot Global** setting uses, so Widejoin shows in every workspace:

```json
{"mcpServers":{"widejoin":{"type":"http","url":"https://widejoin.com/mcp","headers":{"Authorization":"Bearer ${WIDEJOIN_TOKEN}"}}}}
```

Keep the braces in `${WIDEJOIN_TOKEN}`: VS Code reads a bare `$WIDEJOIN_TOKEN` as plain text. VS Code reads the variable from the environment it starts in, and this file has no prompt that asks for the token, so start VS Code from a terminal where `WIDEJOIN_TOKEN` is set. An older `.vscode/mcp.json` with a `servers` block still works for now. VS Code has deprecated that format and plans to remove it in February 2027.

On Copilot Business and Enterprise, an administrator has to turn on the "MCP servers in Copilot" policy first; it is off by default. VS Code may confirm each tool call, and a chat request can have at most 128 tools turned on.

### Windsurf (now Devin Desktop)

Add this to `mcp_config.json`, with the token in the `WIDEJOIN_TOKEN` environment variable:

```json
{"mcpServers":{"widejoin":{"serverUrl":"https://widejoin.com/mcp","headers":{"Authorization":"Bearer ${env:WIDEJOIN_TOKEN}"}}}}
```

Windsurf allows 100 tools in total across all servers, and Widejoin offers up to 236 on a site with the free plugin and 71 more with Pro, so not every tool will be available there. On Enterprise, an administrator has to switch MCP on, and an allowlist blocks any server not on it.

### Gemini CLI and Antigravity

For Gemini CLI, run this with the token in `WIDEJOIN_TOKEN`:

```
gemini mcp add --transport http --header "Authorization: Bearer $WIDEJOIN_TOKEN" widejoin https://widejoin.com/mcp
```

Gemini CLI confirms each call unless you trust the server. Unpaid and Google One users moved to Antigravity on 18 June 2026; there, add this to `~/.gemini/config/mcp_config.json`:

```json
{"mcpServers":{"widejoin":{"serverUrl":"https://widejoin.com/mcp","headers":{"Authorization":"Bearer <token>"}}}}
```

### Kimi

Kimi Code CLI is Moonshot's own coder and connects over standard MCP. Add this to `~/.kimi-code/mcp.json`, with the token in `WIDEJOIN_TOKEN`:

```json
{"mcpServers":{"widejoin":{"url":"https://widejoin.com/mcp","bearerTokenEnvVar":"WIDEJOIN_TOKEN"}}}
```

Kimi's models also run inside Claude Code, OpenCode or Cline, because Moonshot's API is compatible with Anthropic's and OpenAI's. Point the host at Moonshot's API as Moonshot's agent guide describes, then add Widejoin in that host. The MCP connection runs in the host, not the model. Kimi's [docs](https://www.kimi.com/code/docs/en/) also list a desktop app as an official client. We have no verified MCP steps for it, so those are not verified by us. The kimi.com chat app does not accept custom MCP servers, and Kimi Code for VS Code documents no header field, so use the CLI.

### GLM (Z.ai)

Z.ai's own coder is ZCode, a desktop app for macOS, Windows and Linux (beta). From Z.ai docs, not yet run against Widejoin:

1. Open Settings, then MCP Servers, and click New MCP Server.
2. Pick the User scope, choose HTTP and paste `https://widejoin.com/mcp` as the URL.
3. Expand Headers (optional) and add `Authorization` with the value `Bearer <token>`.
4. Click Add, open a chat and ask for your site's name.

Z.ai's docs describe the Headers field in words only and show no JSON example for a remote server with a header, so the JSON config for ZCode is not verified by us. Use the form.

GLM (Claude Code or OpenCode): use GLM through one of those hosts, then connect Widejoin in that host. For Claude Code, run the Claude Code command above first. Then run the line below, paste your Z.ai key and press Enter. Nothing shows while you paste, and the key stays out of your shell history:

```
read -rs ZAI_API_KEY
```

Then start Claude Code on Z.ai in the same terminal:

```
ANTHROPIC_BASE_URL=https://api.z.ai/api/anthropic ANTHROPIC_AUTH_TOKEN="$ZAI_API_KEY" claude
```

For OpenCode, run `opencode auth login`, choose Z.AI Coding Plan, then add the OpenCode block below. Z.ai's own guide lists compatibility with Claude Code 2.0.14.

### DeepSeek

DeepSeek's own coder is [DeepSeek Harness](https://deepseek-harness.github.io/deepseek-harness/en/guide/quickstart), a developer preview that DeepSeek warns can change in breaking ways. Its [MCP page](https://deepseek-harness.github.io/deepseek-harness/en/guide/mcp-memory) documents an MCP client plugin, `@deepseek-ai/dsh-mcp-client`, that starts stdio servers or connects to a Streamable HTTP URL. Its examples are third-party memory servers. For a remote server it says to use `transport: streamable-http`, `url` and `headers`, in words only, with no example, so the steps below are not verified by us:

1. Copy the generic MCP row from that page into a new file, `widejoin.cordis.yml`, and set its `id` and `serverName` to `widejoin`.
2. Replace `transport: stdio` and the `command`, `args`, `env` and `cwd` lines with `transport: streamable-http`, `url: https://widejoin.com/mcp` and a `headers` entry named `Authorization` with the value `Bearer <token>`.
3. Start Harness with the file: add `--patch "$PWD/widejoin.cordis.yml"` to its start command (`dsh web`, or `npx @deepseek-ai/dsh web`). To keep Widejoin across runs, merge the row into `$DSH_HOME/cordis.patch.yml` instead of copying over that file.
4. Open a new session and ask for your site's name.

The token sits in that YAML file, so keep the file private.

DeepSeek (Claude Code or OpenCode): DeepSeek also runs inside Claude Code, and its [coding agents guide](https://api-docs.deepseek.com/guides/coding_agents) lists Claude Code, OpenCode and OpenClaw. Use DeepSeek through Claude Code or OpenCode, then connect Widejoin in that host. For Claude Code, run the Claude Code command above first. Then run the line below, paste your DeepSeek key and press Enter. Nothing shows while you paste, and the key stays out of your shell history:

```
read -rs DEEPSEEK_API_KEY
```

Then start Claude Code on DeepSeek in the same terminal:

```
ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic ANTHROPIC_AUTH_TOKEN="$DEEPSEEK_API_KEY" claude
```

DeepSeek's Anthropic API ignores server-side MCP settings, so the connection has to run in the client. Claude Code works that way.

### Qwen Code

Alibaba's own coder for Qwen. From Qwen Code docs, not yet run against Widejoin. Run line 1, paste your token and press Enter; nothing shows while you paste:

```
read -rs WIDEJOIN_TOKEN
```

Then add Widejoin in the same terminal. Qwen Code saves it to `~/.qwen/settings.json`:

```
qwen mcp add --transport http widejoin https://widejoin.com/mcp --header "Authorization: Bearer $WIDEJOIN_TOKEN"
```

### MiniMax Code

MiniMax's own coder, `mcode`. From MiniMax Code docs, not yet run against Widejoin. In your project folder, run line 1, paste your token and press Enter; nothing shows while you paste:

```
read -rs WIDEJOIN_TOKEN
```

Then export it in the same terminal, so `mcode` can read it:

```
export WIDEJOIN_TOKEN
```

Save this as `.mcp.json` in that folder and start `mcode` from the same terminal:

```json
{"mcpServers":{"widejoin":{"type":"http","url":"https://widejoin.com/mcp","headers":{"Authorization":"Bearer ${WIDEJOIN_TOKEN}"}}}}
```

### Mistral Vibe

Mistral's own coder. From Mistral docs, not yet run against Widejoin. Run line 1, paste your token and press Enter; nothing shows while you paste:

```
read -rs WIDEJOIN_TOKEN
```

Then export it in the same terminal, so Vibe can read it:

```
export WIDEJOIN_TOKEN
```

Add this to your Vibe `config.toml`. Keep `{token}` as written: Vibe fills it in from `WIDEJOIN_TOKEN`.

```toml
[[mcp_servers]]
name = "widejoin"
transport = "streamable-http"
url = "https://widejoin.com/mcp"
api_key_env = "WIDEJOIN_TOKEN"
api_key_header = "Authorization"
api_key_format = "Bearer {token}"
```

### Grok Build

xAI's own coder. From xAI docs, not yet run against Widejoin. Run line 1, paste your token and press Enter:

```
read -rs WIDEJOIN_TOKEN
```

Then add Widejoin in the same terminal. Grok Build saves it to `~/.grok/config.toml`:

```
grok mcp add --transport http widejoin https://widejoin.com/mcp --header "Authorization: Bearer $WIDEJOIN_TOKEN"
```

### OpenCode

Add this to `opencode.json`, with the token in `WIDEJOIN_TOKEN`. OpenCode also hosts GLM, DeepSeek and Kimi models:

```json
{"$schema":"https://opencode.ai/config.json","mcp":{"widejoin":{"type":"remote","url":"https://widejoin.com/mcp","enabled":true,"oauth":false,"headers":{"Authorization":"Bearer {env:WIDEJOIN_TOKEN}"}}}}
```

OpenCode waits 5 seconds for a server's tool list by default, and a long tool list takes up context.

### Other MCP clients

Most clients accept this shape, with their own field names:

```json
{
  "mcpServers": {
    "widejoin": {
      "url": "https://widejoin.com/mcp",
      "headers": { "Authorization": "Bearer <token>" }
    }
  }
}
```

- Cline: add `"type": "streamableHttp"`, or it falls back to the older SSE transport.
- Continue: in `config.yaml`, set `type: streamable-http` and put the header under `requestOptions.headers`. MCP works only in agent mode.
- Kiro: list the token variable under "Mcp Approved Env Vars" before using it in a header.
- Zed: put the entry under `context_servers` in `settings.json`.
- Raycast: use the HTTP Headers field when you install the server.
- Cherry Studio: add the header in the server form, and bind the tools to an agent.
- LobeHub: add a Streamable HTTP plugin with the URL and header.
- Qoder and JetBrains AI Assistant: their docs show no header field, so use the mcp-remote bridge form from the Custom block.

### Custom MCP client

Any client that takes a server address and an Authorization header connects with these settings.

- Endpoint: `https://widejoin.com/mcp`
- Header: `Authorization: Bearer <token>`
- Transport: streamable HTTP

To test the endpoint and token before you set up a client, send an MCP initialize request:

```
read -rs WIDEJOIN_TOKEN
printf 'Authorization: Bearer %s\n' "$WIDEJOIN_TOKEN" | curl -s https://widejoin.com/mcp -H @- -H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"curl-test","version":"1.0"}}}'
```

A missing or wrong token returns HTTP 401. A working token returns the server's name and the protocol version it agreed.

A client that runs only local (stdio) servers can reach Widejoin through the mcp-remote bridge:

```json
{"mcpServers":{"widejoin":{"command":"npx","args":["-y","mcp-remote","https://widejoin.com/mcp","--header","Authorization:${WIDEJOIN_AUTH}"],"env":{"WIDEJOIN_AUTH":"Bearer <token>"}}}}
```

The token goes in `env`, not in the arguments, so a plain `ps` listing does not show it. `ps eww` still shows it to your own account and to an admin.

## How do I connect one site straight to the plugin?

The quickest route is the Widejoin screen in wp-admin, which is the setup until an agent is connected. Pick the role: "Write and edit content (Editor)" is chosen for you, and "Build and launch the site (Administrator)" is the other. Leave or untick "Let simple page builder edits go live at once", which is ticked on a new connection and unticked on a site connected before 0.7.6. Then click Create connection. That one click installs or activates the MCP Adapter, makes the agent's WordPress user and creates a scoped Application Password, which it shows once and never stores. It then runs a self-test and shows the details to paste, each with a Copy button. If a step is refused, nothing is created. Its status line reads "An assistant is connected" only after your client makes its first real request; the self-test does not count. A new agent made there may not add code (scripts, custom CSS, PHP or shortcodes that run code) until an administrator who may add code uses "Allow the agent to add code" on the First connect screen, under Widejoin in the menu; the agent cannot flip that switch itself. "Disconnect and remove the assistant's user" on that screen revokes the passwords and deletes the agent's user, or turns it off if it owns content. The history of its changes stays.

To set it up by hand:

1. **Create a dedicated user.** In wp-admin, go to Users > Add New. Give the user the lowest role that does the job, at least Contributor, because Widejoin's page and tools need the edit_posts capability. The role is the agent's limit: in Direct it can do what that role can and no more, and a change the role does not allow waits for someone whose role does. Do not use your own login.
2. **Create a Widejoin password.** Sign in to wp-admin as that user and open Widejoin > Settings > Connection in the admin menu. Click Create Widejoin password and copy the password, because it is shown once. A password made in the user's profile does not connect until you tick Limited to Widejoin next to it on that tab and save. Widejoin 0.7.0 refuses any other Application Password with HTTP 403.
3. **Point your MCP client at the site.** Use the endpoint `https://<your-site>/wp-json/widejoin/v1/mcp` with the dedicated user's username and the Application Password.
4. **Check the connection.** Ask your agent to describe the site. It should name the site, the WordPress version and the page builders it found.
5. **Ask for a first change.** Request something small, such as a clearer title for the About page. In Direct it applies at once and the answer carries `status: applied`, an `undo` and a `history_url`. In Review first it waits on the Changes screen in wp-admin, under Waiting.
6. **Check or approve it.** Open the change in wp-admin from its history or review link, and check the desktop and phone preview. In Review first, approve it there. To go back, ask the agent to undo it, or choose Undo this change on the same screen. [Review first and the review inbox](/docs/review-inbox/) covers what waits in each mode.

## Which apps have we not connected yet?

claude.ai's custom connector, the Connectors screen in Claude Desktop and ChatGPT sign in with OAuth. The hosted server at `https://widejoin.com/mcp` offers that sign-in: add the address as a custom connector and sign in to Widejoin when the app asks. In Claude, choose **Register automatically** under OAuth client. There is no token to copy. On our lab the MCP SDK's own OAuth client, version 1.32.1, found the server, registered, signed in and listed the tools. We have not completed a sign-in from the real claude.ai, Claude Desktop or ChatGPT apps yet, so none of the three is on the tested list. Claude Code, Claude Desktop with the config file and Codex CLI, OpenAI's coder, are the routes on the tested list.

## Why is my WordPress MCP connection not working?

Check four things first: the site uses HTTPS, WordPress is 6.9 or later, the request is under 2 MB, and your host passes the Authorization header through. Below 6.9, Widejoin serves the update tools only, so most tools look missing.

![Terminal with a curl call to widejoin.com/mcp: 401 without a token, then the initialize result with one](/lab/curl-401-then-initialize-1200.webp)

Some hosts drop the standard `Authorization` header before PHP sees it. Widejoin accepts a fallback header, `X-Widejoin-Authorization`, for those hosts. Use it only when the connection diagnostics show the header was stripped, because proxies and log tools usually mask `Authorization` but not custom headers.

Some security plugins can switch Application Passwords off. If the Application Passwords section is missing from the user's profile, check those plugins' settings first.

## How do I disconnect a site?

In the console, open the site under Sites and click Disconnect. That revokes every token that can reach the site, asks the site to revoke the password the console used and deletes the stored credentials. On a direct connection, revoke the Application Password in the dedicated user's profile. The connection stops at once. You can also delete the user and the plugin; deleting the plugin removes its data unless an administrator chose to keep it.

Next: [how a change works](/how-it-works/) and the [security page](/security/).

## Questions

### Do I need a console account?

Not for a direct connection. The console gives you the Widejoin address `https://widejoin.com/mcp`, site tokens, an account connection that reaches every site on paid plans, and one place for several sites. Without an account, point your AI client at the plugin route on your own site, as described under [How do I connect one site straight to the plugin?](#direct).

### Can one token reach several sites?

Yes, with the account connection. On paid plans and the Pro trial, Settings > Tokens has one account token that reaches every site in your organization, up to your plan's site count, including sites you connect later. A site token reaches one site, and Free has site tokens only, so there you make one per app and per site, named for the app, such as "Claude on my laptop". Each site then gets its own entry in your AI client, and you can revoke one token without stopping the others.

### What does a 401 from widejoin.com/mcp mean?

The request reached Widejoin without a token, or with one that is wrong, expired or revoked. Tokens expire after 90 days. Create a new one on Settings, Tokens, put it in your app and try again. A 401 is also what the address answers when you open it in a browser, because a browser sends no token.

### Can I use ChatGPT?

We have not connected it yet. ChatGPT's custom apps sign in with OAuth and have no field for a fixed header. The hosted server offers OAuth sign-in, but we have not completed one from ChatGPT. Codex CLI, OpenAI's coding tool, connects today with the setup above. [Connecting ChatGPT to WordPress](/blog/chatgpt-wordpress/) sets out which ChatGPT plans may add a server and change a site.

### Does Widejoin store my site's password?

Never your own login. The agent signs in as its own WordPress user with a password limited to Widejoin. A site you connect to the console keeps that agent password in the console, encrypted, so the console can reach the site; Disconnect deletes it and asks the site to revoke it. A direct connection keeps it only in your AI client. The [security page](/security/) covers what that password can reach.
