Skip to main content

Installation

You can add the Statsig MCP with OAuth to Cursor in two ways: Click here 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:
{
  "mcpServers": {
    "statsig": {
      "url": "https://api.statsig.com/v1/mcp"
    }
  }
}
While we recommend setting up Statsig MCP via OAuth, you can also authenticate with your Console API key. Click here to quick install, or manually configure:
  1. Open Cursor settings
  2. Navigate to Settings > Cursor Settings > Tools & Integrations
  3. Find the MCP servers sections
  4. Add the below configuration to ~/.cursor/mcp.json
{
  "mcpServers": {
    "statsig": {
      "command": "npx mcp-remote https://api.statsig.com/v1/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 here. Ensure your API key has the right permissions — read-only keys can view data, while write keys can make changes to your project!

Authentication via OAuth and Verification

Cursor will automatically handle OAuth authentication when you first use the Statsig MCP. You’ll be prompted 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. Verify the connection by navigating to Settings > Cursor Settings > Tools & Integrations, where Statsig MCP server should be listed and active
The authentication will be saved for future sessions

Using Statsig MCP with Cursor

Once configured, 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

Next Steps