Feature flag management
## LaunchDarkly MCP Server: Feature Flag Management The **LaunchDarkly MCP Server** integrates feature flag management into Google Antigravity, enabling developers to control feature releases, run experiments, and manage targeting rules without code deployments. ### Why LaunchDarkly MCP? - **Feature flags** - Toggle features on/off without deployments - **Targeting rules** - Control who sees features with precise targeting - **Experiments** - Run A/B tests and measure impact - **Kill switches** - Instantly disable problematic features - **Audit trail** - Track all flag changes with full history ### Key Features #### 1. Flag Management ```python # Create new feature flag flag = await mcp.call("launchdarkly", "create_flag", { "project_key": "my-project", "key": "new-checkout-flow", "name": "New Checkout Flow", "description": "Redesigned checkout experience", "variations": [ {"value": True, "name": "Enabled"}, {"value": False, "name": "Disabled"} ] }) # Toggle flag await mcp.call("launchdarkly", "toggle_flag", { "project_key": "my-project", "flag_key": "new-checkout-flow", "environment": "production", "enabled": True }) ``` #### 2. Targeting Rules ```python # Set targeting rules await mcp.call("launchdarkly", "update_targeting", { "project_key": "my-project", "flag_key": "new-checkout-flow", "environment": "production", "rules": [ { "variation": 0, "clauses": [ {"attribute": "email", "op": "endsWith", "values": ["@company.com"]} ] } ], "fallthrough": {"variation": 1} }) ``` #### 3. User Targeting ```python # Target specific users await mcp.call("launchdarkly", "add_user_targets", { "project_key": "my-project", "flag_key": "new-checkout-flow", "environment": "production", "variation": 0, "user_keys": ["user-123", "user-456"] }) # Get flag evaluation for user result = await mcp.call("launchdarkly", "evaluate_flag", { "project_key": "my-project", "flag_key": "new-checkout-flow", "environment": "production", "user": {"key": "user-789"} }) print(f"Value: {result[\"value\"]}") ``` #### 4. Experimentation ```python # Create experiment experiment = await mcp.call("launchdarkly", "create_experiment", { "project_key": "my-project", "flag_key": "pricing-page-variant", "name": "Pricing Page Test", "metrics": ["conversion-rate"] }) # Get experiment results results = await mcp.call("launchdarkly", "get_experiment_results", { "experiment_id": experiment["id"] }) ``` ### Configuration ```json { "mcpServers": { "launchdarkly": { "command": "npx", "args": ["-y", "@anthropic/mcp-launchdarkly"], "env": { "LD_API_KEY": "api-xxx", "LD_PROJECT_KEY": "my-project" } } } } ``` ### Use Cases **Progressive Rollouts**: Release features to users gradually with percentage rollouts. **Beta Testing**: Enable features for specific user segments before general release. **Kill Switches**: Instantly disable problematic features without deployment. **A/B Testing**: Run controlled experiments to measure feature impact. The LaunchDarkly MCP Server enables safe, controlled feature releases.
{
"mcpServers": {
"launchdarkly": {
"mcpServers": {
"launchdarkly": {
"env": {
"LD_API_KEY": "YOUR_API_KEY"
},
"args": [
"-y",
"@launchdarkly/mcp-server"
],
"command": "npx"
}
}
}
}
}