- Growthbook MCP Server
Growthbook MCP Server
GrowthBook is an open source feature flagging and experimentation platform.
Our official MCP Server lets you create and read feature flags, review experiments, set up SDK connections, search docs, generate types, and more.
Prerequisites
-
Node.js: Check if you have it by running node -v. Install it from nodejs.org
-
GrowthBook API Key: To create a new key, go to Settings → API Keys → New Secret Key. Use this key in the next step. Installation We cover how to connect the GrowthBook MCP server for the most popular tools below, but the installation steps are similar for most AI tools.
Configuration includes 4 environment variables. Here's what they mean:
| Variable Name | Status | Description |
|---|---|---|
| GB_API_KEY | Required | A GrowthBook API key. |
| GB_USER | Required | The name attached to any created flags. |
| GB_API_URL | Optional | Your GrowthBook API URL. Defaults to https://api.growthbook.io. |
| GB_APP_ORIGIN | Optional | Your GrowthBook app URL Defaults to https://app.growthbook.io. |
GrowthBook Cloud users only need to configure
GB_API_KEYandGB_USER.
Cursor
- Open Cursor Settings → MCP
- Click Add new global MCP server
- Add an entry for the GrowthBook MCP, following the pattern below:
{
"mcpServers": {
"growthbook": {
"command": "npx",
"args": ["-y", "@growthbook/mcp@latest"],
"env": {
"GB_API_KEY": "YOUR_API_KEY",
"GB_API_URL": "YOUR_API_URL",
"GB_APP_ORIGIN": "YOUR_APP_ORIGIN",
"GB_USER": "YOUR_NAME"
}
}
}
}
{
"mcpServers": {
"growthbook": {
"command": "cmd",
"args": ["/c", "npx", "-y", "@growthbook/mcp@latest"],
"env": {
"GB_API_KEY": "YOUR_API_KEY",
"GB_API_URL": "YOUR_API_URL",
"GB_APP_ORIGIN": "YOUR_APP_ORIGIN",
"GB_USER": "YOUR_NAME"
}
}
}
}
{
"mcpServers": {
"growthbook": {
"command": "wsl",
"args": ["npx", "-y", "@growthbook/mcp@latest"],
"env": {
"GB_API_KEY": "YOUR_API_KEY",
"GB_API_URL": "YOUR_API_URL",
"GB_APP_ORIGIN": "YOUR_APP_ORIGIN",
"GB_USER": "YOUR_NAME"
}
}
}
}
{
"mcpServers": {
"growthbook": {
"command": "npx",
"args": ["-y", "@growthbook/mcp@latest"],
"env": {
"GB_API_KEY": "YOUR_API_KEY",
"GB_API_URL": "YOUR_API_URL",
"GB_APP_ORIGIN": "YOUR_APP_ORIGIN",
"GB_USER": "YOUR_NAME"
}
}
}
}
- Save the settings.
You should now see a green active status after the server successfully connects!

VS Code
- Open User Settings (JSON)
- Add an MCP entry:
{
"servers": {
"growthbook": {
"command": "npx",
"args": ["-y", "@growthbook/mcp@latest"],
"env": {
"GB_API_KEY": "YOUR_API_KEY",
"GB_API_URL": "YOUR_API_URL",
"GB_APP_ORIGIN": "YOUR_APP_ORIGIN",
"GB_USER": "YOUR_NAME"
}
}
}
}
{
"servers": {
"growthbook": {
"command": "cmd",
"args": ["/c", "npx", "-y", "@growthbook/mcp@latest"],
"env": {
"GB_API_KEY": "YOUR_API_KEY",
"GB_API_URL": "YOUR_API_URL",
"GB_APP_ORIGIN": "YOUR_APP_ORIGIN",
"GB_USER": "YOUR_NAME"
}
}
}
}
{
"servers": {
"growthbook": {
"command": "wsl",
"args": ["npx", "-y", "@growthbook/mcp@latest"],
"env": {
"GB_API_KEY": "YOUR_API_KEY",
"GB_API_URL": "YOUR_API_URL",
"GB_APP_ORIGIN": "YOUR_APP_ORIGIN",
"GB_USER": "YOUR_NAME"
}
}
}
}
{
"servers": {
"growthbook": {
"command": "npx",
"args": ["-y", "@growthbook/mcp@latest"],
"env": {
"GB_API_KEY": "YOUR_API_KEY",
"GB_API_URL": "YOUR_API_URL",
"GB_APP_ORIGIN": "YOUR_APP_ORIGIN",
"GB_USER": "YOUR_NAME"
}
}
}
}
- Save your settings. In your file, a Start button will appear. Click it to the start the server.
In CoPilot Chat, you'll see a tool icon, indicating the server is connected successfully. GrowthBook MCP is now ready to use in VS Code.

Claude Desktop
- Open Settings → Developer
- Click Edit Config
- Open
claude_desktop_config.json - Add the following configuration:
{
"mcpServers": {
"growthbook": {
"command": "npx",
"args": ["-y", "@growthbook/mcp@latest"],
"env": {
"GB_API_KEY": "YOUR_API_KEY",
"GB_API_URL": "YOUR_API_URL",
"GB_APP_ORIGIN": "YOUR_APP_ORIGIN",
"GB_USER": "YOUR_NAME"
}
}
}
}
{
"mcpServers": {
"growthbook": {
"command": "cmd",
"args": ["/c", "npx", "-y", "@growthbook/mcp@latest"],
"env": {
"GB_API_KEY": "YOUR_API_KEY",
"GB_API_URL": "YOUR_API_URL",
"GB_APP_ORIGIN": "YOUR_APP_ORIGIN",
"GB_USER": "YOUR_NAME"
}
}
}
}
{
"mcpServers": {
"growthbook": {
"command": "wsl",
"args": ["npx", "-y", "@growthbook/mcp@latest"],
"env": {
"GB_API_KEY": "YOUR_API_KEY",
"GB_API_URL": "YOUR_API_URL",
"GB_APP_ORIGIN": "YOUR_APP_ORIGIN",
"GB_USER": "YOUR_NAME"
}
}
}
}
{
"mcpServers": {
"growthbook": {
"command": "npx",
"args": ["-y", "@growthbook/mcp@latest"],
"env": {
"GB_API_KEY": "YOUR_API_KEY",
"GB_API_URL": "YOUR_API_URL",
"GB_APP_ORIGIN": "YOUR_APP_ORIGIN",
"GB_USER": "YOUR_NAME"
}
}
}
}
- Save the config and restart Claude
A hammer icon will appear in the chat window, indicating that your GrowthBook MCP server is connected and available for use!
Next steps
Now that you're connected, start using GrowthBook's MCP tools directly from your editor to:
- Add new flags to your code and GrowthBook
- Generate type definitions for your flags for typesafe feature flagging
- Remove stale flags from your code automatically
- Search the GrowthBooks docs without leaving the editor
- Check out the GrowthBook MCP Server code on GitHub
Server Config
{
"mcpServers": {
"growthbook": {
"command": "npx",
"args": [
"-y",
"@growthbook/mcp"
],
"env": {
"GB_API_KEY": "YOUR_API_KEY",
"GB_USER": "YOUR_NAME"
}
}
}
}