On this page

Statsig MCP with Claude Code

Learn how to set up the Statsig MCP server in Claude Code.

Installation and authentication with OAuth

MCP OAuth only supports Personal Console API Keys. Ensure your Statsig org owner has enabled Personal Console API Keys creation for your role here{" "}

On Claude Code, use OAuth and the HTTP transport directly. Run this command:

bash
claude mcp add --transport http statsig https://api.statsig.com/v1/mcp

This command:

  • Adds the Statsig MCP server to your Claude Code configuration
  • Configures it to use HTTP transport with OAuth authentication
  • Sets up the connection to Statsig's MCP endpoint

To authenticate with OAuth, run /mcp in Claude Code and follow the setup instructions:

  1. Claude Code opens a browser window
  2. Sign in to your Statsig account
  3. Authorize the MCP server to access your Statsig project
  4. Claude Code saves the authentication for future sessions

Verify the connection

After installation, verify the connection:

  1. Open Claude Code.
  2. Ask Claude to list your Statsig experiments or gates.
  3. Confirm that Claude can access your Statsig data.

Using Statsig MCP with Claude Code

After configuration, you can interact with your Statsig data through Claude Code:

  • 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 you encounter issues:

  • Make sure you have the latest version of Claude Code
  • Verify your Statsig account has the necessary API permissions
  • Check that the MCP server URL is correct: https://api.statsig.com/v1/mcp
  • Try re-running the installation command

Was this helpful?