连接器指南阅读约 5 分钟27 个 MCP 工具7 种语言

如何通过 MCP 将 LaunchDarkly 连接到 Cursor

在任意 AI 智能体中使用 LaunchDarkly 功能管理:项目和环境,带状态和评估状态的功能开关,分群,指标和实验,审计日志,成员和团队。可以创建开关和分群,开启或关闭开关,并用语义补丁修改定向规则。

HC作者:HelpCode 团队更新于 5 分钟阅读 在 GitHub 开源

无需信用卡 · 7 天试用 · 提供自托管方案

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.

个工具

27

区域

INTL

类别

基础设施

身份验证

API Key

所需环境变量

LAUNCHDARKLY_API_TOKEN
在 Cloud 上一键安装

7 天免费试用 · 无需信用卡

  • 7 天免费试用
    无需信用卡
  • 符合 GDPR,SOC 2 就绪
    数据驻留欧盟,审计日志
  • 在 GitHub 开源
    开源 · AGPL-3.0
  • 支持 ChatGPT、Claude、Gemini
    任何兼容 MCP 的客户端

跳过安装。2 分钟内即可运行。

在 cloud.anythingmcp.com 开始免费试用,一键添加 LaunchDarkly,然后将你的 AI 客户端(Claude、ChatGPT、Copilot 或 Cursor)指向生成的 MCP 端点。无需 Docker,无需 git clone,无需任何工程经验。

开始免费试用

摘要

在任意 AI 智能体中使用 LaunchDarkly 功能管理:项目和环境,带状态和评估状态的功能开关,分群,指标和实验,审计日志,成员和团队。可以创建开关和分群,开启或关闭开关,并用语义补丁修改定向规则。

试试这样问

LaunchDarkly 的示例提示

点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。

LaunchDarkly · 通过 MCP 实时
分享
Opus 4.7

Claude 是 AI,可能会出错。请核对回答。

💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → LaunchDarkly、粘贴凭证、生成 MCP API key,即可完成。无 Docker、无 git clone、无本地服务器。

LaunchDarkly + Cursor

在任意 AI 智能体中使用 LaunchDarkly 功能管理:项目和环境,带状态和评估状态的功能开关,分群,指标和实验,审计日志,成员和团队。可以创建开关和分群,开启或关闭开关,并用语义补丁修改定向规则。

前提条件

完整的设置说明已内置在连接器中 (在 store 中选择连接器时可见)。所需环境变量:

LAUNCHDARKLY_API_TOKEN

步骤 1 — 获取凭证

