MCP Server
Connect your AI tools directly to Flagsmith and let them manage your feature flags, segments, and releases. Whether you're using an IDE like Cursor, a CLI tool like Claude Code, or building your own AI agent that runs at any part of your CI/CD — the Flagsmith MCP Server gives your AI the power to work with your feature flag infrastructure.
What is MCP?
Model Context Protocol (MCP) is an open standard that lets AI assistants connect to external tools and services. Think of it as giving your AI a set of hands to actually do things, not just talk about them.
What Can You Do With It?
The MCP Server exposes the Flagsmith Admin API, giving your AI access to:
- Organisations & Projects — List and navigate your Flagsmith workspace
- Feature Flags — Create, update, and manage flags across environments
- Segments — Build and modify user segments for precise targeting
- Release Pipelines — Orchestrate controlled rollouts
- Change Requests — Create and manage approval workflows
- Multivariate Testing — Configure A/B test variations
- Feature Versioning — Work with v2 versioned feature states
Use it for human-in-the-loop workflows (asking your IDE assistant to toggle a flag), or fully automated pipelines (letting an agent manage progressive rollouts).
Installation
Getting started takes about 60 seconds. Head to our installation page and pick your client:
👉 Install the Flagsmith MCP Server
We support Cursor, Claude Code, Claude Desktop, Windsurf, Gemini CLI, Codex CLI, and 27+ more clients.
Configuration
You'll need an Organization API Key from Flagsmith:
- Go to Organization Settings in your Flagsmith dashboard
- Generate a new API Key
- Set your environment variable with the
Api-Keyprefix:
MCP_FLAGSMITH_TOKEN_AUTH="Api-Key YOUR_API_KEY_HERE"
⚠️ Important: The
Api-Keyprefix is required. Your token should look likeApi-Key ser.abc123..., not just the key itself.
Self-Hosted Flagsmith
Running your own Flagsmith instance? Point the MCP Server at your API:
MCP_FLAGSMITH_API_URL="https://your-flagsmith-instance.com/api/v1"
Example Use Cases
For Developers
- "Create a feature flag called
new_checkout_flowand turn it on in the staging environment" - "What segments exist in the mobile-app project?"
- "Add a multivariate option to the
button_colorflag"
For Release Managers
- "Show me all pending change requests for the production environment"
- "Add the
premium_featuresflag to the Q1 release pipeline" - "List all features that have been modified in the last week"
For DevOps & Automation
- Build agents that automatically create kill switches for new deployments
- Integrate flag validation and management into your CI/CD pipelines
- Automate segment updates based on external analytics data
Early Access — We Want Your Feedback! 🚀
This is an early release, and we're actively developing it alongside customers like you. Things might be rough around the edges, but that's where you come in.
Found a bug? Have an idea? Something confusing?
We'd love to hear from you - drop our support a message at support@flagsmith.com
Your feedback directly shapes what we build next. Let's make this awesome together.