Feature flags are one of the few places where developers still context-switch away from their editor — you type the flag name in code, then jump to a dashboard to flip it, or paste a CLI command from a README.
Today we’re shipping @flagify/mcp, a Model Context Protocol server that closes that gap. Any MCP-compatible host — Claude Desktop, Claude Code, Cursor, Zed, Windsurf — can read and change your Flagify flags in the same conversation where you’re writing the code behind them.
What changed
Until today, Flagify’s AI integration was static. The flagify ai-setup command writes CLAUDE.md, .cursorrules, and Copilot instructions so your editor’s agent understands your flag conventions when it generates code. That’s useful, but it’s one-way: the agent writes code, then you take over to actually flip the flag.
MCP adds the runtime layer. The same agent can now call list_flags, create_flag, toggle_flag, update_targeting_rules, and get_audit_log directly. No copy-paste. No tab switch.
The 12 tools
| Tool | What it does |
|---|---|
list_flags | Every flag in the current project with per-env state |
get_flag | One flag in detail (fuzzy match on key or name) |
list_environments | Environment catalog for the project |
list_segments | Reusable user cohorts |
get_targeting_rules | Ordered rules for a flag in an environment |
get_audit_log | Workspace audit stream with filters + cursor |
create_flag | New flag (kebab-case key enforced) |
update_flag | Name / description / default / off value |
delete_flag | Archive a flag (soft-delete) |
toggle_flag | Enable/disable, rollout %, value override |
update_targeting_rules | Replace the full rule list for flag+env |
ping | Health check |
Mutations carry the MCP destructiveHint: true annotation, so hosts flag them in their 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.
Install in under a minute
The server reads your JWT from ~/.flagify/config.json. That’s the same file the Flagify CLI writes on flagify auth login, so if you’ve used the CLI, you’re already authenticated.
If you haven’t:
npm install -g @flagify/cli
flagify auth login
flagify projects pick
Then point your host at @flagify/mcp. For Claude Desktop, edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"flagify": {
"command": "npx",
"args": ["-y", "@flagify/mcp"]
}
}
}
Quit Claude Desktop (Cmd+Q) and reopen. That’s it — the flagify server shows up with 12 tools.
For other hosts (Claude Code, Cursor, Zed, Windsurf), the config shape is the same. Full per-host snippets are on the integration page.
What this feels like in practice
A few prompts that now work end-to-end:
-
“Create a boolean flag
new-checkout-flowand turn it on in staging.”
The agent callscreate_flag, waits for your confirm, thentoggle_flag. Reports back when both succeed. -
“Which flags are still off in production?”
list_flags→ client-side filter → plain-text answer. No card UI, no dashboard. -
“Something changed on
payments-v2last night — who did it?”
get_audit_logwithresource_type=flagand a time filter. The agent points at the exact event. -
“Roll out
dark-modeto 25% in prod.”
Onetoggle_flagcall. Host confirms because it’s destructive. Done.
Auth, tokens, and why API keys don’t work here
The MCP server only accepts JWTs. Flagify’s pk_* / sk_* API keys are rejected at startup — those are scoped to flag evaluation and can’t manage flags. The server catches them before the first tool call and tells you to run flagify auth login instead of producing a confusing 403 down the road.
When the access token expires, the server silently refreshes via /v1/auth/refresh, persists the rotated pair back to the config file, and retries. You don’t see a prompt; it just keeps going.
Why we built it
No other feature flag platform has an MCP server yet. LaunchDarkly, Statsig, Unleash, PostHog — all of them let you talk to their API, but none of them ship a stdio binary that Claude Desktop can plug into in one config line.
That gap won’t stay open for long. Shipping first matters for us because Flagify’s wedge has always been developer ergonomics — install in 2 minutes, not 2 weeks. Making the agent a first-class actor is the next step.
What’s next
V1 covers the tools a developer actually reaches for. V2 priorities, in rough order:
- A
logintool that triggers the browser-loopback flow on first use, for people who skip the CLI. - A batch
archive_flagsfor cleanup sessions. - HTTP+SSE transport for remote MCP hosts (only ~10% of users today, but the curve is moving).
- A Personal Access Token flow so CI jobs can use MCP without a browser.
If there’s an MCP tool you want that isn’t on that list, open an issue.
Try it
- Repo + source: github.com/flagifyhq/flagify-mcp
- npm:
npx -y @flagify/mcp - Integration page: flagify.dev/integrations/mcp
- Docs: AI Tools overview
Pair it with flagify ai-setup for the static context, and your editor’s agent is now a first-class flag operator.