Get started

Integrations Model Context Protocol

Available Editor

Model Context Protocol

Manage flags from Claude Desktop, Cursor, Zed, and any MCP host.

What it does

@flagify/mcp is a stdio Model Context Protocol server. It exposes 12 tools — list_flags, create_flag, toggle_flag, update_targeting_rules, get_audit_log, and more — so any MCP-compatible host can read and change Flagify flags as part of a normal conversation.

This is different from flagify ai-setup. That command writes static context (.cursorrules, CLAUDE.md, Copilot instructions) so your editor’s AI understands your flag conventions. MCP adds the runtime layer: the agent can actually list flags, toggle them, rewrite targeting rules, or read the audit log against your live Flagify project.

Destructive tools (toggle_flag, delete_flag, update_flag, update_targeting_rules) carry the MCP destructiveHint: true annotation, so hosts flag them in the consent prompt. Every change lands in your audit log with source: "mcp", so MCP-driven edits are one filter away from CLI or console ones.

Use cases

  • “Create a boolean flag new-checkout-flow and turn it on in staging.” Claude Desktop issues create_flag then toggle_flag, asks you to confirm each mutation, and reports back.
  • “Which flags are still off in production?” The agent calls list_flags, filters client-side, and answers in plain text.
  • “Something changed on payments-v2 last night — who did it?” get_audit_log with the source: "mcp" filter, or no filter for the full trail.
  • “Roll out dark-mode to 25% in prod.” The host confirms the destructive mutation before calling toggle_flag.

Install

The MCP server reads your Flagify JWT from ~/.flagify/config.json — the same file the CLI writes. Install the CLI and log in once:

npm install -g @flagify/cli
flagify auth login
flagify projects pick

Then point your host at @flagify/mcp.

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json on macOS (or %APPDATA%\Claude\claude_desktop_config.json on Windows):

{
  "mcpServers": {
    "flagify": {
      "command": "npx",
      "args": ["-y", "@flagify/mcp"]
    }
  }
}

Fully quit Claude Desktop (Cmd+Q) and reopen.

Claude Code

Drop a .mcp.json at the root of any project:

{
  "mcpServers": {
    "flagify": {
      "command": "npx",
      "args": ["-y", "@flagify/mcp"]
    }
  }
}

Run /mcp inside Claude Code.

Cursor

Edit ~/.cursor/mcp.json:

{
  "mcpServers": {
    "flagify": {
      "command": "npx",
      "args": ["-y", "@flagify/mcp"]
    }
  }
}

Zed

Edit ~/.config/zed/settings.json:

{
  "context_servers": {
    "flagify": {
      "command": "npx",
      "args": ["-y", "@flagify/mcp"]
    }
  }
}

Windsurf

Edit ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "flagify": {
      "command": "npx",
      "args": ["-y", "@flagify/mcp"]
    }
  }
}

Auth

The MCP server only accepts JWTs. Flagify API keys (pk_*, sk_*) are rejected at bootstrap — those are scoped to flag evaluation and can’t manage flags. Use flagify auth login to get a JWT.

When the access token expires, the server silently refreshes via /v1/auth/refresh and writes the rotated pair back to ~/.flagify/config.json. You don’t see a prompt; it just keeps going.

Source + issues

Build your own with Flagify

If your tool could use feature flags, we'd like to partner. One form, one human reads it, reply within two business days.