create-ai-config
Creates a new AI Config within a project. Useful for setting up LLM configurations programmatically.
Create, target and retire LaunchDarkly feature flags from your editor — and check where a flag is referenced in code before touching it.
LABSCO SUMMARY
Stale flags accumulate because nobody can cheaply establish whether anything still evaluates them — get-flag-status-across-environments derives that from real evaluation counts and get-code-references shows which repositories still mention it, which turns cleanup into a decision rather than a gamble. The environment tooling serves the same instinct: critical environments are labelled, so a targeting change can be checked against where it is landing before it lands.
LaunchDarkly's own server, covering feature flags and AI Configs. Alongside the flag CRUD it answers the two questions that make a flag change safe: which environments are critical, and where the flag is still referenced.
A LaunchDarkly account and an API key from its Authorization page, passed as --api-key on the start command; clients that support it can read that from an environment variable instead of writing the key into the config file. It runs as npx -y --package @launchdarkly/mcp-server -- mcp start, with a standalone binary from GitHub releases and a Docker image as alternatives. The key's own permissions decide what it can do — flag deletion and targeting changes are real changes to what your users see.
One command plus a key — npx -y --package @launchdarkly/mcp-server -- mcp start --api-key $LD_ACCESS_TOKEN, then supply credentials
USE CASES
Check its lifecycle status from actual evaluations, see which repositories still reference it, and remove it once both say it is dead.
Create the flag with its variations, see which environments exist and which are critical, and set the targeting rules for the rollout.
Read the flag's full configuration including its per-environment targeting, then check the audit log for what changed recently.
List them all with their metadata, then pull lifecycle status for the ones that look abandoned.
Create the AI Config, add the variations you want to compare, and target which users get which.
Read its current variations and model settings, update the one that needs changing, and check who it is targeted at.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
create-ai-configCreates a new AI Config within a project. Useful for setting up LLM configurations programmatically.
create-ai-config-variationAdds a new variation to an AI Config, supporting experimentation or multi-model strategies.
create-feature-flagCreates a new feature flag within a project. AI agents can use this operation to define feature toggles for controlled rollouts, experimentation, or gated features, automating the flag setup process.
delete-ai-configDeletes an AI Config and its associated variations. Intended for cleanup or deprecation workflows.
delete-ai-config-variationDeletes an AI Config variation.
delete-feature-flagRemoves a feature flag from the project. Used by AI agents to clean up deprecated toggles that are no longer in use, improving system hygiene and maintainability.
get-ai-configRetrieves details of a specific AI Config, including variations and model settings.
get-ai-config-targetingRetrieves the targeting details of a specific AI Config, including individual targets, rules, and rollouts.
get-ai-config-variationRetrieves an AI configuration variation.
get-audit-log-entriesFetches audit log entries for a LaunchDarkly account. Use the spec parameter with format proj/<projectKey>:env/<envKey>:flag/<flagKey> to query a specific flag's change history (use env/* for all environments). The before and after parameters accept Unix epoch timestamps in milliseconds for date-range filtering. Returns at most 20 entries per call, ordered newest-first.
get-code-referencesIdentifies which repositories have code references to a given flag, helping agents determine if they're operating on the correct repository and understand the scope of cleanup (single vs multi-repo).
get-environmentsIdentifies which environments exist in a project and determines which are marked as "critical" (production, staging, etc.). Allows agents to programmatically identify critical environments instead of hardcoding assumptions.
get-feature-flagFetches the full configuration for a specific feature flag, including environments, variations, and targeting rules. Useful for agents auditing or managing specific feature toggles in a detailed, contextual manner.
get-flag-status-across-environmentsReturns lifecycle status (new, active, inactive, launched) based on actual usage patterns, evaluation counts, and configuration stability. This is the key intelligence for removal readiness assessment.
list-ai-configsRetrieves AI configuration settings for a specific project. This endpoint allows agents to access and modify AI-related configurations, ensuring that the AI's behavior aligns with project requirements and user expectations.
list-feature-flagsRetrieves all feature flags within a project, including metadata and targeting rules. Enables AI agents to enumerate existing flags for inspection, configuration analysis, or generating flag usage reports across environments.
update-ai-configUpdates metadata or configuration of an existing AI Config.
update-ai-config-targetingUpdates the targeting of an existing AI Config.
update-ai-config-variationUpdates a specific variation within an AI Config. Enables fine-tuned control of model behavior.
update-feature-flagUpdates the configuration of an existing feature flag. Enables agents to change targeting rules, modify variations, or adapt rollout strategies dynamically in response to user behavior or experiment results.
BEFORE YOU INSTALL
20 tools when we connected. LaunchDarkly's hosted server is more feature-complete and updated more often than this self-managed one. The documentation uses camelCase method names; registered tools are kebab-case.
npx on PATH
CONTEXT COST
Rated by the size of the 20 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
npx -y --package @launchdarkly/mcp-server -- mcp start --api-key $LD_ACCESS_TOKEN{
"mcpServers": {
"LaunchDarkly": {
"command": "npx",
"args": [
"-y",
"--package",
"@launchdarkly/mcp-server",
"--",
"mcp",
"start",
"--api-key",
"<YOUR_API>"
]
}
}
}<YOUR_API> is your LaunchDarkly API access token, as found on LaunchDarkly's Authorization page.
Open the Qodo Gen chat panel in VSCode or IntelliJ -> Connect more tools -> + Add new MCP -> paste -> Save
{
"mcpServers": {
"LaunchDarkly": {
"command": "npx",
"args": [
"-y",
"--package",
"@launchdarkly/mcp-server",
"--",
"mcp",
"start",
"--api-key",
"<YOUR_API>"
]
}
}
}<YOUR_API> is your LaunchDarkly API access token, as found on LaunchDarkly's Authorization page.
In the Copilot CLI, run /mcp add to add the server interactively, or create/edit ~/.copilot/mcp-config.json with the following content
{
"mcpServers": {
"LaunchDarkly": {
"command": "npx",
"args": [
"-y",
"--package",
"@launchdarkly/mcp-server",
"--",
"mcp",
"start",
"--api-key",
"<YOUR_API>"
]
}
}
}<YOUR_API> is your LaunchDarkly API access token, as found on LaunchDarkly's Authorization page.
Clone and build it
Once cloned, you'll need to install dependencies (npm install) and build the server (npm run build).
git clone https://github.com/launchdarkly/mcp-server.git
cd mcp-server
npm install
npm run buildPoint your client at your clone
Configure your server definition to reference your local clone.
{
"mcpServers": {
"launchdarkly": {
"command": "node",
"args": [
"<YOUR_PATH_TO_MCP_SERVER>/bin/mcp-server.js",
"start",
"--api-key",
"<YOUR_API>"
]
}
}
}