Installation
On Claude Code, we recommend using OAuth and the HTTP transport directly. Run this command on the command line:- Add the Statsig MCP server to your Claude Code configuration
- Configure it to use HTTP transport with OAuth authentication
- Set up the connection to Statsig’s MCP endpoint
Using API key instead of OAuth
Using API key instead of OAuth
While we recommend setting up Statsig MCP via OAuth, you can also authenticate with your Console API key. Run this command on the command line: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
To authenticate via OAuth, run/mcp in Claude Code and follow the setup instructions:
- Claude Code will open a browser window
- Sign in to your Statsig account
- Authorize the MCP server to access your Statsig project
- The authentication will be saved for future sessions
Verification
After installation, you can verify the connection by:- Opening Claude Code
- Asking Claude to list your Statsig experiments or gates
- If configured correctly, Claude will be able to access your Statsig data
Using Statsig MCP with Claude Code
Once configured, 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
Next Steps
- Learn about MCP capabilities
- Explore use cases for Statsig MCP
- Set up Statsig MCP in other tools: Cursor, Codex CLI