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-flowand turn it on in staging.” Claude Desktop issuescreate_flagthentoggle_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-v2last night — who did it?”get_audit_logwith thesource: "mcp"filter, or no filter for the full trail. - “Roll out
dark-modeto 25% in prod.” The host confirms the destructive mutation before callingtoggle_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
- Repo: github.com/flagifyhq/flagify-mcp
- npm: @flagify/mcp
- README with full tool reference + troubleshooting: flagify-mcp#readme