Skip to main content

MCP Server

The Flagsmith MCP Server gives AI assistants and agents programmatic access to the Flagsmith Admin API through the Model Context Protocol. Your assistant can manage feature flags, segments, multivariate options, and release workflows on your behalf — in a human-in-the-loop IDE session, or fully automated in a CI/CD pipeline.

It works with any MCP client that supports remote (Streamable HTTP) servers, including Claude Code, Claude Desktop, Cursor, and Codex.

Connecting to the server

The server is reachable over HTTP and you connect your client directly to it — there is nothing to install or run yourself.

DeploymentMCP URL
Flagsmith SaaS (cloud)https://mcp.flagsmith.com
Self-hosted / private cloudYour MCP server base URL

For self-hosted instances the MCP server is part of your Flagsmith deployment; use your MCP server base URL wherever the examples below use the SaaS URL.

Authentication

The server supports two authentication methods. Use whichever suits your client; both work side by side.

OAuth (interactive clients)

For interactive clients — IDEs, desktop apps, CLIs you drive by hand — OAuth is the simplest option, with no API keys to manage. The client discovers the OAuth configuration automatically from the MCP URL: on first connection it opens your browser, you log in to Flagsmith and authorise access, and the client stores the resulting token.

API key (CI and non-interactive agents)

For automation — CI jobs, headless agents — authenticate with an Organisation API key by sending it in the Authorization header:

Authorization: Api-Key <your-api-key>
caution

The Api-Key prefix is required. The header value should look like Api-Key ser.abc123…, not the key on its own.

Installing in your client

The examples below use the SaaS URL. For self-hosted, substitute your MCP server base URL.

claude mcp add --transport http flagsmith https://mcp.flagsmith.com

Then run /mcp in Claude Code to complete the OAuth login. For non-interactive use, pass the API key as a header instead:

claude mcp add --transport http flagsmith https://mcp.flagsmith.com \
--header "Authorization: Api-Key <your-api-key>"

Available tools

The tools available to your assistant depend on what your Flagsmith deployment has installed. The core tools below are available on every deployment. The enterprise tools require a paid SaaS plan or a self-hosted Enterprise deployment, and only appear when those features are present.

Core tools

ToolDescription
create_environment_feature_versionCreates a new version for a feature flag in a specific environment. Applies to environments with v2 feature versioning (use_v2_feature_versioning: true).
create_environment_feature_version_stateCreates a new feature state for a specific version in an environment. Applies to environments with v2 feature versioning (use_v2_feature_versioning: true).
create_featureCreates a new feature flag in the specified project with default settings.
create_feature_multivariate_optionCreates a new multivariate option for a feature flag.
create_organization_inviteSend an invitation to join the organisation with specified role and permissions.
create_project_segmentCreates a new user segment for audience targeting within the project.
create_segment_overrideCreates a segment override for a feature in an environment in a single call, setting both the segment binding and its value. Applies to environments without v2 feature versioning (use_v2_feature_versioning: false).
delete_feature_multivariate_optionDeletes a multivariate option.
delete_feature_segmentDeletes a segment override. Applies to environments without v2 feature versioning (use_v2_feature_versioning: false).
get_environment_feature_version_statesRetrieves feature state information for a specific version in an environment. Applies to environments with v2 feature versioning (use_v2_feature_versioning: true).
get_environment_feature_versionsRetrieves version information for a feature flag in a specific environment. Applies to environments with v2 feature versioning (use_v2_feature_versioning: true).
get_feature_code_referencesRetrieves code references and usage information for the feature flag.
get_feature_evaluation_dataRetrieves evaluation data and analytics for a specific feature flag.
get_feature_external_resourcesRetrieves external resources linked to the feature flag.
get_feature_flagRetrieves detailed information about a specific feature flag.
get_feature_health_eventsRetrieves feature health monitoring events and metrics for the project.
get_projectRetrieves comprehensive information about a specific project including configuration and statistics.
get_project_segmentRetrieves detailed information about a specific user segment.
list_environmentsLists all environments the user has access to
list_feature_multivariate_optionsRetrieves all multivariate options for a feature flag.
list_feature_segmentsLists segment overrides for a feature in an environment.
list_organization_groupsRetrieves all permission groups within the organisation.
list_organization_invitesRetrieves all pending invitations for the organisation.
list_organizationsLists all organisations accessible with the provided user API key.
list_project_environmentsRetrieves all environments configured for the specified project.
list_project_featuresLists a project's feature flags (paginated). Pass environment=<id> to also get each feature's live state for that environment in environment_feature_state, along with override counts. Works for both v1 and v2 versioned environments.
list_project_segmentsRetrieves all user segments defined for audience targeting within the project.
list_projects_in_organizationRetrieves all projects within a specified organisation.
publish_environment_feature_versionPublishes a feature version to make it live in the environment. Applies to environments with v2 feature versioning (use_v2_feature_versioning: true).
update_environment_feature_stateUpdates a feature state in an environment, including enabled status and value. Applies to environments without v2 feature versioning (use_v2_feature_versioning: false).
update_environment_feature_version_stateUpdates an existing feature state for a specific version in an environment. Applies to environments with v2 feature versioning (use_v2_feature_versioning: true).
update_featureUpdates feature flag properties such as name and description.
update_feature_multivariate_optionUpdates an existing multivariate option.
update_feature_stateUpdates a feature state, including its enabled status and value. Also updates a segment override's value for environments without v2 feature versioning (use_v2_feature_versioning: false).
update_projectUpdates project configuration settings such as the project name and feature visibility.
update_project_segmentUpdates an existing user segment's properties and rules.

Enterprise tools

Available on paid SaaS plans and self-hosted Enterprise deployments.

ToolDescription
add_feature_to_release_pipelineAdds a feature flag to a release pipeline for staged rollout.
create_environment_feature_change_requestCreates a new change request for feature flag modifications in an environment.
get_release_pipelineRetrieves detailed information about a specific release pipeline.
list_environment_change_requestsRetrieves all change requests for an environment.
list_organization_rolesRetrieves all custom roles defined within the organisation.
list_project_change_requestsRetrieves all change requests for a project.
list_project_release_pipelinesRetrieves all release pipelines configured for the specified project.

Migrating from the Gram-hosted server

Deprecation

The previous MCP server was hosted on Gram at https://app.getgram.ai/mcp/flagsmith-mcp. It is deprecated and will be shut down on 30 June 2026.

Point your client at https://mcp.flagsmith.com instead. Tool names are unchanged, so no other changes to your prompts or automations are needed. If you authenticated with a custom Mcp-Flagsmith-Token-Auth header, switch to the standard Authorization: Api-Key <key> header (or OAuth).

Example prompts

For developers:

  • "Create a feature flag called new_checkout_flow and turn it on in the staging environment."
  • "What segments exist in the mobile-app project?"
  • "Add a multivariate option to the button_color flag."

For release managers:

  • "Show me all pending change requests for the production environment."
  • "Add the premium_features flag to the Q1 release pipeline."

For DevOps and automation:

  • Build agents that 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 team a message at support@flagsmith.com.

Your feedback directly shapes what we build next. Let's make this awesome together.