Connector guide8-minute read27 MCP tools7 languages

How to Connect LaunchDarkly to Gemini via MCP

LaunchDarkly feature management from any AI agent: projects and environments, flags with their state and evaluation status, segments, metrics and experiments, the audit log, members and teams. Create flags and segments, turn flags on or off and change targeting with semantic patches.

HCBy HelpCode teamUpdated 8 min read Open-source on GitHub

No credit card · 7-day trial · Self-host alternative available

LaunchDarkly

LaunchDarkly

LaunchDarkly feature flags: projects and environments, flags with state and evaluation status, segments, metrics and experiments, the audit log, members and teams. Create flags and segments, turn flags on or off and change targeting with semantic patches.

tools

27

Region

INTL

Category

Infrastructure

Authentication

API Key

Required env vars

LAUNCHDARKLY_API_TOKEN
Install in one click on Cloud

7-day free trial · No credit card

  • 7-day free trial
    No credit card required
  • GDPR & SOC 2 ready
    EU data residency, audit logs
  • Open-source on GitHub
    Open source · AGPL-3.0
  • Works with ChatGPT, Claude, Gemini
    Any MCP-compatible client

Skip the install. Get this working in under 2 minutes.

Start a free trial on cloud.anythingmcp.com, add the LaunchDarkly in one click, then point your AI client (Claude, ChatGPT, Copilot or Cursor) at the generated MCP endpoint. No Docker, no git clone, zero engineering experience required.

Start free trial

Summary

LaunchDarkly feature management from any AI agent: projects and environments, flags with their state and evaluation status, segments, metrics and experiments, the audit log, members and teams. Create flags and segments, turn flags on or off and change targeting with semantic patches.

Try asking

Example prompts for LaunchDarkly

Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.

LaunchDarkly · live via MCP
Share
Opus 4.7

Claude is AI and can make mistakes. Please double-check responses.

💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → LaunchDarkly, paste your credentials, mint an MCP API key and you're done. No Docker, no git clone, no local server.

LaunchDarkly + Gemini

LaunchDarkly feature management from any AI agent: projects and environments, flags with their state and evaluation status, segments, metrics and experiments, the audit log, members and teams. Create flags and segments, turn flags on or off and change targeting with semantic patches.

Prerequisites

See the full setup instructions baked into the connector (visible in the in-app store when you select the connector). The required environment variables for this connector are:

LAUNCHDARKLY_API_TOKEN

Step 1 — Get credentials