设置大约需要 2 分钟。你需要一个 LaunchDarkly 账户。

  1. 在 LaunchDarkly 中打开 Organization settings、Authorization(https://app.launchdarkly.com/settings/authorization),创建一个访问令牌。只读时选择 Reader 角色;要切换和修改开关,选择 Writer,或者一个只限于 AI 可以修改的项目和环境的自定义角色。服务令牌不绑定到某个人。
  2. 把令牌(api-...,只显示一次)复制到 LAUNCHDARKLY_API_TOKEN,然后运行 launchdarkly_get_caller_identity:它会显示账户、令牌名称和类型、所属成员以及权限范围。SDK 密钥(sdk-...)和移动端密钥(mob-...)在这里无效。
  3. 如果使用欧盟实例或联邦实例,把连接器的基础 URL 改为 https://app.eu.launchdarkly.com 或 https://app.launchdarkly.us。

查找开关:launchdarkly_list_projects、launchdarkly_get_project、launchdarkly_list_environments 和 launchdarkly_get_environment 显示结构。launchdarkly_list_flags 配合 env: production 和 filter: query:checkout 这类筛选条件,会显示每个开关是否开启以及返回什么;没有 env 时响应中不含开关状态。launchdarkly_get_flag 按环境给出变体、目标、规则、fallthrough、关闭时的变体和前置条件。

清理:launchdarkly_list_flag_statuses 和 launchdarkly_get_flag_status 说明开关处于 new、active、inactive(7 天内未被评估)还是 launched(对所有人返回同一个变体),以及最后一次被请求的时间。inactive 和 launched 的开关可以考虑从代码中移除。

发布:launchdarkly_create_flag 创建开关,默认是在所有环境中都关闭的布尔开关。launchdarkly_toggle_flag 在一个环境中开启或关闭它。launchdarkly_update_flag 修改定向规则、灰度发布、设置和生命周期(deprecate、archive、restore);使用 dry_run: true 时,它返回修改后的开关样子但不保存。分群:launchdarkly_list_segments、launchdarkly_get_segment、launchdarkly_create_segment(创建空分群)以及用于目标和规则的 launchdarkly_update_segment。

实验、审计和成员:launchdarkly_list_metrics、launchdarkly_get_metric、launchdarkly_list_experiments 和 launchdarkly_get_experiment 读取指标以及实验迭代的处理组、流量分配和状态。launchdarkly_list_audit_log(例如 spec: proj/default:env/production:flag/new-checkout)和 launchdarkly_get_audit_log_entry 显示谁改了什么,包括完整的改动和备注。launchdarkly_list_members、launchdarkly_get_member、launchdarkly_list_teams 和 launchdarkly_get_team 读取成员、角色和团队。

写入之前:在生产环境中切换开关或修改定向规则,会在几秒内改变真实用户看到的内容。AI 会先和你确认项目、环境和开关,并加上 comment,有些环境要求必须填写。需要审批的环境会返回 405,此时改动需要在 LaunchDarkly 应用中提交审批请求。

安装时关闭:launchdarkly_delete_flag。删除会把开关从项目的所有环境中移除且无法撤销,而通过 launchdarkly_update_flag 中的 archiveFlag 归档可以恢复。团队需要时由工作区管理员开启。

语义补丁:launchdarkly_toggle_flag、launchdarkly_update_flag 和 launchdarkly_update_segment 发送类似 {"kind": "addTargets", "contextKind": "user", "values": ["key-1"], "variationId": "<_id>"} 的指令。变体、规则和条件的 id 是 launchdarkly_get_flag 或 launchdarkly_get_segment 中的 _id 字段。灰度权重以千分之一百分点为单位(100000 = 100%)。

数据格式:项目、环境、开关和分群的 key 是 AI 在后续调用中直接传递的值;成员和审计日志的 id 是 24 位十六进制字符串。日期是 Unix 毫秒(creationDate、lastModified、date)。在开关中,environments.<key>.on 表示定向是否开启,_summary.variations 表示返回什么。所有响应都不包含环境的 SDK 密钥和移动端密钥。

分页:列表接受 limit 和 offset(开关每页最多 100 个),还有更多页时返回 totalCount 和 _links.next。审计日志每次最多返回 20 条;AI 把 before 设为最后一条的 date 来向前翻页。

常见错误:401 表示令牌错误或已删除,403 表示令牌的角色不允许该调用,404 表示 key 未知,400 或 409 表示补丁无效或改动冲突(消息会说明问题),405 表示改动需要审批,429 表示触发速率限制(等待 X-Ratelimit-Reset 中的时间)。

该连接器不会创建或修改项目和环境,不管理成员、团队或角色,不删除分群,不创建实验,也不提交审批请求。

步骤 2 — 安装 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

步骤 3 — 在 Cursor 中添加连接器

你的服务器 URL: 在 AnythingMCP 中打开 MCP Servers → 此连接器所在的服务器,复制它的 URL(https://cloud.anythingmcp.com/mcp/…)。本指南中出现 YOUR_SERVER_ID 的地方都用它替换。

Cursor 从 ~/.cursor/mcp.json 读取 MCP 服务器。添加以下条目:

{
  "mcpServers": {
    "anythingmcp": {
      "url": "https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID",
      "headers": { "X-API-Key": "YOUR_MCP_API_KEY" }
    }
  }
}
  1. 在 AnythingMCP 的 MCP Servers → 你的服务器 → API keys 中创建 MCP API 密钥,并用它替换 YOUR_MCP_API_KEY。
  2. 保存文件并重启 Cursor。
  3. 打开 Cursor → Settings → MCP,确认 anythingmcp 已列出并处于已连接状态。
  4. 开始对话,智能体现在可以调用 LaunchDarkly 的工具。

可用工具

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

示例提示

  • “new-checkout 开关在生产环境中开着吗?它对谁返回什么?”
  • “default 项目中哪些开关在生产环境里已经至少 7 天处于 inactive?”
  • “在 test 环境中开启 dark-mode,备注写‘QA 测试’。先做一次 dry run,把结果给我看。”
  • “把用户 key beta-tester-17 加到生产环境的 beta-users 分群中。”
  • “这周是谁修改了生产环境中 new-checkout 的定向规则?具体改了什么?”

FAQ

Cursor 免费套餐支持自定义 MCP 服务器吗? 支持,Hobby、Pro 和 Business 套餐均可使用 MCP。

下一步

这份指南对你有帮助吗?

你的 LaunchDarkly 智能体只差一次点击。

安装连接器,粘贴密钥,向 Cursor 提问。免费试用 7 天,无需信用卡。

相关指南

连接器

如何通过 MCP 将 LaunchDarkly 连接到 ChatGPT

在任意 AI 智能体中使用 LaunchDarkly 功能管理:项目和环境,带状态和评估状态的功能开关,分群,指标和实验,审计日志,成员和团队。可以创建开关和分群,开启或关闭开关,并用语义补丁修改定向规则。

连接器

如何通过 MCP 将 LaunchDarkly 连接到 Claude

在任意 AI 智能体中使用 LaunchDarkly 功能管理:项目和环境,带状态和评估状态的功能开关,分群,指标和实验,审计日志,成员和团队。可以创建开关和分群,开启或关闭开关,并用语义补丁修改定向规则。

连接器

如何通过 MCP 将 LaunchDarkly 连接到 Gemini

在任意 AI 智能体中使用 LaunchDarkly 功能管理:项目和环境,带状态和评估状态的功能开关,分群,指标和实验,审计日志,成员和团队。可以创建开关和分群,开启或关闭开关,并用语义补丁修改定向规则。

连接器

如何通过 MCP 将 LaunchDarkly 连接到 Meta Muse

在任意 AI 智能体中使用 LaunchDarkly 功能管理:项目和环境,带状态和评估状态的功能开关,分群,指标和实验,审计日志,成员和团队。可以创建开关和分群,开启或关闭开关,并用语义补丁修改定向规则。

连接器

LaunchDarkly 接入 MCP:在任意 AI 智能体中管理功能开关、定向规则、分群、实验和审计日志

在任意 AI 智能体中使用 LaunchDarkly 功能管理:项目和环境,带状态和评估状态的功能开关,分群,指标和实验,审计日志,成员和团队。可以创建开关和分群,开启或关闭开关,并用语义补丁修改定向规则。

连接器

如何通过 MCP 将 LaunchDarkly 连接到 Microsoft Copilot

在任意 AI 智能体中使用 LaunchDarkly 功能管理:项目和环境,带状态和评估状态的功能开关,分群,指标和实验,审计日志,成员和团队。可以创建开关和分群,开启或关闭开关,并用语义补丁修改定向规则。