Skip to main content

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:

info

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 features
  • page (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 organization
  • variations (optional): Array of variations with key, name, and variables
  • configurations (optional): Environment-specific configurations
  • sdkVisibility (optional): SDK visibility settings

update_feature ⚠️

Update an existing feature flag.

Parameters:

  • key: Feature key to update
  • name (optional): New name
  • description (optional): New description
  • type (optional): New type
  • tags (optional): New tags
  • variations (optional): Updated variations

update_feature_status ⚠️

Update the status of a feature flag.

Parameters:

  • key: Feature key
  • status: New status (active, complete, archived)
  • staticVariation (optional): Variation to serve if status is complete

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 key
  • key: Unique variation key
  • name: Variation name
  • variables (optional): Variable values for this variation

update_feature_variation ⚠️

Update an existing variation by key.

Parameters:

  • feature_key: Feature key
  • variation_key: Variation to update
  • _id (optional): MongoDB ID for the variation
  • key (optional): New variation key
  • name (optional): New variation name
  • variables (optional): Updated variable values

set_feature_targeting ⚠️

Set targeting status (enable or disable) for a feature in an environment.

Parameters:

  • feature_key: Feature key
  • environment_key: Environment key
  • enabled: 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 key
  • page (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 by
  • user (optional): User ID to filter by
  • action (optional): Action type to filter by

list_feature_targeting

List targeting rules for a feature.

Parameters:

  • feature_key: Feature key
  • environment_key (optional): Specific environment (returns all if omitted)

update_feature_targeting ⚠️

Update targeting rules for a feature in an environment.

Parameters:

  • feature_key: Feature key
  • environment_key: Environment key
  • status (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 query
  • page (optional): Page number
  • per_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 name
  • description (optional): Variable description
  • defaultValue (optional): Default value
  • _feature (optional): Associated feature key
  • validationSchema (optional): Validation rules

update_variable ⚠️

Update an existing variable.

Parameters:

  • key: Variable key to update
  • name (optional): New name
  • description (optional): New description
  • type (optional): New type
  • validationSchema (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 number
  • perPage (optional): Items per page
  • sortBy (optional): Sort field
  • sortOrder (optional): Sort order (asc, desc)

get_sdk_keys

Get SDK keys for an environment.

Parameters:

  • environmentKey: Environment key
  • keyType (optional): Specific key type (mobile, server, client)

Project Management

list_projects

List all projects in the organization.

Parameters:

  • search (optional): Search query
  • page (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 key
  • environment_key: Environment key
  • variation_key: Variation to serve

clear_feature_self_targeting_overrides ⚠️

Clear overrides for a specific feature/environment.

Parameters:

  • feature_key: Feature key
  • environment_key: Environment key

Results & Analytics

get_feature_total_evaluations

Get total variable evaluations per time period for a specific feature.

Parameters:

  • featureKey: Feature key
  • 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 results
  • variable (optional): Variable key filter for evaluation results
  • environment (optional): Environment key to filter results
  • period (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 results
  • variable (optional): Variable key filter for evaluation results
  • environment (optional): Environment key to filter results
  • period (optional): Time aggregation period (day, hour, month)
  • sdkType (optional): Filter by SDK type (client, server, mobile, api)

Authentication Methods

dvc login sso
dvc projects select
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