# Connect Claude

> Connect Claude Code, or any MCP client that sends a Bearer header, to your MISSIN workspace with a secret API key, then manage partners and captures.

MISSIN runs a hosted MCP server at `https://api.missin.co.uk/mcp`. An AI assistant connects with a secret API key and works inside your workspace, at that key's access level and no higher.

> **Note:**
> Claude's one-click connectors sign in with OAuth, and MISSIN's MCP server does not offer OAuth yet. Connect with a secret API key instead: from Claude Code, from Claude Desktop with the MISSIN extension, from a custom connector that sends the key as a request header, or from Claude Desktop through the `mcp-remote` bridge. For the click-by-click path in each app, written for people who do not use a terminal, send them to [Use MISSIN in your AI chats](https://docs.missin.co.uk/integrations/ai-assistants.md).

## Create a key

1. Settings > Developers (https://app.missin.co.uk/settings/developers): Open the Developers panel.
2. Settings > Developers > Create key (https://app.missin.co.uk/settings/developers): Create a secret key. Pick Write to let the assistant create partners and start captures, or Read to let it look only.

The key is shown once. Copy it now, and keep it out of chats and repositories.

## Add the server

**Claude Desktop (extension)**

The `.mcpb` extension is one file and needs no config editing.

1. Download [missin.mcpb](https://github.com/MISSINCOUK/missin-mcp/releases/latest/download/missin.mcpb).
2. Open the file, or drag it into Claude Desktop.
3. Paste your secret key when Claude Desktop asks for it. It is stored as a secret.

The extension runs the same tools as the hosted server, on your computer, and calls the MISSIN API with your key. It has one more setting, **Toolsets**, with `core` as the default.

**Claude Code**

```bash
claude mcp add --transport http --scope user missin https://api.missin.co.uk/mcp \
  --header "Authorization: Bearer sk_live_..."
```

Run `/mcp` inside Claude Code to check that `missin` shows as connected. To load more tools, add `?toolsets=` to the URL (see below).

To run the server on your own machine instead, use the [CLI](https://developer.missin.co.uk/tools/cli.md) over stdio. The `--env` flag comes before the server's name:

```bash
claude mcp add --transport stdio --env MISSIN_API_KEY=sk_live_... --scope user missin -- npx -y @missin/cli mcp
```

> **Warning:**
> Never add `--scope project`. A project-scoped server is written to `.mcp.json` in your repository, and the key goes with it into version control. `--scope user` keeps it in your own Claude Code settings.

**Claude.ai and Desktop connector**

Custom connectors can send a fixed request header, which is all a MISSIN key needs.

1. In Claude.ai or Claude Desktop, open **Customize**, then **Connectors**, then **Add custom connector** (Free, Pro and Max plans). On Team and Enterprise plans an Owner adds it under **Organization settings**, then **Connectors**, then **Add**, then **Custom**.
2. Enter the server URL `https://api.missin.co.uk/mcp`.
3. Set **Authentication** to **No sign-in**.
4. Under **Request headers**, add the name `authorization` with the value `Bearer sk_live_...`.

> **Note:**
> Request headers on custom connectors are a beta and are available to some organisations. If you do not see **Request headers**, use the extension or the `mcp-remote` route in the Claude Desktop tabs instead.

> **Warning:**
> Calls to a custom connector come from Anthropic's servers, not from your computer, and they use the one key you saved. Everyone who uses that connector shares that key's access, so create a key for it at the lowest level it needs, and revoke it when the connector is removed.

**Claude Desktop (mcp-remote)**

If you cannot install the extension, Claude Desktop's own config file can still reach the hosted server. That file starts local programs, so it goes through the open-source `mcp-remote` bridge, which needs Node.js. Open Settings, then Developer, then Edit Config, and add:

```json
{
  "mcpServers": {
    "missin": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://api.missin.co.uk/mcp",
        "--transport",
        "http-only",
        "--header",
        "Authorization:${MISSIN_AUTH}"
      ],
      "env": {
        "MISSIN_AUTH": "Bearer sk_live_..."
      }
    }
  }
}
```

Restart Claude Desktop. The header is written without a space after the colon, and the space lives in `env`, because Claude Desktop on Windows does not escape spaces in `args`.

**Other clients**

Any MCP client that speaks Streamable HTTP and can send a header works: `POST https://api.missin.co.uk/mcp` with `Authorization: Bearer sk_live_...`. Only a secret key is accepted, and `x-api-key` alone is refused. Cursor, VS Code and Codex have their own config formats: see [Connect Cursor, VS Code and Codex](https://developer.missin.co.uk/mcp/other-clients.md).

## Let an agent install it

Paste this prompt into a coding agent (Claude Code, Codex, Cursor) to have it add the server and prove it works. It is the same prompt the [merchant guide](https://docs.missin.co.uk/integrations/ai-assistants.md#let-an-ai-agent-install-it-for-you) gives. The agent checks the endpoint without a key, asks for the key without echoing it, adds the server at user scope with the client's own command, and calls `whoami`.

**Install with an AI assistant**

Copy this prompt into the AI assistant you're using.

```text
Install the MISSIN MCP server for me and check that it works.

About the server
- MISSIN's hosted MCP server is https://api.missin.co.uk/mcp (Streamable HTTP, JSON responses).
- It takes a MISSIN secret API key as the header "Authorization: Bearer sk_live_...". It has no OAuth sign-in, so do not start one.
- Guides: https://docs.missin.co.uk/integrations/ai-assistants and https://developer.missin.co.uk/mcp/connect-claude

Steps
1. Check the server is reachable, without a key: POST {"jsonrpc":"2.0","id":1,"method":"initialize"} to https://api.missin.co.uk/mcp with Content-Type: application/json. Expect 401 with the header WWW-Authenticate: Bearer realm="missin".
2. Ask me for my secret API key. If I do not have one, tell me to create one in MISSIN under Settings, then Developers, at Read or Write. Never print the key back, never write it into a file under version control, and leave it out of your report.
3. Add a server named "missin" with this client's own command, at user level, never project level:
   - Claude Code: claude mcp add --transport http --scope user missin https://api.missin.co.uk/mcp --header "Authorization: Bearer <the key>"
   - Codex: have me export MISSIN_API_KEY, then run: codex mcp add missin --url https://api.missin.co.uk/mcp --bearer-token-env-var MISSIN_API_KEY
   - Cursor: in ~/.cursor/mcp.json, "missin": { "url": "https://api.missin.co.uk/mcp", "headers": { "Authorization": "Bearer ${env:MISSIN_API_KEY}" } }
   - Any other client: its user-level MCP config, Streamable HTTP, the same header.
4. Reload the MCP servers if this client needs it, then call the missin tool "whoami".
5. Report: which config you changed and where, whether whoami answered, and the workspace and access level it reported (as created and as it acts now). If it failed, give the status code: 401 means the key is missing, revoked or expired; 403 with secret_key_required means a publishable key was used.
```

## Check what the key can do

Ask the assistant "which workspace are you connected to, and what can you change?". It calls `whoami`, a tool every key has, which answers with the workspace, the key's name and its access level, and the display name of the person who created it. It also lists the toolsets and actions the key can use at its level. The answer shows two levels: the one the key was created with, and the one it acts with now, which is capped by its creator's current role. Use the second.

## Ask for something

```text
Make a partner for @test11 on Instagram and TikTok, pull their posts and add them to my spring campaign.
```

The assistant works through it with the task tools, and stops to ask when it needs you:

1. It calls `save_partner` with both handles, so one partner holds the Instagram and TikTok accounts.
2. It calls `quote_capture` and tells you the credits and the price. Nothing is spent yet.
3. After your yes, it calls `start_capture` with the price you approved, and `save_campaign` or `assign_posts_to_campaign` files the posts under your spring campaign.
4. Capture runs in the background. It checks with `get_capture_status` and tells you when posts arrive.

If two campaigns match "spring", or a handle already belongs to more than one partner, the result has kind `needs_choice` and lists the candidates. That is a question, not an error: the assistant asks you which one you meant, then calls again with that record's id. It never guesses.

> **Warning:**
> Capture spends credits. `start_capture` refuses a price you did not approve and answers with the new price, and the assistant must show you that price and ask again, never retry on its own.

## Access levels

A tool above the key's level is not listed, and a call to it by name is refused with `403` and `insufficient_scope`.

| Level | What the assistant can do |
|---|---|
| Read | Look up campaigns, partners, posts, forms, orders and more. Get a capture quote. |
| Write | Also create and change partners, campaigns, posts, discounts and forms, and start captures. |
| Admin | Also change connections, integration settings, the brand and workspace settings. |

A key acts as the member who created it, and its level is capped by that member's role. `whoami` reports both levels.

## Load more tools

The `core` toolset loads by default: the task tools plus listing and reading the main records. Add toolsets to the URL, for example `https://api.missin.co.uk/mcp?toolsets=forms,waitlists`, or `toolsets=all` for everything. The assistant can call `list_toolsets` to see what exists. Every tool is on the [tool registry](https://developer.missin.co.uk/mcp/tools.md), and every operation behind them is in the [API reference](https://developer.missin.co.uk/reference.md).

## Limits

- **Rate.** Each key may make 600 requests a minute unless MISSIN set another limit; over it the server answers `429` with `rate_limited`. Requests the server refuses are also counted per IP address, at 200 a minute; past that the server answers `429` with `RATE_LIMITED`.
- **Size and time.** A request body is capped at 256 KB, and a request that runs longer than 30 seconds is answered with `504`.
- **Check before you retry.** A timeout does not cancel work already running, so a write may still complete after the `504`. List or get the record before you repeat a create.

## Troubleshooting

- **`401`:** the key is missing, revoked or expired, or you sent a login token instead of a key.
- **`403` with `secret_key_required`:** you used a publishable key. Use a secret key.
- **`403` with `insufficient_scope`:** the tool needs a higher access level. The `WWW-Authenticate` header carries the full sentence, for example `save_partner needs a Write key; this key is Read.` Create a key at the level the job needs, or ask `whoami` what this one allows.
- **`400` naming a toolset:** the `toolsets` value is not one of the toolset names. Call `list_toolsets`.
- **Posts you already had did not move:** posts the workspace already held keep their campaign. Ask the assistant to file them with `assign_posts_to_campaign`.
- **`403` with no code, and your client sends an `Origin` header:** the server refuses any request that carries an `Origin` header unless that origin is on the server's own allowlist. Agents and servers send none. Connect from a local MCP client or a server, not from a web page.
- **Claude.ai or Claude Desktop connector does not authenticate:** check that the header name is `authorization` and the value starts with `Bearer `, and that the key is a secret key. If your plan has no **Request headers** field, use the extension or `mcp-remote`.

## Sources

Anthropic's own docs for [adding an unlisted custom connector](https://claude.com/docs/connectors/custom/add-unlisted), [connector authentication](https://claude.com/docs/connectors/building/authentication.md) and [Claude Code MCP servers](https://code.claude.com/docs/en/mcp.md), and the [`mcp-remote` README](https://github.com/geelen/mcp-remote).

Source: https://developer.missin.co.uk/mcp/connect-claude
