LaunchDarkly hosted MCP server

Overview

This topic describes how to connect your AI client to the LaunchDarkly hosted Model Context Protocol (MCP) servers.

Prerequisites

To use the hosted MCP servers, you need:

  • An AI client that supports MCP such as Cursor, Claude Code, VS Code with Copilot, or Windsurf.

Configure the MCP servers

The hosted MCP servers connect your AI client to LaunchDarkly using OAuth. LaunchDarkly provides two hosted MCP servers:

ServerURLWhat it does
Feature managementhttps://mcp.launchdarkly.com/mcp/fmManage feature flags
AI Configshttps://mcp.launchdarkly.com/mcp/aiconfigsManage AI Configs and variations

You can configure one or both servers depending on your needs. For example, if you only use feature flags, you only need the feature management server.

You have two options for configuring the hosted MCP servers:

Quick configuration

To configure your AI client, open the install page for each server you want to enable and click the AI client you want to install it for. The AI client opens and prompts you to authorize and connect to that hosted MCP server.

Manual configuration

You can also manually configure the MCP servers in your AI client. Here, we show examples for Cursor and Claude Code. Add only the servers you need.

Cursor

You can manually configure the MCP servers in Cursor. The code below assumes you wish to configure both MCP servers. If you wish to use fewer servers, delete the lines referring to the servers you do not wish to use after you copy the code sample.

To configure the servers:

  1. Create or update .cursor/mcp.json in your project root:

    Cursor
    1{
    2 "mcpServers": {
    3 "LaunchDarkly feature management": {
    4 "url": "https://mcp.launchdarkly.com/mcp/fm",
    5 "headers": {}
    6 },
    7 "LaunchDarkly AI Configs": {
    8 "url": "https://mcp.launchdarkly.com/mcp/aiconfigs",
    9 "headers": {}
    10 }
    11 }
    12}
  2. In Cursor, navigate to Settings > Cursor Settings > Tools & Integrations > MCP Tools.

  3. Toggle on each LaunchDarkly server.

  4. Click Connect to authorize with your LaunchDarkly account.

Claude Code

To manually configure the MCP servers in Claude Code, add the servers to your Claude Code MCP configuration:

Claude Code
1{
2 "mcpServers": {
3 "LaunchDarkly feature management": {
4 "type": "http",
5 "url": "https://mcp.launchdarkly.com/mcp/fm"
6 },
7 "LaunchDarkly AI Configs": {
8 "type": "http",
9 "url": "https://mcp.launchdarkly.com/mcp/aiconfigs"
10 }
11 }
12}

GitHub Copilot

To manually configure the MCP servers with with GitHub Copilot, add the servers to the MCP configuration for a target GitHub repo:

  1. Navigate to a target repository on GitHub.

  2. Select Settings -> Code and automation -> Copilot -> Coding agent.

  3. In the MCP configuration section, add .json configurations for the LaunchDarkly MCP servers you want to use. The Flag cleanup custom agent for GitHub Copilot requires the LaunchDarkly feature management server:

    GitHub Copilot
    1{
    2 "mcpServers": {
    3 "LaunchDarkly feature management": {
    4 "url": "https://mcp.launchdarkly.com/mcp/fm",
    5 "headers": {}
    6 },
    7 "LaunchDarkly AI Configs": {
    8 "url": "https://mcp.launchdarkly.com/mcp/aiconfigs",
    9 "headers": {}
    10 },
    11 }
    12}
  4. Click Save.

Migrate to the hosted server

If you use the local npx-based server, you can migrate to the hosted server. Here’s how:

  1. Replace your old server configuration. Your old configuration looks like this:

    Old configuration to remove
    1{
    2 "mcpServers": {
    3 "LaunchDarkly": {
    4 "command": "npx",
    5 "args": [
    6 "-y", "--package", "@launchdarkly/mcp-server",
    7 "--", "mcp", "start",
    8 "--api-key", "api-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    9 ]
    10 }
    11 }
    12}

    and should be replaced with this:

    New configuration to add
    1{
    2 "mcpServers": {
    3 "LaunchDarkly feature management": {
    4 "type": "http",
    5 "url": "https://mcp.launchdarkly.com/mcp/fm"
    6 },
    7 "LaunchDarkly AI Configs": {
    8 "type": "http",
    9 "url": "https://mcp.launchdarkly.com/mcp/aiconfigs"
    10 }
    11 }
    12}

    You can include only the servers you need. For example, if you only use feature flags, add only the feature management server entry.

  2. Remove any environment variables for the local server, such as LD_ACCESS_TOKEN. Instead, OAuth now handles authentication.

  3. Close and reopen your AI client.

  4. (Cursor only) If you are using Cursor, authorize your LaunchDarkly account:

    • Navigate to Settings > Cursor Settings > Tools & Integrations > MCP Tools.
    • Toggle on each LaunchDarkly server.
    • Click connect.

To learn how to use the MCP server in your AI client, read Use the MCP server.