Get the FREE Ultimate OpenClaw Setup Guide →

growthbook

Official GrowthBook MCP server for creating flags, getting experiments, and more.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio growthbook-growthbook-mcp node path/to/server.js \
  --env GB_EMAIL="Your GrowthBook account email" \
  --env GB_API_KEY="Your GrowthBook API key or PAT" \
  --env GB_API_URL="https://api.growthbook.io" \
  --env GB_APP_ORIGIN="https://app.growthbook.io" \
  --env GB_HTTP_HEADER_*="Custom HTTP headers in the form GB_HTTP_HEADER_<NAME>=<value> (optional)"

How to use

The GrowthBook MCP server lets you interact with GrowthBook (such as querying experiment details and creating feature flags or experiments) directly from your LLM client via the MCP interface. After configuring the server, you can use the MCP commands to retrieve experiment data, view flag configurations, and perform common GrowthBook actions through natural language prompts. The server uses your GrowthBook API credentials to access the GrowthBook workspace and perform write operations according to your permissions. You can add custom HTTP headers through the GB_HTTP_HEADER_* environment variables to satisfy organizational auth or routing requirements. To get started, configure the required environment variables, start the server, and then send MCP requests through your AI tool of choice following the official GrowthBook MCP documentation for command formats and capabilities.

How to install

Prerequisites:

  • Node.js installed (v14+ recommended)
  • Access to a GrowthBook account with API key and email

Installation steps:

  1. Prepare environment variables file or export them in your shell:
  2. Obtain the GrowthBook MCP server code or package (as per your deployment method).
  3. If running from source (Node.js):
    • Install dependencies: npm install
    • Start the server: node path/to/server.js
    • Alternatively, use a package manager command if provided (e.g., npx or a docker option) per your setup.
  4. If you’re deploying via Docker or another runtime, follow your standard workflow to start the container with the required environment variables.
  5. Verify the server is listening on the expected port and test by sending a basic MCP query through your client.

Note: Replace path/to/server.js with the actual entry point of your GrowthBook MCP server application and ensure the environment variables are securely managed.

Additional notes

Tips and common considerations:

  • Ensure GB_API_KEY and GB_EMAIL are correct and have the necessary permissions for the actions you intend to perform (e.g., creating experiments or flags).
  • GB_API_URL and GB_APP_ORIGIN can be omitted if you’re using GrowthBook's default cloud endpoints; include them if you’re using a custom or self-hosted setup.
  • Use GB_HTTP_HEADER_* to pass through any organization-specific headers (e.g., auth tokens, tenant IDs). The headers are passed to all GrowthBook API requests.
  • Validate your MCP commands against GrowthBook MCP capabilities documentation to know which actions are supported and any permission limitations.
  • Monitor rate limits and error responses; implement retry logic in your client if needed.
  • Securely store API keys and avoid committing them to version control. Prefer environment management solutions for production deployments.

Related MCP Servers

Sponsor this space

Reach thousands of developers