> ## Documentation Index
> Fetch the complete documentation index at: https://confidence-auth-testing.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Servers

> Overview of the experimental Confidence MCP servers: what each server does, its endpoint and authentication, and how to connect your AI assistant.

Model Context Protocol (MCP) servers expose Confidence operations as tools that an AI assistant can call. This page lists the public Confidence MCP servers and shows how to connect them. For a guided setup, see [Set Up Confidence for Your AI Assistant](/docs/guides/build-with-an-ai-assistant.md).

> [!WARNING]
>
> The Confidence MCP servers are experimental. Tools and their parameters can change.

## Servers

All servers use streamable HTTP as the transport.

| Server | URL | Authentication | Use it to |
| - | - | - | - |
| [Flags](/docs/reference/agent/mcp-flags.md) | `https://mcp.confidence.dev/mcp/flags` | Required. Sign in to Confidence from your AI assistant. | Manage clients, flags, rules, context schemas, metrics, warehouses, events, and session recording policies |
| [Experiments](/docs/reference/agent/mcp-experiments.md) | `https://mcp.confidence.dev/mcp/experiments` | Required. Sign in to Confidence from your AI assistant. | Find experiments and read their configuration and results |
| [Documentation](/docs/reference/agent/mcp-docs.md#documentation-mcp-server) | `https://confidence.spotify.com/docs/mcp` | None | Search and read the Confidence documentation |
| [Docs and SDK guides](/docs/reference/agent/mcp-docs.md#docs-and-sdk-guides-mcp-server) | `https://mcp.confidence.dev/mcp/docs` | None | Search the documentation and get SDK integration guides, local resolve guides, and code snippets |

For every tool a server exposes, follow the link in the **Server** column.

## MCP Servers and the Confidence Agent

The MCP servers and the in-app Confidence Agent are separate tools:

* The **MCP servers** run inside your own AI assistant, such as Claude Code, Codex, Cursor, or VS Code. To create a metric with an assistant, use the Flags MCP server. The Confidence Agent doesn't create metrics.
* The **Confidence Agent** runs inside the Confidence app. It covers jobs that MCP doesn't, such as creating and launching experiments. See [Work with the Confidence Agent](/docs/guides/work-with-the-confidence-agent.md).

## Integration Setup

### Set Up the Documentation MCP Server

The Documentation MCP server gives your AI assistant access to Confidence documentation. It requires **no authentication**, uses streamable HTTP as the transport, and its URL is `https://confidence.spotify.com/docs/mcp`.

**Claude Code**

```bash theme={null}
claude mcp add --transport http confidence-docs https://confidence.spotify.com/docs/mcp
```

**Codex**

```bash theme={null}
codex mcp add confidence-docs --url "https://confidence.spotify.com/docs/mcp"
```

**Cursor**

**1. Open the Command Palette**

Use `Command + Shift + P` (`Ctrl + Shift + P` on Windows) and search for `Open MCP settings`.

**2. Add the server**

Select **New MCP Server** and add the following to the `mcpServers` JSON:

```json theme={null}
"confidence-docs": "https://confidence.spotify.com/docs/mcp"
```

**VS Code**

**1. Create the .vscode directory**

Create a `.vscode` directory in your workspace root if it doesn't exist.

**2. Create mcp.json**

Create a file named `mcp.json` in the `.vscode` directory.

**3. Add the server configuration**

Add the `confidence-docs` server to your configuration:

```json theme={null}
{
  "servers": {
    "confidence-docs": { "url": "https://confidence.spotify.com/docs/mcp" }
  }
}
```

**4. Start the server**

Click `Start` next to the MCP server name in the JSON file to start it.

### Set Up the Flags MCP Server

The Flags MCP server lets your AI assistant create and manage feature flags. It **requires authentication**, so allow access from the IDE or developer tool where you use it. The server uses streamable HTTP as the transport and its URL is `https://mcp.confidence.dev/mcp/flags`.

**Claude Code**

```bash theme={null}
claude mcp add --transport http confidence-flags https://mcp.confidence.dev/mcp/flags
```

After adding, open Claude Code, run `/mcp` and select `confidence-flags` to authenticate.

**Codex**

```bash theme={null}
codex mcp add confidence-flags --url https://mcp.confidence.dev/mcp/flags
codex mcp login confidence-flags
```

**Cursor**

**1. Open the Command Palette**

Use `Command + Shift + P` (`Ctrl + Shift + P` on Windows) and search for `Open MCP settings`.

**2. Add the server**

Select **New MCP Server** and add the following to the `mcpServers` JSON:

```json theme={null}
"confidence-flags": "https://mcp.confidence.dev/mcp/flags"
```

**3. Authenticate**

Click `Connect` to authenticate.

**VS Code**

**1. Create the .vscode directory**

Create a `.vscode` directory in your workspace root if it doesn't exist.

**2. Create mcp.json**

Create a file named `mcp.json` in the `.vscode` directory.

**3. Add the server configuration**

Add the `confidence-flags` server to your configuration:

```json theme={null}
{
  "servers": {
    "confidence-flags": { "url": "https://mcp.confidence.dev/mcp/flags" }
  }
}
```

**4. Start and authenticate**

Click `Start` next to the MCP server name in the JSON file and authenticate when prompted.

### Set Up the Experiments MCP Server

The Experiments MCP server lets your AI assistant explore and analyze A/B tests and rollouts. It **requires authentication**, so allow access from the IDE or developer tool where you use it. The server uses streamable HTTP as the transport and its URL is `https://mcp.confidence.dev/mcp/experiments`.

**Claude Code**

```bash theme={null}
claude mcp add --transport http confidence-experiments https://mcp.confidence.dev/mcp/experiments
```

After adding, open Claude Code, run `/mcp` and select `confidence-experiments` to authenticate.

**Codex**

```bash theme={null}
codex mcp add confidence-experiments --url https://mcp.confidence.dev/mcp/experiments
codex mcp login confidence-experiments
```

**Cursor**

**1. Open the Command Palette**

Use `Command + Shift + P` (`Ctrl + Shift + P` on Windows) and search for `Open MCP settings`.

**2. Add the server**

Select **New MCP Server** and add the following to the `mcpServers` JSON:

```json theme={null}
"confidence-experiments": "https://mcp.confidence.dev/mcp/experiments"
```

**3. Authenticate**

Click `Connect` to authenticate.

**VS Code**

**1. Create the .vscode directory**

Create a `.vscode` directory in your workspace root if it doesn't exist.

**2. Create mcp.json**

Create a file named `mcp.json` in the `.vscode` directory.

**3. Add the server configuration**

Add the `confidence-experiments` server to your configuration:

```json theme={null}
{
  "servers": {
    "confidence-experiments": { "url": "https://mcp.confidence.dev/mcp/experiments" }
  }
}
```

**4. Start and authenticate**

Click `Start` next to the MCP server name in the JSON file and authenticate when prompted.

## Next Steps

* Follow a recipe in the [MCP Cookbook](/docs/reference/agent/mcp-cookbook.md), for example to set up a flag with targeting or build a metric.
* Look up tools and parameters in the [Flags](/docs/reference/agent/mcp-flags.md), [Experiments](/docs/reference/agent/mcp-experiments.md), and [Documentation](/docs/reference/agent/mcp-docs.md) server references.
