> For the complete documentation index, see [llms.txt](https://docs.elevateab.com/elevate-helpcenter/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.elevateab.com/elevate-helpcenter/integrations/connect-claude-code-or-cursor.md).

# Connect Claude Code or Cursor

Connect Claude Code or Cursor to the Elevate A/B Testing MCP server using a config file or a single terminal command, with no extension to install.

***

Claude Code and Cursor connect straight to the Elevate A/B Testing server over HTTPS. There is nothing to download and no extension to install. You add a short block to a config file, or run one terminal command, and the connection is live.

Once connected, you can ask about your experiments from inside your editor or terminal and get answers from your live store data.

If you use Claude Desktop, it connects a different way and will not accept the configuration on this page. See [Claude Desktop](/elevate-helpcenter/mcp/connect-claude-desktop.md).

***

### Before you start

| Requirement                                   | Detail                                                   |
| --------------------------------------------- | -------------------------------------------------------- |
| Claude Code or Cursor installed               | Either client works with the same server                 |
| Your Elevate A/B Testing API key              | Generated in **Settings**, then **MCP**                  |
| Access to **Settings** in Elevate A/B Testing | To copy the key                                          |
| A plan                                        | MCP is available on every plan, with no upgrade required |

### Step 1: Copy your API key

1. Open Elevate A/B Testing and go to **Settings**.
2. Select **MCP** in the left sidebar.
3. In the **API key** section, copy your key. It begins with `elv_`.

You get one key per store, and the same key works for every client. If you or a teammate has already connected another assistant, reuse that key. Regenerating it disconnects everyone currently using it.

For more on how keys work, see [MCP Overview](/elevate-helpcenter/mcp/mcp-overview.md).

### Step 2: Add the server configuration

Both clients use the same server address and the same authorization header. Only the file location differs.

| Client      | Config file        |
| ----------- | ------------------ |
| Claude Code | `.mcp.json`        |
| Cursor      | `.cursor/mcp.json` |

Add this to the file, replacing `YOUR_API_KEY` with the key you copied:

```json
{
  "mcpServers": {
    "elevate": {
      "url": "https://elevateab.app/api/mcp",
      "headers": { "Authorization": "Bearer YOUR_API_KEY" }
    }
  }
}
```

If the file already contains other MCP servers, add the `elevate` entry inside the existing `mcpServers` object rather than creating a second one.

### Step 2, alternative: Add it from the terminal

Claude Code can add the server without you editing a file. Run this, replacing `YOUR_API_KEY` with your key:

```bash
claude mcp add --transport http elevate https://elevateab.app/api/mcp --header "Authorization: Bearer YOUR_API_KEY"
```

This produces the same result as editing the config file by hand. Use whichever you prefer.

### Step 3: Confirm it is working

1. Restart your client, or start a new session. A session that was already running will not pick up the new server.
2. Ask about your experiments. Something simple works best for a first check, such as asking which experiments you currently have.
3. The answer should reflect your actual store data rather than general knowledge.

If nothing comes back, go to [Troubleshooting](https://docs.elevateab.com/elevate-helpcenter/integrations/connect-claude-code-or-cursor#troubleshooting) below.

***

### Keeping your key out of version control

The configuration above contains your API key in plain text. Anyone with the key can read your experiment data.

If the config file lives inside a repository, make sure it is not committed. Add it to your `.gitignore` before you add the key, not after, since a key that has already been committed stays in the history even once you remove it. If that happens, regenerate the key in **Settings**, then **MCP**.

### If you regenerate your API key

Regenerating issues a new key and invalidates the old one immediately. Every client using the old key stops working until you update it.

For Claude Code and Cursor, update the key in the config file, then restart the client. If you added the server from the terminal, re-run the command with the new key.

***

### Troubleshooting

#### The server does not appear in my client

**Likely cause:** The client was running when you edited the config, or the file is in the wrong place.

**How to confirm:** Check that the file is named exactly `.mcp.json` for Claude Code or `.cursor/mcp.json` for Cursor, and that the leading dot is present.

**Fix:** Correct the location if needed, then fully restart the client.

#### The connection appears but returns nothing

**Likely cause:** The API key is wrong, incomplete, or was regenerated or revoked.

**How to confirm:** Compare the key in your config file against the one shown in Elevate A/B Testing under **Settings**, then **MCP**.

**Fix:** Paste the current key, including the `elv_` prefix, then restart the client. Check that `YOUR_API_KEY` was actually replaced and that the word `Bearer` and the space after it are still there.

#### My client reports a JSON error

**Likely cause:** The `elevate` block was pasted alongside an existing `mcpServers` object instead of inside it, leaving two objects at the same level.

**How to confirm:** Open the file and check there is only one `mcpServers` key.

**Fix:** Merge the entries so `elevate` sits inside the single `mcpServers` object, next to any other servers you have configured.

#### It works for me but not for a teammate

**Likely cause:** Config files are local. Your teammate needs their own copy.

**Fix:** Have them add the same configuration on their machine using the same API key. The key is shared across the store.

#### The connection stopped working with no changes on my end

**Likely cause:** Someone regenerated or revoked the shared key.

**How to confirm:** Compare your key against the one in **Settings**, then **MCP**.

**Fix:** Update your config with the current key and restart.

#### Claude Desktop rejected this configuration

**Likely cause:** Claude Desktop does not support the remote server format.

**Fix:** Use the extension instead. See [Claude Desktop](/elevate-helpcenter/mcp/connect-claude-desktop.md).

***

### FAQs

#### Do Claude Code and Cursor need different keys?

No. One key per store, shared across every client and every person on your team.

#### Can I connect more than one store?

Yes. Add a second entry inside `mcpServers` with a different name and that store's key, for example `elevate-store-a` and `elevate-store-b`. Both connections work side by side. The assistant tells the stores apart by the entry name, so name each entry after its store. Asking the assistant for the store overview also confirms which store a connection belongs to.

#### Does this change anything on my store?

No. The connection is read-only. Your assistant can read your experiment data, but it cannot start, pause, or end an experiment, and it cannot change any setting. Your theme and storefront are untouched.

#### Which plans include this?

All of them. MCP is available on every Elevate A/B Testing plan.

#### Where exactly should `.mcp.json` live?

For Claude Code, we recommend adding the server at user scope instead, so it works in every project and your API key stays out of shared files:

```bash
claude mcp add --transport http --scope user elevate https://elevateab.app/api/mcp --header "Authorization: Bearer YOUR_API_KEY"
```

A `.mcp.json` file in a project folder is Claude Code's project scope, and projects are usually shared with everyone who works on them, so a key in that file can end up in your repository. If you do use it, follow [Keeping your key out of version control](https://docs.elevateab.com/elevate-helpcenter/integrations/connect-claude-code-or-cursor#keeping-your-key-out-of-version-control).

#### What can I actually ask it?

Anything about your experiments and store data, in plain language. For example: which experiments are running, how each variation is performing, whether a result is significant yet, how results differ by device or traffic source, which products drove the difference, or how your store-wide funnel looks. The assistant can only read data, so it cannot start, pause, or change anything. For the full list of what it can read, see [What the assistant can access](https://docs.elevateab.com/elevate-helpcenter/mcp/mcp-overview#what-the-assistant-can-access).

***

### Next steps

* [MCP Overview](/elevate-helpcenter/mcp/mcp-overview.md): How keys, clients, and access work
* [Claude Desktop](/elevate-helpcenter/mcp/connect-claude-desktop.md): Connect the desktop app instead
* [Reports Overview](/elevate-helpcenter/analyze/reports/reports-overview.md): Understand the data your assistant is reading
