
Growthbook Mcp
io.github.growthbook由 GitHub 帳號 growthbook 發布v2.2.0更新於 Oct 25, 2026
Thin MCP server for GrowthBook — skill loader + authenticated API passthrough
概覽
輕量的 GrowthBook MCP 伺服器,讓助理讀取內建的 GrowthBook 技能,並以驗證方式呼叫 GrowthBook API 進行讀取或寫入。
- 可以做什麼
- 列出並讀取內建的 GrowthBook 技能,包含帶限定路徑的子工作流程,例如建立功能開關的指南,內容隨套件在本機提供。對任意 GrowthBook REST API 路徑送出帶驗證的 GET 請求並回傳原始回應內容。送出帶驗證的 POST、PUT、PATCH 與 DELETE 請求,可附帶 JSON 內容,用來建立、修改或刪除 GrowthBook 資源。對驗證失敗、自架環境 404 與速率限制回傳可據以處理的錯誤訊息。可選擇以獨立 HTTP 伺服器執行,提供受 OAuth 保護的端點,其中一條路徑只開放 API 工具。
- 適用情境
- 當助理需要檢視或修改 GrowthBook 帳戶中的專案、功能開關及其他 REST 資源,或依 GrowthBook 自帶的工作流程(例如建立功能開關)操作時使用。適用於雲端與自架的 GrowthBook,可透過 stdio 或 HTTP 連線。
- 執行需求
- 以 Node.js 本機程序執行,可用 npx 執行已發佈的 npm 套件,或從建置後的程式庫啟動。stdio 模式需要在 GB_API_KEY 中提供 GrowthBook API 金鑰或個人存取權杖。GB_API_URL 為選用,用來指向自架執行個體,預設使用 GrowthBook 公開 API。HTTP 模式另需設定 GB_MCP_URL,並在 GrowthBook API 上啟用 OAuth。需要能連線至 GrowthBook API 的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Growthbook Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
GrowthBook MCP Thin
A thin MCP server for GrowthBook with four tools:
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.
Cursor plugin
Install GrowthBook from the Cursor Marketplace. The plugin connects Cursor to the hosted server at https://mcp.growthbook.io/mcp; the first tool call opens a GrowthBook sign-in to authorize it. Self-hosted GrowthBook users should configure the server manually as described below.
The plugin is defined by .cursor-plugin/plugin.json and mcp.json. To test changes locally, copy the repo into ~/.cursor/plugins/local/growthbook and run Developer: Reload Window.
Install / run
Point your MCP client at the compiled entrypoint:
Or run the published package:
Environment variables
HTTP + OAuth mode
Clients 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:
stdio / process-wide: set env so skills are never registered:
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
scripts/bundle-skills.mjs copies the top-level skill tree from the canonical skills checkout, preserving structure:
Source path resolution:
SKILLS_SRCenv var (path to the skills repo root)agent-skills.local.json—{ "path": "../skills" }, relative to the repo root. Gitignored; copyagent-skills.local.json.exampleskills-src/— what CI and the Docker build vendor
There is no implicit sibling lookup. ../skills resolves to whatever happens to be at that path, which makes a local build silently disagree with the commit CI builds from.
CI, cloud deploys, and releases all read agent-skills.lock.json and check out
that exact skills commit. To ship upstream skill changes, update the commit in
the lock file. Local development can point at any checkout with
agent-skills.local.json or SKILLS_SRC.
The skills repo stays the source of truth — this package does not maintain a
fork of skill content. New skills flow through automatically, except those named
in the small blocklist in bundle-skills.mjs. Currently only gb-setup is
blocked because it configures the gb-call shell adapter rather than GrowthBook
itself.
Per-skill scripts/ directories are not copied. Relative
`references/foo.md` links are rewritten to qualified
`feature-flags/references/foo` paths so growthbook_read_skill can resolve
them.
Using skills with the API tools
Bundled skills still show workflows as:
This 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
- 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 limits - Freeform paths target the GrowthBook REST API
- Each request carries MCP usage headers (see Usage telemetry)
growthbook_list_skills / growthbook_read_skill
Only registered when GB_SKILLS_ENABLED is not disabled.
growthbook_list_skillsreturns top-level skill entry points. An entry may contain a complete workflow or route to child workflows.growthbook_read_skillaccepts a listed top-level name or a qualified child path named by a loaded skill (feature-flags/references/flag-create) and returns the full markdown (workflow + guardrails).
Usage telemetry
This server never sends telemetry anywhere itself. Instead, every REST call made by growthbook_api_read / growthbook_api_write includes headers that tell the GrowthBook instance it's talking to that the call came from the MCP:
GrowthBook records these through its existing product telemetry, so the same controls apply. On a self-hosted instance, setting DISABLE_TELEMETRY on the GrowthBook back-end turns this off along with the rest of GrowthBook's telemetry. Older GrowthBook versions ignore the headers. Skill tools (growthbook_list_skills / growthbook_read_skill) are served locally and make no requests, so they aren't tracked.
Development
Standalone 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, run npm run sync-version (updates manifest.json, server.json, and .cursor-plugin/plugin.json), then push a matching v* tag:
That 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 becomelatest- a 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
The Cursor plugin is not published by CI: Cursor re-reviews the plugin from the default branch after the version bump lands.
Install a release with npx @growthbook/mcp@<version> or pull ghcr.io/growthbook/growthbook-mcp:<version>.
來源:README.md,提交 847741a
工具
0版本歷史
2- v2.2.0最新Oct 6, 2026
- v2.1.0Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分