> 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 to Elevate A/B Testing with one terminal command, or Cursor with an API key in mcp.json, then ask about your Shopify experiments.

Claude Code and Cursor connect to the Elevate A/B Testing MCP server in different ways. Claude Code takes one terminal command and a login, with no key. Cursor uses an API key that Elevate A/B Testing adds to a config file for you. Once connected, you can ask about your Shopify experiments from your terminal or editor.

Both connections are read-only unless you allow changes: the assistant can see your tests and results, and it can't change anything in your store. To let the assistant create, launch, pause, resume and end experiments, see [Let Your AI Assistant Make Changes](https://docs.elevateab.com/elevate-helpcenter/mcp/let-your-ai-assistant-make-changes.md).

***

### Connect Claude Code

1. In Elevate A/B Testing, open **MCP** in the sidebar, and under **Coding tools** select **Claude Code**.
2. Copy the command and run it in your project:

```bash
claude mcp add --transport http elevate https://elevateab.app/api/mcp
```

3. In Claude Code, run `/mcp`, pick **elevate**, and approve read-only access for your store, for example `your-store.myshopify.com`. Access is granted to the store your browser is logged into in Elevate A/B Testing.
4. Ask Claude: What tests am I running?

The status box on the Claude Code setup screen changes from **Waiting for Claude Code** to **Connected** once Claude Code makes its first request.

Run this way, the command adds Elevate to the current project only. To use it in every project, add `--scope user` to the command.

#### Claude Code in CI or a container without a browser

The login step opens a browser. In CI, or in a container without a browser, use an MCP API key instead of logging in:

1. On the Claude Code setup screen in Elevate A/B Testing, expand **Running in CI or a container without a browser?** and click **Create key**. Elevate A/B Testing puts the key into the command.
2. Copy the command now. For your security, the full key is only shown once.
3. Run it:

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

The key appears as its own connection in the **Connections** list.

***

### Connect Cursor

Cursor connects with an MCP API key. Each key belongs to one connection.

1. In Elevate A/B Testing, open **MCP** in the sidebar, and under **Coding tools** select **Cursor**.
2. Click **Create key**. Elevate A/B Testing adds the key to the setup on the same screen. The key is read-only. To let the client make changes, tick **Can make changes** when you create it.
3. Copy the setup now. For your security, the full key is only shown once. If you lose it, disconnect it under **Connections** and create a new one.
4. Paste the setup into `~/.cursor/mcp.json`:

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

5. In Cursor, open **Customize** in the sidebar and check that Elevate is turned on.
6. Ask Cursor: What tests am I running?

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

#### Keep your Cursor key out of version control

`~/.cursor/mcp.json` sits in your home folder, outside your projects. A project file at `.cursor/mcp.json` also works, but it is usually committed to git, and the key would go with it. Anyone with the key can read your experiment data, and change experiments if it was created with **Can make changes**. If a key was committed, disconnect it under **Connections** and create a new one.

***

### Troubleshooting

#### Claude Code doesn't list elevate when I run /mcp

**Likely cause:** You ran the command in a different project. Without `--scope user`, the server is added to one project only.

**Fix:** Run the command in the project you are working in, or run it again with `--scope user`.

#### Cursor doesn't show Elevate

**Likely cause:** The file is in the wrong place, or Elevate is turned off in Cursor.

**Fix:** Check the file is `~/.cursor/mcp.json`, with the leading dot. Then open **Customize** in the Cursor sidebar and turn Elevate on.

#### Cursor reports a JSON error

**Likely cause:** The `elevate` block was pasted next to an existing `mcpServers` object instead of inside it.

**Fix:** Merge the entries so `elevate` sits inside the single `mcpServers` object.

#### Cursor connects but returns nothing

**Likely cause:** The key was disconnected, or `YOUR_API_KEY` was not replaced.

**Fix:** Check that the `Authorization` value reads `Bearer` followed by a space and the key. If the key was disconnected under **Connections**, create a new key and update the file.

***

### FAQs

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

Not unless you allow changes. A read-only connection 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 Elevate A/B Testing plans include this?

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

#### Do Claude Code and Cursor share a key?

No. Claude Code logs in with Elevate and uses no key, except in CI. Each Cursor key belongs to one connection, and it appears as its own entry in the **Connections** list.

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

Yes. Each connection reads one store, and API keys belong to one store. In Cursor, create a key in each store and add one entry per store inside `mcpServers`, with different names such as `elevate-store-a` and `elevate-store-b`. In Claude Code, open Elevate A/B Testing for the other store in the same browser, then add the server again under a different name, such as `elevate-store-b`, and approve access. Reconnecting the same entry switches it to the new store instead of adding one.

#### What can I ask?

Anything about your experiments and store data, in plain language: which experiments are running, how each variation is performing, whether a result is significant yet, or which products drove the difference. For the full list of what the assistant can read, see [MCP Overview](https://docs.elevateab.com/elevate-helpcenter/mcp/mcp-overview.md).

***

### Next steps

* [MCP Overview](https://docs.elevateab.com/elevate-helpcenter/mcp/mcp-overview.md): every client, and how sign-in and access work
* [Connect VS Code](https://docs.elevateab.com/elevate-helpcenter/mcp/connect-vs-code.md): connect GitHub Copilot in VS Code
* [Connect Gemini CLI](https://docs.elevateab.com/elevate-helpcenter/mcp/connect-gemini-cli.md): connect Gemini CLI
* [Manage MCP Connections](https://docs.elevateab.com/elevate-helpcenter/mcp/manage-mcp-connections.md): see and disconnect connections
