growthbook-mcp — Claude Code MCP server: install
Connects an agent to GrowthBook for skill lookup and authenticated API operations. Useful when feature-flag workflows need to run from a coding client.
claude mcp add --env GB_API_KEY=<GB_API_KEY> --env GB_API_URL=<GB_API_URL> --env GB_SKILLS_ENABLED=<GB_SKILLS_ENABLED> --transport stdio growthbook-mcp -- npx -y @growthbook/mcpWhat growthbook-mcp does
growthbook-mcp exposes four tools: one lists available skills, another reads a skill or a nested workflow, and two pass requests to the GrowthBook API. Read and write operations use separate tools. The skill files are bundled from growthbook/skills during the build, while API calls stay inside the MCP server rather than invoking gb-call.
Stdio access requires GB_API_KEY, and GB_API_URL sets the API base address. You can run the published @growthbook/mcp package or build the server locally with npm install followed by npm run build. HTTP mode also requires GB_MCP_URL plus transport settings. Without GB_API_KEY, a stdio setup cannot authenticate with GrowthBook.
Set GB_SKILLS_ENABLED=false to register API tools only. Remote HTTP clients can use /mcp/api, which exposes the read and write API tools without the skill tools.
What it helps with
- look up GrowthBook workflows
- read data through the GrowthBook API
- send changes to GrowthBook objects
- keep API reads separate from writes
- run the server without skill tools
Example prompts for the agent
- Read the
feature-flagsskill and tell me which workflow fits a new flag. - Fetch the GrowthBook project list through the API and summarize the response.
- Create a feature flag from
payload.jsonusing the GrowthBook write API tool.
How to install growthbook-mcp
Platform CLI
claude mcp add --env GB_API_KEY=<GB_API_KEY> --env GB_API_URL=<GB_API_URL> --env GB_SKILLS_ENABLED=<GB_SKILLS_ENABLED> --transport stdio growthbook-mcp -- npx -y @growthbook/mcpReplace <…> with your own values
Platform CLI
codex mcp add growthbook-mcp --env GB_API_KEY=<GB_API_KEY> --env GB_API_URL=<GB_API_URL> --env GB_SKILLS_ENABLED=<GB_SKILLS_ENABLED> -- npx -y @growthbook/mcpReplace <…> with your own values
Config file
{
"mcpServers": {
"growthbook-mcp": {
"command": "npx",
"args": [
"-y",
"@growthbook/mcp"
],
"env": {
"GB_API_KEY": "<GB_API_KEY>",
"GB_API_URL": "<GB_API_URL>",
"GB_SKILLS_ENABLED": "<GB_SKILLS_ENABLED>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"growthbook-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@growthbook/mcp"
],
"env": {
"GB_API_KEY": "<GB_API_KEY>",
"GB_API_URL": "<GB_API_URL>",
"GB_SKILLS_ENABLED": "<GB_SKILLS_ENABLED>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e GB_API_KEY=<GB_API_KEY> -e GB_API_URL=<GB_API_URL> -e GB_SKILLS_ENABLED=<GB_SKILLS_ENABLED> growthbook-mcp npx -y @growthbook/mcpReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about growthbook-mcp
How do I install growthbook-mcp in Claude Code?
Run claude mcp add growthbook-mcp -- npx -y @growthbook/mcp, then run `claude mcp add --env GB_API_KEY=<GB_API_KEY> --env GB_API_URL=<GB_API_URL> --env GB_SKILLS_ENABLED=<GB_SKILLS_ENABLED> --transport stdio growthbook-mcp -- npx -y @growthbook/mcp`.
What does growthbook-mcp do?
It lists and reads GrowthBook skills, then forwards authenticated GET, POST, PUT, PATCH, and DELETE requests to the GrowthBook API through separate read and write tools.
What is required for stdio mode?
Set GB_API_KEY to a GrowthBook API key or personal access token. Use GB_API_URL when the API base address differs from the default.