# Connect Claude, Cursor and others

> How to add the ProseCaptain MCP to Claude Code, Claude Desktop, Cursor, VS Code, Windsurf and Cline.

Use the buttons above. When they lead to the ProseCaptain sign-in, you sign in, pick a workspace and accept the terms: no token needed. Until then (beta), and in tools without OAuth sign-in, a tool needs two things: the server address and an MCP token from the ProseCaptain app (**Settings** → **AI tools** → **New token**).

```text
Address: https://wp-mcp.prosecaptain.com/mcp
Header:  Authorization: Bearer pcm_YOUR_TOKEN
```

Right after you create a token, the app shows **Add to Cursor** and **Add to VS Code** buttons and a ready Claude Code command with your token in it.

[Issue a token in ProseCaptain →](https://app.prosecaptain.com/settings/ai)

## Claude Code

```bash
claude mcp add --transport http prosecaptain-wp https://wp-mcp.prosecaptain.com/mcp \
  --header "Authorization: Bearer pcm_YOUR_TOKEN"
```

Check it with `/mcp` in Claude Code: `prosecaptain-wp` should be listed.

## Claude Desktop

Claude Desktop reaches a server with a token through the small `mcp-remote` helper (needs Node.js). Open **Settings** → **Developer** → **Edit Config** and add:

```json
{
  "mcpServers": {
    "prosecaptain-wp": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://wp-mcp.prosecaptain.com/mcp", "--header", "Authorization:${PC_AUTH}"],
      "env": { "PC_AUTH": "Bearer pcm_YOUR_TOKEN" }
    }
  }
}
```

Restart Claude Desktop.

## Cursor

**Settings** → **MCP** → **Add new MCP server**, or the file `~/.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "prosecaptain-wp": {
      "url": "https://wp-mcp.prosecaptain.com/mcp",
      "headers": { "Authorization": "Bearer pcm_YOUR_TOKEN" }
    }
  }
}
```

## VS Code

The file `.vscode/mcp.json` in your project. VS Code asks for the token on first use and does not store it in the file:

```json
{
  "inputs": [
    { "type": "promptString", "id": "prosecaptain-token", "description": "ProseCaptain MCP token (pcm_…)", "password": true }
  ],
  "servers": {
    "prosecaptain-wp": {
      "type": "http",
      "url": "https://wp-mcp.prosecaptain.com/mcp",
      "headers": { "Authorization": "Bearer ${input:prosecaptain-token}" }
    }
  }
}
```

## Windsurf

The file `~/.codeium/windsurf/mcp_config.json`:

```json
{
  "mcpServers": {
    "prosecaptain-wp": {
      "serverUrl": "https://wp-mcp.prosecaptain.com/mcp",
      "headers": { "Authorization": "Bearer pcm_YOUR_TOKEN" }
    }
  }
}
```

## Cline and other MCP clients

Add a **Streamable HTTP** server with the address `https://wp-mcp.prosecaptain.com/mcp` and the header `Authorization: Bearer pcm_YOUR_TOKEN`.

## claude.ai and ChatGPT: coming soon

Connectors in claude.ai (Settings → Connectors) and ChatGPT sign in with OAuth instead of a pasted token. Sign-in with your ProseCaptain account over OAuth is on the way. Until then, use Claude Desktop or Claude Code: it is the same Claude.

## First prompt

Start with the list of sites:

```text
Show my ProseCaptain sites and tell me what is on the squares.pl home page.
```

The AI tool calls `list_sites` and `site_info`. On production it asks for a confirmation before every change.

## When something does not work

| Symptom | What to do |
|---|---|
| `401 invalid_token` | The token was revoked or pasted wrong. Issue a new one in the app. |
| The site is not listed | It is not connected to this workspace. Click **Connect to AI** in the plugin. |
| “lacks the permission” on menus or widgets | The user has the Editor role. Switch it to ProseCaptain AI, or connect the site again from the plugin. |
| `wordpress_error` when connecting a site | A security plugin or the server blocks application passwords or the `Authorization` header. |