> ## Documentation Index
> Fetch the complete documentation index at: https://confidence.spotify.com/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).

<Warning>
  The Confidence MCP servers are experimental. Tools and their parameters can change.
</Warning>

## Servers

All servers use streamable HTTP as the transport.

| Server | URL | Authentication | Use it to |
| - | - | - | - |
| [Flags](/docs/reference/agent/mcp-flags) | `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) | `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#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#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).

## 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`.

<Tabs>
  <Tab title="Claude Code">
    ```bash theme={null}
    claude mcp add --transport http confidence-docs https://confidence.spotify.com/docs/mcp
    ```
  </Tab>

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

  <Tab title="Cursor">
    <Steps>
      <Step title="Open the Command Palette">
        Use `Command + Shift + P` (`Ctrl + Shift + P` on Windows) and search for `Open MCP settings`.
      </Step>

      <Step title="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"
        ```
      </Step>
    </Steps>
  </Tab>

  <Tab title="VS Code">
    <Steps>
      <Step title="Create the .vscode directory">
        Create a `.vscode` directory in your workspace root if it doesn't exist.
      </Step>

      <Step title="Create mcp.json">
        Create a file named `mcp.json` in the `.vscode` directory.
      </Step>

      <Step title="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" }
          }
        }
        ```
      </Step>

      <Step title="Start the server">
        Click `Start` next to the MCP server name in the JSON file to start it.
      </Step>
    </Steps>
  </Tab>
</Tabs>

### 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`.

<Tabs>
  <Tab title="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.
  </Tab>

  <Tab title="Codex">
    ```bash theme={null}
    codex mcp add confidence-flags --url https://mcp.confidence.dev/mcp/flags
    codex mcp login confidence-flags
    ```
  </Tab>

  <Tab title="Cursor">
    <Steps>
      <Step title="Open the Command Palette">
        Use `Command + Shift + P` (`Ctrl + Shift + P` on Windows) and search for `Open MCP settings`.
      </Step>

      <Step title="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"
        ```
      </Step>

      <Step title="Authenticate">
        Click `Connect` to authenticate.
      </Step>
    </Steps>
  </Tab>

  <Tab title="VS Code">
    <Steps>
      <Step title="Create the .vscode directory">
        Create a `.vscode` directory in your workspace root if it doesn't exist.
      </Step>

      <Step title="Create mcp.json">
        Create a file named `mcp.json` in the `.vscode` directory.
      </Step>

      <Step title="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" }
          }
        }
        ```
      </Step>

      <Step title="Start and authenticate">
        Click `Start` next to the MCP server name in the JSON file and authenticate when prompted.
      </Step>
    </Steps>
  </Tab>
</Tabs>

### 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`.

<Tabs>
  <Tab title="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.
  </Tab>

  <Tab title="Codex">
    ```bash theme={null}
    codex mcp add confidence-experiments --url https://mcp.confidence.dev/mcp/experiments
    codex mcp login confidence-experiments
    ```
  </Tab>

  <Tab title="Cursor">
    <Steps>
      <Step title="Open the Command Palette">
        Use `Command + Shift + P` (`Ctrl + Shift + P` on Windows) and search for `Open MCP settings`.
      </Step>

      <Step title="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"
        ```
      </Step>

      <Step title="Authenticate">
        Click `Connect` to authenticate.
      </Step>
    </Steps>
  </Tab>

  <Tab title="VS Code">
    <Steps>
      <Step title="Create the .vscode directory">
        Create a `.vscode` directory in your workspace root if it doesn't exist.
      </Step>

      <Step title="Create mcp.json">
        Create a file named `mcp.json` in the `.vscode` directory.
      </Step>

      <Step title="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" }
          }
        }
        ```
      </Step>

      <Step title="Start and authenticate">
        Click `Start` next to the MCP server name in the JSON file and authenticate when prompted.
      </Step>
    </Steps>
  </Tab>
</Tabs>

## Next Steps

* Follow a recipe in the [MCP Cookbook](/docs/reference/agent/mcp-cookbook), 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), [Experiments](/docs/reference/agent/mcp-experiments), and [Documentation](/docs/reference/agent/mcp-docs) server references.
