# Connect Claude Code, Codex, Cursor and other MCP clients

Source: https://joinbreaker.ai/help/mcp-coding-tools

> Run Breaker's MCP server next to a coding tool or desktop app with an API key, with the exact command or config for each client.

Coding tools and desktop apps connect to Breaker by running its MCP server on your own computer, signed in with an API key. This is different from browser assistants such as claude.ai and ChatGPT, which connect to Breaker's hosted server and sign in with your account. For those, see [Connect Claude or ChatGPT (hosted MCP)](/help/ai-assistants-mcp).

## Before you start

- **An API key.** Create one under **Settings**, **Integrations**, **API Keys**. It starts with `bk_live_`. A key belongs to one newsletter. See [API keys](/help/api-keys).
- **Node.js** installed, so that the `npx` command is available.

The server is the npm package [@breaker-email/mcp](https://www.npmjs.com/package/@breaker-email/mcp). In every example below, replace `bk_live_your_key_here` with your key.

## The quickest way: let your assistant set it up

Paste this into Claude Code, Codex, Cursor or any other AI coding assistant. It asks for your key, works out which client it is running in, registers the server and checks the connection.

```
Set up the Breaker MCP server for me.

Breaker is an email newsletter platform. For this setup the MCP server runs
locally over stdio via npx and authenticates with an API key. Do not look for
a browser sign-in or a hosted endpoint.

1. Ask me for my Breaker API key before you write any config. It looks like
   bk_live_... . If I don't have one, tell me to create it at
   https://app.breaker.email under Settings then API Keys, and wait for me.
   You cannot create a key yourself.

2. Work out which MCP client you are running in and register the server using
   that client's own method, named "breaker", at user scope where the client
   has one. The command is:
     npx -y -p @breaker-email/mcp breaker-mcp
   with BREAKER_API_KEY set in the server's environment. Keep the -p flag and
   the breaker-mcp binary name exactly as written.

3. Confirm it worked before calling it done. Check the breaker tools are
   listed, then call newsletter_get, which takes no arguments and only reads.
   Tell me which newsletter it returned. A 401 means the key is wrong or
   revoked: tell me, don't retry. During setup, never call a tool that
   creates, updates or deletes anything.
```

## Claude Code

One command, at user scope so every project can use it:

```
claude mcp add breaker --scope user --env BREAKER_API_KEY=bk_live_your_key_here -- npx -y -p @breaker-email/mcp breaker-mcp
```

## Codex

```
codex mcp add breaker --env BREAKER_API_KEY=bk_live_your_key_here -- npx -y -p @breaker-email/mcp breaker-mcp
```

Codex stores its settings as TOML. To edit `~/.codex/config.toml` by hand instead:

```
[mcp_servers.breaker]
command = "npx"
args = ["-y", "-p", "@breaker-email/mcp", "breaker-mcp"]

[mcp_servers.breaker.env]
BREAKER_API_KEY = "bk_live_your_key_here"
```

## Claude Desktop

Open **Settings**, **Developer**, **Edit Config**, add the block below to `claude_desktop_config.json` and restart the app.

```
{
  "mcpServers": {
    "breaker": {
      "command": "npx",
      "args": ["-y", "-p", "@breaker-email/mcp", "breaker-mcp"],
      "env": { "BREAKER_API_KEY": "bk_live_your_key_here" }
    }
  }
}
```

Claude Desktop can also use the hosted server with no key, the same way claude.ai does. See [Connect Claude or ChatGPT (hosted MCP)](/help/ai-assistants-mcp).

## Cursor, Windsurf and other clients

Any client that runs MCP servers over stdio uses the same JSON block as Claude Desktop, in its own MCP config file.

**VS Code** uses the same shape under a `servers` key instead of `mcpServers`.

## Check that it works

Ask the assistant which newsletter it is connected to. It should call the `newsletter_get` tool and answer with your newsletter's name.

- **No Breaker tools listed.** Restart the client, then check the command and the config for typos. Keep `-p @breaker-email/mcp breaker-mcp` exactly as written.
- **A 401 error.** The key is wrong or has been revoked. Create a new one on the **API Keys** tab.

## More than one newsletter

A key reaches one newsletter. To work with several, add the server once per newsletter under different names, for example `breaker-weekly` and `breaker-product-news`, each with its own key.

## What the assistant can do

- **Newsletter.** Read which newsletter the key belongs to.
- **Campaigns.** List and read campaigns, create a draft, change its title, subject and preview text, read and replace its body, and preview the rendered email.
- **Reports.** Newsletter and per-campaign totals over a date range, per-contact engagement, links and who clicked them, subscriber counts and unsubscribes, including RealClick™.
- **Segments.** List and read segments, create static or dynamic ones, read and replace a dynamic segment's rules, add contacts to a static one, and recalculate.
- **Contacts.** Create, find, read and update contacts, add and remove tags, and list tags, custom fields and signup forms.

## What it cannot do

An API key cannot send a campaign or delete contacts. Everything an assistant writes is saved as a draft that opens in the campaign editor, and a person presses Publish.

## Disconnect

Clients that use a key are not listed on the **AI Clients** tab. To cut one off, revoke its key on the **API Keys** tab. See [API keys](/help/api-keys).

The same actions are available to your own code through the REST API. See [API documentation](/help/api-documentation).
