---
title: Statsig MCP with Cursor
description: Learn how to set up the Statsig MCP server in Cursor IDE.
product: general
lang: en
token_estimate: 840
---
# Statsig MCP with Cursor

> For AI agents: a documentation index is available at [/llms.txt](/llms.txt). Append `.md` to any page URL for markdown, or send `Accept: text/markdown`.

## Installation and authentication with OAuth

> **Note:**
>
> MCP OAuth only supports Personal Console API Keys. Ensure your Statsig org owner has enabled Personal Console API Keys creation for your role in [organization settings](https://console.statsig.com/settings?tab=organization).

You can add the Statsig MCP with OAuth to Cursor in two ways:

### Option 1: Quick install (recommended)

Use the [install link](cursor://anysphere.cursor-deeplink/mcp/install?name=statsig&config=eyJ1cmwiOiJodHRwczovL2FwaS5zdGF0c2lnLmNvbS92My9tY3AifQ%3D%3D) to automatically add the Statsig MCP to Cursor.

### Option 2: Manual configuration

1. Open Cursor settings.
2. Navigate to _Settings > Cursor Settings > Tools & Integrations_.
3. Find the MCP servers section.
4. Add the following configuration to `~/.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "statsig": {
      "url": "https://api.statsig.com/v3/mcp"
    }
  }
}
```

Cursor automatically handles OAuth authentication when you first use the Statsig MCP. Cursor prompts you to:

1. Sign in to your Statsig account.
2. Authorize the MCP server to access your Statsig project.
3. Restart Cursor to apply the changes.
4. Navigate to _Settings > Cursor Settings > Tools & Integrations_ and verify that the Statsig MCP server appears and is active.

Cursor saves the authentication for future sessions.

#### Using API key instead of OAuth

OAuth is the recommended setup, but you can also authenticate with your Console API key. Use the [quick install link](cursor://anysphere.cursor-deeplink/mcp/install?name=statsig&config=eyJjb21tYW5kIjoibnB4IG1jcC1yZW1vdGUgaHR0cHM6Ly9hcGkuc3RhdHNpZy5jb20vdjMvbWNwIC0taGVhZGVyIHN0YXRzaWctYXBpLWtleToke0FVVEhfVE9LRU59IiwiZW52Ijp7IkFVVEhfVE9LRU4iOiJpbnNlcnQteW91ci1hcGkta2V5LWhlcmUifX0%3D), or configure it manually:

1. Open Cursor settings.
2. Navigate to _Settings > Cursor Settings > Tools & Integrations_.
3. Find the MCP servers section.
4. Add the following configuration to `~/.cursor/mcp.json`.

```json
{
  "mcpServers": {
    "statsig": {
      "command": "npx mcp-remote https://api.statsig.com/v3/mcp --header statsig-api-key:${AUTH_TOKEN}",
      "env": {
        "AUTH_TOKEN": "console-YOUR-CONSOLE-API-KEY"
      }
    }
  }
}
```

Replace `console-YOUR-CONSOLE-API-KEY` with your actual Statsig Console API key, which you can retrieve from the [API keys page](https://console.statsig.com/api_keys). Ensure your API key has the right permissions: read-only keys can view data, while write keys can make changes to your project.

## Using Statsig MCP with Cursor

After configuration, you can use Statsig MCP commands in Cursor's chat interface:

- **Query Experiments**: "What experiments are currently running?"
- **Manage Gates**: "List all my feature flags"
- **Get Details**: "Show me the configuration for gate 'new-feature'"
- **Create Entities**: "Create a new experiment called 'checkout-test'"

## Troubleshooting

If the MCP server doesn't appear:

- Make sure you've restarted Cursor after adding the configuration.
- Check that the `mcp.json` file is in the correct location: `~/.cursor/mcp.json`.
- Verify your Statsig account has the necessary permissions.

