DevCycle MCP server for feature flag management
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
This repository contains the DevCycle CLI for managing feature flags from the command line, plus an MCP (Model Context Protocol) server that enables AI coding assistants to interact with DevCycle.
Major features include:
The CLI can be customized in several ways using command-line args or by creating a configuration file.
The DevCycle MCP (Model Context Protocol) server enables AI coding assistants like Cursor and Claude to manage feature flags directly from your development environment. DevCycle offers a hosted MCP server that requires no local installation.
Configure your AI assistant to use the hosted MCP server:
Cursor: Add to .cursor/mcp_settings.json:
Claude Desktop: Add to your Claude config file:
That's it! The server will guide you through OAuth authentication when you first use it.
Your AI assistant can now create, update, and manage feature flags on your behalf.
For local installation options, detailed configuration, available tools, and advanced usage, see the complete MCP documentation.
Using NPM
Or alternatively, using homebrew
Many of the CLI commands require DevCycle API authorization. There are several ways to provide these credentials.
By using the login sso command, the CLI will retrieve and store an access token, which is valid for 24 hours.
The login again command can be used to retrieve a new access token using the saved project and organization without prompting for them.
This process will open browser windows to interact with the DevCycle universal login page. It will first obtain a personal access token, then prompt you to choose an organization. A second browser window is used to authenticate the CLI with your chosen organization.
To switch organizations once logged in, the organizations select command can be used.
If executing the CLI in a containerized environment, please ensure one of the following PORTs can be accessed via Port Forwarding: 2194 (default), 2195, 2196 or 8080. This will allow the authentication process to complete and set the access token appropriately.
The repo init command behaves in the same way as login sso, but creates a repo configuration file and stores the project and organization choices there instead.
Use the dvc status command to find the configuration file location for your platform. The credentials can be stored in the file pointed to by the Auth config path. Create the file if it does not exist, with the following contents.
This file should not be checked in to version control.
The default location is based on the oclif configDir
If you intend to run the CLI using options that override config file locations, the dvc status command command can be run with those options to confirm that the file locations are as expected.
You also need to specify the default project ID for the CLI to use.
If there is a repo configuration file, the dvc diff and dvc usages commands will use the project defined there.
Otherwise, this is chosen during login or set using the project select command
Set the following environment variables:
The CLI can be run with the following arguments:
The Devcycle Github actions are configured with auth information through the project-key, client-id and client-secret configuration parameters. This is passed to the CLI via command line arguments.
dvc alias - Manage repository variable aliases.dvc autocomplete - display autocomplete installation instructionsdvc cleanup - Replace a DevCycle variable with a static value in the current version of your code. Currently only JavaScript is supported.dvc diff - Print a diff of DevCycle variable usage between two versions of your code.dvc environments - Create a new Environment for an existing Feature.dvc features - Create, view, or modify Features with the Management API.dvc generate - Generate Devcycle related files.dvc help - Display help for dvc.dvc identity - View or manage your DevCycle Identity.dvc keys - Retrieve SDK keys from the Management API.dvc login - Log in to DevCycle.dvc logout - Discards any auth configuration that has been stored in the auth configuration file.dvc organizations - List or switch organizations.dvc overrides - Create, view, or modify Overrides for a Project with the Management API.dvc projects - Create, or view Projects with the Management API.dvc repo - Manage repository configuration.dvc status - Check CLI status.dvc targeting - Create, view, or modify Targeting Rules for a Feature with the Management API.dvc usages - Print all DevCycle variable usages in the current version of your code.dvc variables - Create, view, or modify Variables with the Management API.dvc variations - Create a new Variation for an existing Feature.The following commands can only be run from the root of a configured repository
Many of the options available as command-line args can also be specified using a repo configuration file. The default
location for this file is <REPO ROOT>/.devcycle/config.yml.
This location can be overridden using the --repo-config-path flag.
The configuration file format is documented below:
When identifying variable usages in the code, the CLI will identify DevCycle SDK methods by default. To capture other usages you may define match patterns. Match patterns are defined by file extension.
:::note Each pattern must include exactly one capture group for the variable key. Capture the entire key value (including surrounding quotes if you choose the βwith quotesβ pattern). :::
Match patterns can be defined in the configuration file, for example:
Match patterns can capture variable keys with or without quotes, which affects whether aliases are needed:
With quotes:
dvcClient.variable('my-variable', default)'my-variable' (with quotes)Without quotes (aliases or generated constants required):
dvcClient.variable('my-variable', default)my-variableMatch patterns can also be passed directly to relevant commands using the --match-pattern flag:
When testing your regex the --show-regex flag can be helpful. This will print all patterns used to find matches in your codebase.
If you use wrapper functions around the SDK, add patterns for them.
Example: Custom wrapper functions
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/mcp-81)<a href="https://allmcps.com/mcp/mcp-81"><img src="https://allmcps.com/api/badge/mcp-81?style=directory" alt="Mcp on AllMCPs" /></a>