GrowthBook MCP Server
OfficialThe GrowthBook MCP Server enables programmatic interaction with GrowthBook directly from your LLM client. You can:
Feature Flags: Create, fetch, and manage feature flags, including generating types and creating force rules
Experiments: Fetch details about experiments and user attributes for targeting
Environments: List all environments, which control feature flag states
Projects: List all projects in your GrowthBook instance
SDK Connections: Create and manage SDK connections for integrating with apps
User Attributes: List attributes tracked in GrowthBook for targeting
Documentation: Search GrowthBook documentation for usage guidance
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@GrowthBook MCP Servershow me the latest experiment results"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
GrowthBook MCP Thin
A thin MCP server for GrowthBook with four tools:
Tool | Purpose |
| List bundled GrowthBook agent skills (name + description) |
| Return the full skill markdown (workflow + guardrails) |
| Authenticated GET passthrough to the GrowthBook API |
| Authenticated POST/PUT/PATCH/DELETE passthrough |
Competence lives in the skills repo and is bundled at build time. Capability is split into read vs write API tools (no per-endpoint formatters) so clients can honor readOnlyHint / destructiveHint correctly.
Tools are prefixed with growthbook_ so they stay unambiguous when a client has multiple MCP servers loaded.
Install / run
npm install
npm run buildPoint your MCP client at the compiled entrypoint:
{
"mcpServers": {
"growthbook": {
"command": "node",
"args": ["/absolute/path/to/growthbook-mcp/server/index.js"],
"env": {
"GB_API_KEY": "your_api_key_or_pat",
"GB_API_URL": "https://api.growthbook.io"
}
}
}
}Or run the published package:
npx @growthbook/mcpRelated MCP server: BrowserStack MCP server
Environment variables
Variable | Required | Default | Purpose |
| Yes for stdio; optional for HTTP OAuth | — | GrowthBook API key or personal access token |
| No |
| API base URL (self-hosted) and default OAuth AS issuer |
| No |
|
|
| No |
| HTTP listen port (when transport=http) |
| No |
| HTTP bind host |
| Yes for HTTP | — | Public MCP base URL stamped into OAuth resource metadata (server refuses to start in HTTP mode without it) |
| No |
| GrowthBook OAuth AS issuer URL |
| No | — | Extra request headers (e.g. |
| No |
| Set to |
HTTP + OAuth mode
OAUTH_AS_ENABLED=1 # on the GrowthBook API
GB_MCP_TRANSPORT=http GB_API_URL=http://localhost:3100 GB_MCP_PORT=3333 npm startClients connect to:
http://127.0.0.1:3333/mcp— full (skills + API read/write)http://127.0.0.1:3333/mcp/api— capability-only (growthbook_api_read+growthbook_api_write)
Unauthenticated requests receive 401 with WWW-Authenticate pointing at /.well-known/oauth-protected-resource, which advertises the GrowthBook Authorization Server.
Before handling MCP, the server probes GrowthBook REST (GET /api/v1/) with the bearer. A 401 from that probe (or later from an API tool) yields HTTP 401 with error="invalid_token" so the MCP client can refresh — instead of surfacing "This API key has expired" as a tool error. A 403 is treated as an accepted bearer (permission denied ≠ invalid token) so clients are not forced into a refresh loop.
Capability-only mode
HTTP (recommended for remote): point the client at /mcp/api instead of /mcp:
{
"mcpServers": {
"growthbook": {
"url": "http://127.0.0.1:3333/mcp/api"
}
}
}Path | Tools |
|
|
|
|
stdio / process-wide: set env so skills are never registered:
"env": {
"GB_API_KEY": "...",
"GB_SKILLS_ENABLED": "false"
}When skills are disabled, only the API read/write tools are registered. growthbook_list_skills and growthbook_read_skill are not exposed.
How skills are bundled
npm run build # tsc && bundle-skillsscripts/bundle-skills.mjs copies every skills/*/SKILL.md from the canonical skills checkout into server/skills/<name>.md.
Source path resolution:
SKILLS_SRCenv var (path to the skills repo root), or../skills(sibling directory)
The skills repo stays the source of truth — this package never forks skill content.
Using skills with the API tools
Bundled skills still show workflows as:
gb-call GET /api/v1/projects
gb-call POST /api/v2/features ./payload.jsonThis MCP server does not shell out to gb-call. Map GET → growthbook_api_read and POST/PUT/PATCH/DELETE → growthbook_api_write with the same path and optional JSON body string. Server instructions and growthbook_read_skill output include this bridge note.
Tools detail
growthbook_api_read / growthbook_api_write
{ "path": "/api/v1/projects" }
{ "method": "POST", "path": "/api/v2/features", "body": "{\"id\":\"my-flag\",...}" }Read: GET only (
readOnlyHint: true)Write:
POST|PUT|PATCH|DELETE(destructiveHint: true)Returns raw response body on 2xx
On non-2xx, returns an actionable error (
isError: true) covering auth failures, self-hosted 404 hints, and rate limitsFreeform paths target the GrowthBook REST API
growthbook_list_skills / growthbook_read_skill
Only registered when GB_SKILLS_ENABLED is not disabled. growthbook_read_skill returns the full SKILL.md content so the agent can follow workflow steps and guardrails.
Development
# Requires a sibling checkout at ../skills (or SKILLS_SRC)
npm install
npm run build
npm startStandalone HTTP mode
By default the server runs over stdio. Set GB_MCP_TRANSPORT=http to run it as a standalone HTTP server that exposes MCP at /mcp (skills + API tools) and /mcp/api (capability-only), behind an OAuth 2.0 protected-resource surface (RFC 9728 metadata + RFC 6750 WWW-Authenticate).
GB_MCP_URL(required in HTTP mode) — the server's public base URL. It is stamped into the OAuth resource (audience) and the protected-resource metadata, so it is never derived from request headers. The server refuses to start without it.GB_MCP_PORT(default3333) andGB_MCP_HOST(default127.0.0.1).Incoming bearers are validated by probing the GrowthBook REST API; a rejected token gets HTTP
401+WWW-Authenticateso the client can refresh.
Run it on a trusted network or bound to loopback. For a multi-tenant or public deployment, front it with your own gateway/auth.
Releases
Cutting a release is deliberate: bump the version in package.json, then push a matching v* tag:
git tag v2.0.0
git push origin v2.0.0That tagged commit (with skills frozen at cut time) publishes:
@growthbook/mcpto npm — prereleases (versions with a-, e.g.2.0.0-beta.1) go under thebetadist-tag; stable versions becomelatesta multi-arch (
amd64+arm64) image toghcr.io/growthbook/growthbook-mcp(:<version>, plus:<major>,:<major>.<minor>, and:latestfor stable releases)an entry in the MCP registry
a GitHub Release
Install a release with npx @growthbook/mcp@<version> or pull ghcr.io/growthbook/growthbook-mcp:<version>.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Apache 2.0
- AlicenseBqualityBmaintenanceBrowserStack's Official MCP Server59,547150AGPL 3.0
- Apache 2.0
- MIT
Related MCP Connectors
MCP server for interacting with the Supabase platform
MCP (Model Context Protocol) server for Appwrite
Remote MCP server for the Hackle Admin API: experiments, feature flags, remote config, messaging.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/growthbook/growthbook-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server