Connect GrowthBook to Claude Code

Read and toggle feature flags, and read experiments and their results, in GrowthBook. Add Toolspoke to Claude Code once and it can use 14 GrowthBook actions. Your GrowthBook credential stays in Toolspoke, and you choose which actions Claude Code may call.

Set it up in Claude Code

Three steps, the first one once for every toolkit you will ever add.

  1. Add Toolspoke to Claude Code

    Run it in your project, then /mcp to sign in

    claude mcp add --transport http toolspoke https://toolspoke.com/mcp

    The sign-in opens in your browser, and Toolspoke asks you to approve it.

  2. Install GrowthBook and connect it

    Add GrowthBook to a project in your Toolspoke workspace.

    API key. You provide it once, when you install the connector. Toolspoke encrypts it at rest and decrypts it only for the length of a single call, and the gateway attaches it to the outbound request itself, so it is never part of the arguments an agent sends.

    API key
    GrowthBook → your avatar → Personal Access Tokens → Create token, which acts with your own access. An admin can instead create an organization key under Settings → API Keys and give it a role, a read-only role keeps this connector to reads.
  3. Choose what Claude Code may do

    All 14 actions start on. Switch off any of the 4 actions that change something in GrowthBook, and Claude Code gets a refusal if it tries.

What you can ask Claude Code for

A few of the GrowthBook actions that only read, so they are safe to try first.

  • List feature flags, optionally in one project
  • List experiments, optionally narrowed to a project or a status
  • Read one experiment, its hypothesis, variations, phases, metrics and status
  • Read the latest analysis of one experiment, each variation's metric values and the statistics comparing them

What Claude Code can do in GrowthBook

10 actions read, 3 write and one deletes or permanently changes something.

Reads

  • List features

    List feature flags, optionally in one project. Start here, the flag id is what every other feature action takes. It is also the install's connection test, because it needs a key that can read real data.

  • Get feature

    Read one feature flag in full, its default value, and per environment whether it is on and which rules it serves.

  • List experiments

    List experiments, optionally narrowed to a project or a status.

  • Get experiment

    Read one experiment, its hypothesis, variations, phases, metrics and status.

  • Get experiment results

    Read the latest analysis of one experiment, each variation's metric values and the statistics comparing them. Optionally for one phase or broken down by a dimension.

  • List projects

    List the projects in this organization. A project id narrows feature and experiment lists.

  • List environments

    List the environments in this organization, such as dev and production. Environment ids are the keys toggle_feature takes.

  • List metrics

    List the metrics experiments can be measured by, optionally in one project.

  • List saved groups

    List saved groups, named lists of user attributes, such as user ids or emails, that targeting rules refer to. Not written to the audit log, because the lists hold other people's identifiers.

  • List sdk connections

    List the SDK connections, which app reads which environment and project, and with which client key.

Writes

  • Create feature

    Create a feature flag. It serves its default value to everyone until rules are added, so a new flag changes no running app unless the default differs from what the code already assumes.

  • Update feature

    Change a feature flag's description, owner, project, tags or default value. Fields not sent are left alone.

  • Toggle feature

    Turn a flag on or off in one or more environments, e.g. environments {"production": true}. This changes what every SDK reading those environments serves at once. A write, not destructive, because sending the opposite value reverses it.

Deletes or permanently changes

  • Delete feature

    Delete a feature flag in every environment. Destructive because there is no undo and SDKs still reading it get no value from then on. Prefer update_feature with archived true to retire a flag reversibly.

GrowthBook in Claude Code: questions

Does Claude Code see my GrowthBook credential?

No. The credential is stored encrypted in Toolspoke, and the gateway adds it to each call. Claude Code only ever talks to Toolspoke, and the dashboard shows the last four characters of the credential and nothing more.

Can I stop Claude Code from changing things in GrowthBook?

Yes. Each of the 14 actions can be switched off for a project. Turn off the 4 that change something and Claude Code can only read.

Will 14 actions crowd Claude Code's context?

No. Toolspoke shows Claude Code five bridge tools, plus a guide where a toolkit has one, and Claude Code searches for the GrowthBook action it needs when it needs it. Adding more toolkits does not add more tools to its list.

Can I add it once for every project?

Yes. Add --scope user to the command and Claude Code keeps Toolspoke in every project on this machine. Without it, the server is added to the project you ran the command in.

What does it cost?

Tool calls are free on every plan, and a GrowthBook call does not run in a sandbox, so it bills nothing.

Try GrowthBook in Claude Code

Free to start, and tool calls cost nothing on any plan.