Connected Launchdarkly
Boost productivity using this official, launchdarkly, server, feature. Includes structured workflows, validation checks, and reusable patterns for devtools.
Connected LaunchDarkly
Connect Claude Code to LaunchDarkly for managing feature flags, targeting rules, AI configurations, and gradual rollouts through the Model Context Protocol.
When to Use This MCP Server
Connect this server when you need to:
- Create, modify, and manage feature flags and their targeting rules directly from Claude Code while implementing the features they control
- Configure gradual rollouts, percentage-based targeting, and user segment rules for new features as part of your development and release workflow
- Review flag states across environments (dev, staging, production) to verify feature availability before deploying code changes
Consider alternatives when:
- You need complex audit trail analysis or flag dependency visualization, which the LaunchDarkly web dashboard provides with richer visual tools
- Your feature flagging needs are limited to simple boolean toggles that can be managed through environment variables or config files
Quick Start
Configuration
name: connected-launchdarkly type: mcp category: devtools
Example Connection
claude mcp:connect connected-launchdarkly
Available Tools
list-flags: List all feature flags in a project with their current states per environment
get-flag: Retrieve detailed flag configuration including variations and targeting rules
create-flag: Create a new feature flag with variations, tags, and default targeting
update-targeting: Modify flag targeting rules, segments, and percentage rollouts
toggle-flag: Enable or disable a feature flag in a specific environment
Core Concepts
LaunchDarkly MCP Integration Overview
| Aspect | Details |
|---|---|
| Transport | stdio-based process via npx running @launchdarkly/mcp-server package |
| Authentication | LaunchDarkly API key with project and environment access permissions |
| Flag Types | Boolean, multivariate string, number, and JSON flag variations |
| Targeting | User-level, segment-based, percentage rollout, and custom rule targeting |
| Environments | Full support for managing flags across dev, staging, production, and custom |
LaunchDarkly Flag Management Architecture
Claude Code IDE
|
v
[MCP Client] --stdio--> [LaunchDarkly MCP Server]
|
v
[LaunchDarkly REST API v2]
|
+---------+---------+
| | |
v v v
[Flags & [Targeting [Segments
Variations] Rules] & Users]
\ | /
[LaunchDarkly Platform]
Projects | Environments | Audit
Configuration
| Parameter | Type | Default | Description |
|---|---|---|---|
| LD_API_KEY | string | required | LaunchDarkly API access key (starts with api-) for REST API access |
| default_project | string | default | Default LaunchDarkly project key for flag operations |
| default_environment | string | production | Default environment key for flag state queries and toggles |
| include_archived | boolean | false | Include archived flags in listing and search results |
| confirm_production | boolean | true | Require confirmation before modifying flags in production environment |
Best Practices
-
Create Flags Before Writing Feature Code - Create the feature flag in LaunchDarkly before implementing the feature. This establishes the flag key in your codebase and ensures the flag exists in all environments before any code references it.
-
Use Descriptive Flag Keys and Tags - Name flags with clear, descriptive keys (e.g., enable-new-checkout-flow) and add tags for categorization. Good naming makes flags discoverable and helps team members understand flag purpose without reading code.
-
Start with Percentage Rollouts - Use update-targeting to configure gradual rollouts starting at a small percentage. This reduces risk by exposing new features to a limited audience before full availability, allowing you to monitor for issues.
-
Verify Flag States Across Environments - Before deploying code that references a flag, use get-flag to verify the flag exists and has appropriate states in all target environments. Missing flags in production cause runtime errors.
-
Clean Up Completed Flags - After a feature is fully rolled out and stable, archive the feature flag. Accumulated technical debt from unused flags makes the flag management interface harder to navigate and increases evaluation overhead.
Common Issues
-
API Key Returns 401 Unauthorized - LaunchDarkly API keys are project-scoped. Verify the key has access to the project specified in default_project. API keys from different projects cannot access other projects' flags.
-
Flag Not Found in Environment - Flags exist at the project level but may not have targeting rules configured for every environment. Use list-flags to verify the flag exists, then check its configuration in the target environment.
-
Targeting Rule Changes Not Taking Effect - LaunchDarkly SDK clients cache flag evaluations. Changes made through the MCP server are immediately reflected in the API but may take a few seconds to propagate to SDK clients depending on their polling interval.
Reviews
No reviews yet. Be the first to review this template!
Similar Templates
Database MCP Integration
MCP server configuration for connecting Claude Code to PostgreSQL, MySQL, and MongoDB databases. Enables schema inspection, query building, and migration generation.
Elevenlabs Server
Streamline your workflow with this official, elevenlabs, text, speech. Includes structured workflows, validation checks, and reusable patterns for audio.
Browser Use Portal
Powerful mcp for server, enables, agents, control. Includes structured workflows, validation checks, and reusable patterns for browser_automation.