Star
Flip flags using AI

MCP server

Ask for a rollout in plain words. featurekit-mcp finds the flag, works out the weights, makes the change through the admin API, and tells you what the flag serves now.

You:    Roll out cart v2 page to 20% of users in production.

      Agent:  Done. cart-v2-page in production: 20% get true, the rest get
              false. The flag was off; it is now on.

              ⚠ production is a PRODUCTION environment: this change is live
              for real users now.

It acts through a personal access token and nothing else, so it can do exactly what that token can do with curl. Every change lands in the audit log marked via featurekit-mcp.

Set it up

  1. Create a token Scope it, so a leaked config can't reach production.

    In the dashboard, Settings → Personal access tokens, or POST /v1/admin/tokens. Give it an expiry, and limit it to the environments the agent should touch.

  2. Add the server

    claude mcp add featurekit \
            --env FEATUREKIT_URL=https://flags.acme.com \
            --env FEATUREKIT_TOKEN=fk_pat_... \
            --env FEATUREKIT_MCP_WRITE=1 \
            -- npx -y featurekit-mcp
    {
            "mcpServers": {
              "featurekit": {
                "command": "npx",
                "args": ["-y", "featurekit-mcp"],
                "env": {
                  "FEATUREKIT_URL": "https://flags.acme.com",
                  "FEATUREKIT_TOKEN": "fk_pat_...",
                  "FEATUREKIT_MCP_WRITE": "1"
                }
              }
            }
          }
  3. Ask

    Start with something read-only, like "what flags do we have for checkout?"

VariableWhat it does
FEATUREKIT_URLThe control plane. Required.
FEATUREKIT_TOKENA personal access token. Required.
FEATUREKIT_MCP_WRITE1 allows changes. Without it the server only reads.
FEATUREKIT_PROJECTDefault project key. Can be left out when there's one project.
FEATUREKIT_ENVIRONMENTDefault environment key. Without it, every change has to name one.

Needs Node 20+ and a running control plane. It runs over stdio on your machine; there's no hosted endpoint.

What you can ask

You sayTool
"What flags do we have for checkout?"find_flags
"What does cart v2 page serve in staging?"get_flag
"Roll out cart v2 page to 20% of users"set_rollout
"Bump it to 50%"set_rollout
"Turn cart v2 on for everyone"serve_variation
"Kill cart v2 in production"turn_flag_off
"Create a flag for the new search page"create_flag
"Only for users in the Netherlands"update_flag_config
"Who changed cart v2 last?"get_audit_log
"Undo that"revert_flag

There are also list_projects, list_environments and turn_flag_on.

How it behaves

  • It asks instead of guessing. When "cart v2" matches two flags, or a change names no environment and there's no default, it lists the choices and changes nothing.
  • Raising a rollout keeps everyone who had it. It reuses the existing bucketing, so going from 20% to 50% adds 30% and leaves the first 20% where they were.
  • It can't overwrite someone's edit. Every write sends the version it just read. If someone changed the flag in between, the write is refused and the agent reads it again.
  • Production changes go through, with a warning in capitals.
  • Targets and rules still win. A rollout covers everyone they don't match, and the reply says so.
Not yet

Segments, scheduled changes and change requests aren't tools yet. Use the dashboard or the admin API for those.