unleash-mcp — Claude Code MCP server for Unleash flags
An MCP server that lets a coding assistant create and manage Unleash feature flags. Handy when a change needs to sit behind a flag while you write it.
claude mcp add --env UNLEASH_BASE_URL=<UNLEASH_BASE_URL> --env UNLEASH_PAT=<UNLEASH_PAT> --env UNLEASH_DEFAULT_PROJECT=<UNLEASH_DEFAULT_PROJECT> --env UNLEASH_MCP_SEND_FEEDBACK=<UNLEASH_MCP_SEND_FEEDBACK> --env UNLEASH_FEEDBACK_URL=<UNLEASH_FEEDBACK_URL> --transport stdio unleash-mcp -- npx -y @unleash/mcpWhat unleash-mcp does
The server exposes tools that talk to the Unleash Admin API. An assistant can create a flag, look for one that already exists so you don't end up with duplicates, score the risk of a change, and get guidance on wrapping that change in a flag. Other tools return a flag's metadata, its recent edits from the event log, and an explanation of which strategies matched when the flag is evaluated against a context.
The intended order of work is: judge whether the change needs a flag, check for an existing one, create it, then pull the language-specific code for using it. Rollout tools cover percentage, segments, constraints and whether an environment is on; lifecycle tools complete, archive, revive or mark a flag stale.
You need Node.js 22 or higher, pnpm or npm, an Unleash instance and a personal access token allowed to create flags. No token, no server. An experimental option connects over HTTP to the remote MCP built into your Unleash instance, which has to be enabled there first. The send_feedback tool reports a broken call back to Unleash, and only after the user agrees; setting UNLEASH_MCP_SEND_FEEDBACK=false keeps it out of the tool list.
What it helps with
- create a feature flag without opening the Unleash UI
- check whether a flag already exists and reuse it
- decide if a code change needs a flag at all
- see who changed a flag and when, per environment
- turn a flag off in one environment or drop its strategy
Example prompts for the agent
- Evaluate this change and tell me whether it needs a feature flag
- Create a flag called
new-checkoutin thewebproject and show how to wrap the code - Roll out
new-checkoutto 10 percent of users in staging
How to install unleash-mcp
Platform CLI
claude mcp add --env UNLEASH_BASE_URL=<UNLEASH_BASE_URL> --env UNLEASH_PAT=<UNLEASH_PAT> --env UNLEASH_DEFAULT_PROJECT=<UNLEASH_DEFAULT_PROJECT> --env UNLEASH_MCP_SEND_FEEDBACK=<UNLEASH_MCP_SEND_FEEDBACK> --env UNLEASH_FEEDBACK_URL=<UNLEASH_FEEDBACK_URL> --transport stdio unleash-mcp -- npx -y @unleash/mcpReplace <…> with your own values. 1 more environment variable is in the server README
Platform CLI
codex mcp add unleash-mcp --env UNLEASH_BASE_URL=<UNLEASH_BASE_URL> --env UNLEASH_PAT=<UNLEASH_PAT> --env UNLEASH_DEFAULT_PROJECT=<UNLEASH_DEFAULT_PROJECT> --env UNLEASH_MCP_SEND_FEEDBACK=<UNLEASH_MCP_SEND_FEEDBACK> --env UNLEASH_FEEDBACK_URL=<UNLEASH_FEEDBACK_URL> -- npx -y @unleash/mcpReplace <…> with your own values. 1 more environment variable is in the server README
Config file
{
"mcpServers": {
"unleash-mcp": {
"command": "npx",
"args": [
"-y",
"@unleash/mcp"
],
"env": {
"UNLEASH_BASE_URL": "<UNLEASH_BASE_URL>",
"UNLEASH_PAT": "<UNLEASH_PAT>",
"UNLEASH_DEFAULT_PROJECT": "<UNLEASH_DEFAULT_PROJECT>",
"UNLEASH_MCP_SEND_FEEDBACK": "<UNLEASH_MCP_SEND_FEEDBACK>",
"UNLEASH_FEEDBACK_URL": "<UNLEASH_FEEDBACK_URL>"
}
}
}
}Replace <…> with your own values. 1 more environment variable is in the server README
Config file
{
"servers": {
"unleash-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@unleash/mcp"
],
"env": {
"UNLEASH_BASE_URL": "<UNLEASH_BASE_URL>",
"UNLEASH_PAT": "<UNLEASH_PAT>",
"UNLEASH_DEFAULT_PROJECT": "<UNLEASH_DEFAULT_PROJECT>",
"UNLEASH_MCP_SEND_FEEDBACK": "<UNLEASH_MCP_SEND_FEEDBACK>",
"UNLEASH_FEEDBACK_URL": "<UNLEASH_FEEDBACK_URL>"
}
}
}
}Replace <…> with your own values. 1 more environment variable is in the server README
Platform CLI
gemini mcp add -e UNLEASH_BASE_URL=<UNLEASH_BASE_URL> -e UNLEASH_PAT=<UNLEASH_PAT> -e UNLEASH_DEFAULT_PROJECT=<UNLEASH_DEFAULT_PROJECT> -e UNLEASH_MCP_SEND_FEEDBACK=<UNLEASH_MCP_SEND_FEEDBACK> -e UNLEASH_FEEDBACK_URL=<UNLEASH_FEEDBACK_URL> unleash-mcp npx -y @unleash/mcpReplace <…> with your own values. 1 more environment variable is in the server README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about unleash-mcp
How do I install unleash-mcp in Claude Code?
Run claude mcp add unleash-mcp -e UNLEASH_BASE_URL=<UNLEASH_BASE_URL> -e UNLEASH_PAT=<UNLEASH_PAT> -- npx -y @unleash/mcp from the root of the project that should use the server.
What does unleash-mcp do?
It gives an assistant tools for the Unleash Admin API: creating and finding flags, scoring a change, setting up rollout and targeting, reading flag state and history, and moving a flag through its lifecycle.
What does unleash-mcp need to run?
Node.js 22 or higher, pnpm or npm, an Unleash instance, and a personal access token that may create flags. The token goes into the UNLEASH_PAT variable.