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:
- Claude Code opens a browser window
- Sign in to your Statsig account
- Authorize the MCP server to access your Statsig project
- Claude Code saves the authentication for future sessions
Verify the connection
After installation, verify the connection:
- Open Claude Code.
- Ask Claude to list your Statsig experiments or gates.
- 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
Related resources
- MCP capabilities
- Use cases for Statsig MCP
- Set up Statsig MCP in other tools: Cursor, Codex CLI
Was this helpful?