Setting up takes about 2 minutes. You need a LaunchDarkly account.

  1. In LaunchDarkly open Organization settings, Authorization (https://app.launchdarkly.com/settings/authorization) and create an access token. For reading choose the Reader role; to toggle and change flags Writer, or a custom role limited to the projects and environments the AI may change. A service token is not tied to a person.
  2. Copy the token (api-..., shown only once) into LAUNCHDARKLY_API_TOKEN and run launchdarkly_get_caller_identity: it shows the account, the token's name and kind, the member it belongs to and its scopes. SDK keys (sdk-...) and mobile keys (mob-...) do not work here.
  3. On the EU instance or the federal one, change the connector base URL to https://app.eu.launchdarkly.com or https://app.launchdarkly.us.

Finding flags: launchdarkly_list_projects, launchdarkly_get_project, launchdarkly_list_environments and launchdarkly_get_environment show the structure. launchdarkly_list_flags with env: production and a filter such as filter: query:checkout shows each flag with whether it is on and what it serves; without env the answer has no on or off state. launchdarkly_get_flag gives variations, targets, rules, fallthrough, off variation and prerequisites per environment.

Cleaning up: launchdarkly_list_flag_statuses and launchdarkly_get_flag_status say whether a flag is new, active, inactive (not evaluated for 7 days) or launched (serving one variation to everyone), and when it was last requested. Inactive and launched flags are candidates for removal from code.

Releasing: launchdarkly_create_flag creates a flag, by default a boolean one that is off in every environment. launchdarkly_toggle_flag turns it on or off in one environment. launchdarkly_update_flag changes targeting, rollouts, settings and lifecycle (deprecate, archive, restore); with dry_run: true it returns the flag as it would be, without saving. Segments: launchdarkly_list_segments, launchdarkly_get_segment, launchdarkly_create_segment (creates an empty one) and launchdarkly_update_segment for targets and rules.

Experiments, audit and people: launchdarkly_list_metrics, launchdarkly_get_metric, launchdarkly_list_experiments and launchdarkly_get_experiment read metrics and experiment iterations with treatments, traffic allocation and status. launchdarkly_list_audit_log (for example spec: proj/default:env/production:flag/new-checkout) and launchdarkly_get_audit_log_entry show who changed what, with the full change and its comment. launchdarkly_list_members, launchdarkly_get_member, launchdarkly_list_teams and launchdarkly_get_team read members, roles and teams.

Before writing: toggling a flag or changing its targeting in production changes what live users get within seconds. The AI confirms project, environment and flag with you first and adds a comment, which some environments require. Environments with approvals answer 405; the change then needs an approval request in the LaunchDarkly app.

Switched off at install: launchdarkly_delete_flag. Deleting removes the flag from every environment of the project and cannot be undone, while archiving with archiveFlag in launchdarkly_update_flag can be restored. A workspace admin turns it on when the team needs it.

Semantic patch: launchdarkly_toggle_flag, launchdarkly_update_flag and launchdarkly_update_segment send instructions such as {"kind": "addTargets", "contextKind": "user", "values": ["key-1"], "variationId": "<_id>"}. Variation, rule and clause ids are the _id fields from launchdarkly_get_flag or launchdarkly_get_segment. Rollout weights are in thousandths of a percent (100000 = 100%).

Data formats: project, environment, flag and segment keys are what the AI passes on; member and audit log ids are 24-character hex strings. Dates are Unix milliseconds (creationDate, lastModified, date). In a flag, environments.<key>.on says whether targeting is on and _summary.variations what is served. SDK and mobile keys of the environments are left out of every answer.

Paging: lists take limit and offset (flags up to 100 per page) and return totalCount and _links.next while more pages exist. The audit log returns at most 20 entries per call; the AI pages back with before set to the date of the last entry.

Common errors: 401 means a wrong or deleted token, 403 a token whose role does not allow the call, 404 an unknown key, 400 or 409 an invalid patch or a conflicting change (the message names the problem), 405 a change that needs approval, 429 the rate limit (wait for the time in X-Ratelimit-Reset).

The connector does not create or change projects and environments, does not manage members, teams or roles, does not delete segments, does not create experiments and does not file approval requests.

Step 2 — Install the adapter

curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d

Step 3 — Add the connector in Gemini

Your server URL: in AnythingMCP, open MCP Servers → the server this connector is on, and copy its URL (https://cloud.anythingmcp.com/mcp/…). Use it wherever this guide shows YOUR_SERVER_ID.

Gemini CLI reads MCP servers from ~/.gemini/settings.json (on Windows %USERPROFILE%\.gemini\settings.json). Add:

{
  "mcpServers": {
    "anythingmcp": {
      "httpUrl": "https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID",
      "headers": { "X-API-Key": "YOUR_MCP_API_KEY" }
    }
  }
}
  1. Create an MCP API key in AnythingMCP under MCP Servers → your server → API keys, and paste it in place of YOUR_MCP_API_KEY.
  2. Save the file and restart gemini.
  3. Run /mcp inside Gemini CLI (or gemini mcp list in your shell): anythingmcp should show as connected.
  4. Start prompting: Gemini CLI can now call the LaunchDarkly tools.

Available tools

ToolWhat it does
launchdarkly_get_caller_identityShow what the access token is: account, token name and kind (personal or service), the member it belongs to and its scopes
launchdarkly_list_projectsList the projects with key, name, tags and default client-side settings
launchdarkly_get_projectGet one project with its settings; add expand: environments for its environments (SDK keys are left out)
launchdarkly_list_environmentsList the environments of a project (e.g
launchdarkly_get_environmentGet one environment with its settings: client-side id, default TTL, secure mode, whether changes need comments, confirmation or approval…
launchdarkly_list_flagsList the feature flags of a project: key, name, description, kind (boolean or multivariate), variations, tags, temporary flag, maintainer…
launchdarkly_get_flagGet one feature flag with its variations (with their _id), defaults and, per environment, whether it is on, its targets, rules (with…
launchdarkly_list_flag_statusesList the evaluation status of every flag in one environment: new, active, inactive (not evaluated for 7 days) or launched (serving one…
launchdarkly_get_flag_statusGet the evaluation status of one flag in one environment (new, active, inactive, launched) and when it was last requested
launchdarkly_create_flagCreate a feature flag in a project, by default a boolean flag (variations true and false) that is off in every environment
launchdarkly_toggle_flagTurn a feature flag on or off in one environment
launchdarkly_update_flagChange a feature flag with semantic patch instructions: targeting (addRule, removeRule, addClauses, addTargets, removeTargets…
launchdarkly_delete_flagDelete a feature flag from every environment of the project
launchdarkly_list_segmentsList the segments of an environment: key, name, description, tags, whether it is a big segment, and when it changed
launchdarkly_get_segmentGet one segment with its included and excluded targets, rules (with _id) and version
launchdarkly_create_segmentCreate an empty segment in one environment; add targets and rules afterwards with launchdarkly_update_segment
launchdarkly_update_segmentChange a segment with semantic patch instructions: addIncludedTargets, removeIncludedTargets, addExcludedTargets, removeExcludedTargets…
launchdarkly_list_metricsList the metrics of a project (conversions, clicks, page views, numeric custom events) with key, name, kind, event key, unit, success…
launchdarkly_get_metricGet one metric with its definition and, with expand, the experiments and metric groups that use it
launchdarkly_list_experimentsList the experiments of a project across environments: key, name, hypothesis, environment, current iteration status (not started, running…
launchdarkly_get_experimentGet one experiment with its hypothesis, current iteration (status, start date, treatments and traffic allocation, primary and secondary…
launchdarkly_list_audit_logList audit log entries, newest first: who changed what (flags, segments, environments, members) and when, with the title, description and…
launchdarkly_get_audit_log_entryGet one audit log entry with the full change: the JSON patch or semantic instructions applied, the previous and current version of the…
launchdarkly_list_membersList the account members: id, email, name, role (reader, writer, admin, owner, no_access) or custom roles, teams, last seen and whether…
launchdarkly_get_memberGet one account member with role, custom roles, teams and permission grants
launchdarkly_list_teamsList the teams: key, name, description, member count and the roles they hold
launchdarkly_get_teamGet one team with its description and, with expand, members, roles, projects and maintainers

Example prompts

  • "Is the new-checkout flag on in production, and what does it serve to whom?"
  • "Which flags in the default project have been inactive in production for at least 7 days?"
  • "Turn on dark-mode in the test environment with the comment QA run. Do a dry run first and show me the result."
  • "Add the user key beta-tester-17 to the beta-users segment in production."
  • "Who changed the targeting of new-checkout in production this week, and what exactly changed?"

FAQ

Where does Gemini CLI look for MCP servers? In ~/.gemini/settings.json for your user, or in .gemini/settings.json inside a project. gemini mcp list shows each server and whether it connects.

Next steps

Was this guide helpful?

Your LaunchDarkly agent is one click away.

Install the connector, paste the key, prompt Gemini. Free for 7 days, no credit card.

Related guides

Connectors

How to Connect LaunchDarkly to ChatGPT via MCP

LaunchDarkly feature management from any AI agent: projects and environments, flags with their state and evaluation status, segments, metrics and experiments, the audit log, members and teams. Create flags and segments, turn flags on or off and change targeting with semantic patches.

Connectors

How to Connect LaunchDarkly to Claude via MCP

LaunchDarkly feature management from any AI agent: projects and environments, flags with their state and evaluation status, segments, metrics and experiments, the audit log, members and teams. Create flags and segments, turn flags on or off and change targeting with semantic patches.

Connectors

How to Connect LaunchDarkly to Cursor via MCP

LaunchDarkly feature management from any AI agent: projects and environments, flags with their state and evaluation status, segments, metrics and experiments, the audit log, members and teams. Create flags and segments, turn flags on or off and change targeting with semantic patches.

Connectors

How to Connect LaunchDarkly to Meta Muse via MCP

LaunchDarkly feature management from any AI agent: projects and environments, flags with their state and evaluation status, segments, metrics and experiments, the audit log, members and teams. Create flags and segments, turn flags on or off and change targeting with semantic patches.

Connectors

LaunchDarkly to MCP: Feature Flags, Targeting, Segments, Experiments and the Audit Log in any AI Agent

LaunchDarkly feature management from any AI agent: projects and environments, flags with their state and evaluation status, segments, metrics and experiments, the audit log, members and teams. Create flags and segments, turn flags on or off and change targeting with semantic patches.

Connectors

How to Connect LaunchDarkly to Microsoft Copilot via MCP

LaunchDarkly feature management from any AI agent: projects and environments, flags with their state and evaluation status, segments, metrics and experiments, the audit log, members and teams. Create flags and segments, turn flags on or off and change targeting with semantic patches.