DevCycle MCP Reference
This page provides comprehensive documentation for all DevCycle MCP tools. For setup instructions, see MCP Getting Started.
Available Tools
The DevCycle MCP Server provides comprehensive feature flag management capabilities through tools organized into 6 categories:
- Feature Management
- Variable Management
- Environment Management
- Project Management
- Self-Targeting & Overrides
- Results & Analytics
Production Safety
- Tools marked ⚠️ can affect production - confirm before proceeding
- Tools marked ⚠️⚠️ are destructive - require extra confirmation
Feature Management
list_features
List all features in the current project with optional search and pagination.
Parameters:
search
(optional): Search query to filter featurespage
(optional): Page number (default: 1)per_page
(optional): Items per page (default: 100, max: 1000)
create_feature
⚠️
Create a new feature flag.
Parameters:
key
: Unique feature key (pattern:^[a-z0-9-_.]+$
)name
: Human-readable name (max 100 chars)description
(optional): Feature description (max 1000 chars)type
(optional): Feature type (release
,experiment
,permission
,ops
)tags
(optional): Array of tags for organizationvariations
(optional): Array of variations with key, name, and variablesconfigurations
(optional): Environment-specific configurationssdkVisibility
(optional): SDK visibility settings
update_feature
⚠️
Update an existing feature flag.
Parameters:
key
: Feature key to updatename
(optional): New namedescription
(optional): New descriptiontype
(optional): New typetags
(optional): New tagsvariations
(optional): Updated variations
update_feature_status
⚠️
Update the status of a feature flag.
Parameters:
key
: Feature keystatus
: New status (active
,complete
,archived
)staticVariation
(optional): Variation to serve if status iscomplete
delete_feature
⚠️⚠️
Delete a feature flag from ALL environments.
Parameters:
key
: Feature key to delete
fetch_feature_variations
Get all variations for a feature.
Parameters:
feature_key
: Feature key
create_feature_variation
⚠️
Create a new variation within a feature.
Parameters:
feature_key
: Feature keykey
: Unique variation keyname
: Variation namevariables
(optional): Variable values for this variation
update_feature_variation
⚠️
Update an existing variation by key.
Parameters:
feature_key
: Feature keyvariation_key
: Variation to update_id
(optional): MongoDB ID for the variationkey
(optional): New variation keyname
(optional): New variation namevariables
(optional): Updated variable values
set_feature_targeting
⚠️
Set targeting status (enable or disable) for a feature in an environment.
Parameters:
feature_key
: Feature keyenvironment_key
: Environment keyenabled
: Boolean - true to enable targeting, false to disable
get_feature_audit_log_history
Get feature flag audit log history from DevCycle. Returns audit log entities matching the DevCycle API schema with date, a0_user, and changes fields.
Parameters:
feature_key
: Feature keypage
(optional): Page number for pagination (default: 1)perPage
(optional): Number of items per page (default: 100, max: 1000)sortBy
(optional): Field to sort by (createdAt
,updatedAt
,action
,user
) (default:createdAt
)sortOrder
(optional): Sort order (asc
,desc
) (default:desc
)startDate
(optional): Start date for filtering (ISO 8601 format)endDate
(optional): End date for filtering (ISO 8601 format)environment
(optional): Environment key to filter byuser
(optional): User ID to filter byaction
(optional): Action type to filter by
list_feature_targeting
List targeting rules for a feature.
Parameters:
feature_key
: Feature keyenvironment_key
(optional): Specific environment (returns all if omitted)
update_feature_targeting
⚠️
Update targeting rules for a feature in an environment.
Parameters:
feature_key
: Feature keyenvironment_key
: Environment keystatus
(optional): Targeting status (active
,inactive
,archived
)targets
(optional): Array of targeting rules with audience filters and distributions
Variable Management
list_variables
List all variables in the current project.
Parameters:
search
(optional): Search querypage
(optional): Page numberper_page
(optional): Items per page
create_variable
⚠️
Create a new variable.
Parameters:
key
: Unique variable key (pattern:^[a-z0-9-_.]+$
)type
: Variable type (String
,Boolean
,Number
,JSON
)name
(optional): Variable namedescription
(optional): Variable descriptiondefaultValue
(optional): Default value_feature
(optional): Associated feature keyvalidationSchema
(optional): Validation rules
update_variable
⚠️
Update an existing variable.
Parameters:
key
: Variable key to updatename
(optional): New namedescription
(optional): New descriptiontype
(optional): New typevalidationSchema
(optional): New validation rules
delete_variable
⚠️⚠️
Delete a variable from ALL environments.
Parameters:
key
: Variable key to delete
Environment Management
list_environments
List all environments in the current project.
Parameters:
search
(optional): Search query (min 3 chars)page
(optional): Page numberperPage
(optional): Items per pagesortBy
(optional): Sort fieldsortOrder
(optional): Sort order (asc
,desc
)
get_sdk_keys
Get SDK keys for an environment.
Parameters:
environmentKey
: Environment keykeyType
(optional): Specific key type (mobile
,server
,client
)
Project Management
list_projects
List all projects in the organization.
Parameters:
search
(optional): Search querypage
(optional): Page number (default: 1)perPage
(optional): Items per page (default: 100, max: 1000)sortBy
(optional): Sort field (createdAt
,updatedAt
,name
,key
,createdBy
)sortOrder
(optional): Sort order (asc
,desc
)createdBy
(optional): Filter by creator user ID
get_current_project
Get details of the currently selected project.
Parameters: None
Self-Targeting & Overrides
get_self_targeting_identity
Get current DevCycle identity for self-targeting.
Parameters: None
update_self_targeting_identity
Update DevCycle identity for testing.
Parameters:
dvc_user_id
: DevCycle User ID (use empty string to clear)
list_self_targeting_overrides
List all active overrides for the current project.
Parameters: None
set_self_targeting_override
⚠️
Set an override to test a specific variation.
Parameters:
feature_key
: Feature keyenvironment_key
: Environment keyvariation_key
: Variation to serve
clear_feature_self_targeting_overrides
⚠️
Clear overrides for a specific feature/environment.
Parameters:
feature_key
: Feature keyenvironment_key
: Environment key
Results & Analytics
get_feature_total_evaluations
Get total variable evaluations per time period for a specific feature.
Parameters:
featureKey
: Feature keystartDate
(optional): Start date as Unix timestamp (milliseconds since epoch)endDate
(optional): End date as Unix timestamp (milliseconds since epoch)platform
(optional): Platform filter for evaluation resultsvariable
(optional): Variable key filter for evaluation resultsenvironment
(optional): Environment key to filter resultsperiod
(optional): Time aggregation period (day
,hour
,month
)sdkType
(optional): Filter by SDK type (client
,server
,mobile
,api
)
get_project_total_evaluations
Get total variable evaluations per time period for the entire project.
Parameters:
startDate
(optional): Start date as Unix timestamp (milliseconds since epoch)endDate
(optional): End date as Unix timestamp (milliseconds since epoch)platform
(optional): Platform filter for evaluation resultsvariable
(optional): Variable key filter for evaluation resultsenvironment
(optional): Environment key to filter resultsperiod
(optional): Time aggregation period (day
,hour
,month
)sdkType
(optional): Filter by SDK type (client
,server
,mobile
,api
)
Authentication Methods
1. CLI Authentication (Recommended for local development)
dvc login sso
dvc projects select
2. Environment Variables (Recommended for CI/CD)
export DEVCYCLE_CLIENT_ID="your-client-id"
export DEVCYCLE_CLIENT_SECRET="your-client-secret"
export DEVCYCLE_PROJECT_KEY="your-project-key"
Advanced Configuration
Local MCP Server Installation
For users who prefer to run the DevCycle MCP server locally rather than using the hosted version, you can install and configure the local server:
Prerequisites
- Node.js 16+ installed
- DevCycle CLI installed globally:
npm install -g @devcycle/cli
- DevCycle account with API credentials or SSO authentication
Installation
Install the DevCycle CLI which includes the local MCP server:
npm install -g @devcycle/cli
Authentication
Choose one of the following authentication methods:
Option 1: CLI Authentication (Recommended for local development)
# Authenticate via SSO
dvc login sso
# Select your project
dvc projects select
Option 2: Environment Variables (Recommended for CI/CD)
export DEVCYCLE_CLIENT_ID="your-client-id"
export DEVCYCLE_CLIENT_SECRET="your-client-secret"
export DEVCYCLE_PROJECT_KEY="your-project-key"
Configuration
For Cursor (.cursor/mcp_settings.json
):
{
"mcpServers": {
"DevCycle": {
"command": "dvc-mcp"
}
}
}
For Claude Desktop:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"DevCycle": {
"command": "dvc-mcp"
}
}
}
For VS Code (settings.json
):
{
"mcp.servers": {
"devcycle": {
"command": "dvc-mcp"
}
}
}
For Claude Code:
claude mcp add --transport stdio devcycle dvc-mcp
For Windsurf:
In Windsurf Settings → Cascade → Manage MCPs → View raw config:
{
"mcpServers": {
"DevCycle": {
"command": "dvc-mcp"
}
}
}
Error Handling
The MCP server returns structured error responses with:
- Detailed error messages
- Tool name that failed
- Suggested fixes
{
"error": true,
"message": "Detailed error message",
"tool": "tool_name",
"timestamp": "2024-01-01T00:00:00.000Z"
}
Common error scenarios:
- Authentication failures: Check credentials and project configuration
- API rate limits: Implement retry logic in your automation
- Validation errors: Ensure parameters meet requirements (patterns, lengths, etc.)
- Permission errors: Verify your API key has necessary permissions
Current Limitations
The MCP server does NOT currently support:
- Code analysis tools (usage scanning, cleanup)
- Git integration features
- Type generation
- MCP Resources (read-only data access)
- MCP Prompts (guided workflows)
These features are planned for future releases.
Development & Local Testing
Running from Source
# Clone the repository
git clone https://github.com/DevCycleHQ/cli.git
cd cli
# Install dependencies
yarn install
# Build the project
yarn build
# Run the MCP server
node dist/mcp/index.js
Testing with AI Assistants
For local testing, update your AI assistant configuration to point to the local build:
{
"mcpServers": {
"devcycle": {
"command": "node",
"args": ["/path/to/cli/dist/mcp/index.js"]
}
}
}
Debug Logging
The MCP server logs all operations to stderr, which can be viewed in:
- Cursor: Developer Tools console
- Claude Desktop: Log files in the application support directory
Environment Variables for Development
# Enable verbose logging
export DEBUG=1
# Use specific DevCycle API endpoint
export DEVCYCLE_API_URL="https://api.devcycle.com"
Getting Help
- GitHub Issues: GitHub Issues
- General Documentation: DevCycle Docs
- DevCycle Community: Discord
- Support: Contact Support