Set up the LaunchDarkly MCP Server
Connect LaunchDarkly securely to an AI client through the official MCP server — hosted via OAuth or locally via an API key for EU/Federal.
- Skill Road
- Set up the LaunchDarkly MCP Server
Published on 24.09.2026
Decide before setup: hosted or local
LaunchDarkly offers the MCP server in two official variants. For standard instances, the provider recommends the hosted server at https://mcp.launchdarkly.com/mcp/launchdarkly, which needs no local installation and authorizes through OAuth consent. For EU or Federal instances, the hosted server is not available per the documentation; here the local, self-managed server via the @launchdarkly/mcp-server npm package is the documented path.
Connect the hosted server (recommended)
The simplest way in is the install page at https://mcp.launchdarkly.com/mcp/launchdarkly/install, which connects the client without a manual configuration file. Alternatively, add the endpoint manually — in Cursor via Settings → MCP Tools → Custom MCP, in Claude Code via the claude mcp add command, or in Windsurf via the mcp_config.json file. After saving, the client opens an OAuth consent window; sign in with your LaunchDarkly account there and authorize access to the desired project.
Set up the local server (for EU/Federal or without OAuth access)
First, generate an API key with the Writer or Developer role — not full administrator rights — through the authorization page in your LaunchDarkly account. Then add the following to the client's MCP configuration:
{
"mcpServers": {
"launchdarkly": {
"command": "npx",
"args": [
"-y", "--package", "@launchdarkly/mcp-server", "--",
"mcp", "start", "--api-key", "<YOUR_API_KEY>"
]
}
}
}
For Federal or EU instances, the server must additionally authenticate against https://app.launchdarkly.us or https://app.eu.launchdarkly.com instead of the default https://app.launchdarkly.com; the specific environment variable for this is documented in the repository (RUNTIMES.md and the README). Standalone binaries from GitHub releases and a Docker image via AWS Marketplace or ECR are also available.
Verify the connection with a read task
Before write actions such as creating or deleting a flag, run a harmless test request first, such as: "List all feature flags in project X." Once the expected project is correctly recognized, tasks like adjusting a targeting rule or checking the rollout status of a specific flag become reasonable next steps.
Keep permissions minimal
Because feature flags directly control the behavior of production applications, the API key or authorized account used should hold only the minimum necessary permissions. LaunchDarkly explicitly recommends the Writer base role or the predefined Developer preset role for this. Test write changes on non-critical flags or in a test environment first, before they affect production rollouts.
Frequently asked questions
Should I use the hosted or the local LaunchDarkly MCP Server?
For standard instances, LaunchDarkly recommends the hosted server with OAuth sign-in, since no API key needs to be managed. For EU or Federal instances, the hosted server is not available per the documentation; the local server via npx, binary, or Docker is used instead.
What permissions does the API key or connected account need?
LaunchDarkly recommends at minimum the Writer base role or the Developer preset role for write access, not an account with full administrator rights. That limits the damage from a faulty agent action.
Is the LaunchDarkly MCP Server free?
The server code itself is free under the MIT license. LaunchDarkly also offers a permanently free Developer tier for the underlying platform; larger teams need a paid tier, whose exact terms are listed on the official pricing page.
What tasks can the agent perform through the server?
Creating, reading, updating, and deleting feature flags, checking targeting rules, managing AI Configs, viewing the audit log, listing environments, and, per the provider, querying observability data such as logs, traces, and error groups.
What if I work in an EU or Federal environment?
Use the local, self-managed server and authenticate it against the matching base URL (`app.eu.launchdarkly.com` or `app.launchdarkly.us`), since the hosted server is not available for these instances per the documentation.