
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
@flagdeck/mcp-server
Advanced tools
Model Context Protocol server for Flagdeck - enables AI agents to manage feature flags
Model Context Protocol (MCP) server for Flagdeck - enables AI agents like Claude, Cursor, and Windsurf to manage feature flags directly.
This is an MCP server that allows AI coding assistants to:
npm install -g @flagdeck/mcp-server
Set up your environment variables:
export FLAGDECK_API_KEY=your-api-key
export FLAGDECK_API_URL=https://api.flagdeck.com # optional, defaults to http://localhost:3008
export FLAGDECK_PROJECT_ID=your-project-id # optional, can be provided per-request
export FLAGDECK_ENVIRONMENT=production # optional, defaults to production
flagdeck-mcp
The server runs on stdio and communicates via the Model Context Protocol.
Add to your claude_desktop_config.json:
{
"mcpServers": {
"flagdeck": {
"command": "flagdeck-mcp",
"env": {
"FLAGDECK_API_KEY": "your-api-key",
"FLAGDECK_API_URL": "https://api.flagdeck.com",
"FLAGDECK_PROJECT_ID": "your-project-id"
}
}
}
}
Then in Claude Desktop:
You: "Create a dark mode feature flag"
Claude: *uses create_flag tool* Done! I've created the dark-mode flag.
You: "Roll it out to 25% of users"
Claude: *uses update_flag tool* Updated! Now rolling out to 25% of users.
You: "Check if it's enabled for user@example.com"
Claude: *uses evaluate_flag tool* Yes, it's enabled for that user.
Add to .cursor/mcp.json:
{
"servers": {
"flagdeck": {
"command": "flagdeck-mcp",
"env": {
"FLAGDECK_API_KEY": "your-api-key"
}
}
}
}
Add to Windsurf MCP configuration:
{
"servers": {
"flagdeck": {
"command": "npx @flagdeck/mcp-server",
"env": {
"FLAGDECK_API_KEY": "your-api-key"
}
}
}
}
list_projectsList all projects accessible to your API key.
Example:
"Show me all my projects"
get_projectGet details of a specific project.
Parameters:
projectId (optional): Project IDlist_environmentsList all environments in a project.
Parameters:
projectId (optional): Project IDlist_flagsList all feature flags in a project.
Parameters:
projectId (optional): Project IDstatus (optional): Filter by status (active/inactive/archived)search (optional): Search by name or keyExample:
"Show me all active flags"
"List flags containing 'checkout'"
get_flagGet details of a specific flag.
Parameters:
projectId (optional): Project IDflagId OR flagKey: Flag identifierExample:
"Show me the dark-mode flag"
create_flagCreate a new feature flag.
Parameters:
projectId (optional): Project IDkey (required): Unique flag keyname (required): Human-readable namedescription (optional): DescriptionvalueType (required): boolean | string | number | jsondefaultValue (required): Default valuetargetingRules (optional): Array of targeting rulesrolloutPercentage (optional): Rollout percentage (0-100)Example:
"Create a flag called 'new-checkout' with 25% rollout"
update_flagUpdate an existing flag.
Parameters:
projectId (optional): Project IDflagId (required): Flag IDname, description, status, defaultValue, targetingRules, rolloutPercentage (all optional)Example:
"Increase new-checkout rollout to 50%"
"Disable the dark-mode flag"
delete_flagPermanently delete a flag.
Parameters:
projectId (optional): Project IDflagId (required): Flag IDtoggle_flagToggle a flag between active and inactive.
Parameters:
projectId (optional): Project IDflagId (required): Flag IDarchive_flagArchive a flag (soft delete).
Parameters:
projectId (optional): Project IDflagId (required): Flag IDevaluate_flagEvaluate a flag for a specific user/context.
Parameters:
flagKey (required): Flag keycontext (required): User context object
userId, email, plan, country, etc.environment (optional): Environment nameExample:
"Check if dark-mode is enabled for user@example.com"
"Evaluate new-checkout for a user with plan=premium"
evaluate_batchEvaluate multiple flags at once.
Parameters:
flagKeys (required): Array of flag keyscontext (required): User contextenvironment (optional): Environment namecreate_flag_natural_languageCreate a flag using natural language.
Parameters:
projectId (optional): Project IDinput (required): Natural language descriptioncontext (optional): Additional contextExamples:
"Create a dark mode flag for premium users"
"Add a flag to roll out new checkout to 25% of users"
"Enable advanced analytics for users in US and CA"
update_flag_natural_languageUpdate a flag using natural language.
Parameters:
projectId (optional): Project IDinput (required): Natural language descriptioncontext (optional): Should include flagKeyExamples:
"Disable the dark-mode flag"
"Increase new-checkout rollout to 75%"
"Archive the old-payment-flow flag"
User: "Create a feature flag for beta users"
AI: I'll create a beta feature flag for you.
*uses create_flag_natural_language tool*
Result: Created flag 'beta-features' with targeting rule for users with plan=beta
User: "Create a new-ui flag and roll it out slowly"
AI: I'll create a new UI flag with a gradual rollout.
*uses create_flag tool with rolloutPercentage: 10*
User: "Increase it to 25%"
AI: I'll increase the rollout.
*uses update_flag tool*
Result: Rollout increased to 25%
User: "Create a premium-analytics flag only for enterprise users"
AI: I'll create that with enterprise targeting.
*uses create_flag_natural_language tool*
Result: Created flag with targeting rule: plan equals 'enterprise'
User: "Check if premium-analytics is enabled for user@company.com with plan enterprise"
AI: I'll evaluate that for you.
*uses evaluate_flag tool*
Result: {
flagKey: "premium-analytics",
value: true,
reason: "Matched targeting rule: plan equals enterprise"
}
If you're self-hosting Flagdeck:
export FLAGDECK_API_URL=https://your-flagdeck-instance.com
If you manage multiple projects, omit FLAGDECK_PROJECT_ID and provide it per-request:
"List flags in project proj-123"
The AI will include projectId: "proj-123" in the tool arguments.
"Evaluate dark-mode for user@example.com in staging environment"
git clone https://github.com/flagdeck/flagdeck.git
cd packages/@flagdeck/mcp-server
npm install
npm run build
npm run dev
npm test
| Environment Variable | Required | Default | Description |
|---|---|---|---|
FLAGDECK_API_KEY | Yes | - | Your Flagdeck API key |
FLAGDECK_API_URL | No | http://localhost:3008 | Flagdeck API URL |
FLAGDECK_PROJECT_ID | No | - | Default project ID |
FLAGDECK_ENVIRONMENT | No | production | Default environment |
| Tool | Purpose | Required Params |
|---|---|---|
list_projects | List all projects | - |
get_project | Get project details | - |
list_environments | List environments | - |
list_flags | List flags | - |
get_flag | Get flag details | flagId or flagKey |
create_flag | Create new flag | key, name, valueType, defaultValue |
update_flag | Update flag | flagId |
delete_flag | Delete flag | flagId |
toggle_flag | Toggle flag status | flagId |
archive_flag | Archive flag | flagId |
evaluate_flag | Evaluate single flag | flagKey, context |
evaluate_batch | Evaluate multiple flags | flagKeys, context |
create_flag_natural_language | AI-powered flag creation | input |
update_flag_natural_language | AI-powered flag update | input |
Set your API key:
export FLAGDECK_API_KEY=your-key-here
Either set FLAGDECK_PROJECT_ID or provide it in each request.
Check that FLAGDECK_API_URL is correct and the API is reachable:
curl $FLAGDECK_API_URL/health
Make sure you're using a compatible MCP client (Claude Desktop, Cursor, etc.) and the server is properly configured.
We welcome contributions! Please see our Contributing Guide.
MIT
Built with ❤️ by the Flagdeck team
FAQs
Model Context Protocol server for Flagdeck - enables AI agents to manage feature flags
The npm package @flagdeck/mcp-server receives a total of 4 weekly downloads. As such, @flagdeck/mcp-server popularity was classified as not popular.
We found that @flagdeck/mcp-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.