跳过安装。2 分钟内即可运行。
在 cloud.anythingmcp.com 开始免费试用,一键添加 LaunchDarkly,然后将你的 AI 客户端(Claude、ChatGPT、Copilot 或 Cursor)指向生成的 MCP 端点。无需 Docker,无需 git clone,无需任何工程经验。
摘要
在任意 AI 智能体中使用 LaunchDarkly 功能管理:项目和环境,带状态和评估状态的功能开关,分群,指标和实验,审计日志,成员和团队。可以创建开关和分群,开启或关闭开关,并用语义补丁修改定向规则。
试试这样问
LaunchDarkly 的示例提示
点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。
Claude 是 AI,可能会出错。请核对回答。
💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → LaunchDarkly、粘贴凭证、生成 MCP API key,即可完成。无 Docker、无
git clone、无本地服务器。
LaunchDarkly + Meta Muse
在任意 AI 智能体中使用 LaunchDarkly 功能管理:项目和环境,带状态和评估状态的功能开关,分群,指标和实验,审计日志,成员和团队。可以创建开关和分群,开启或关闭开关,并用语义补丁修改定向规则。
前提条件
完整的设置说明已内置在连接器中 (在 store 中选择连接器时可见)。所需环境变量:
LAUNCHDARKLY_API_TOKEN
步骤 1 — 获取凭证
设置大约需要 2 分钟。你需要一个 LaunchDarkly 账户。
- 在 LaunchDarkly 中打开 Organization settings、Authorization(https://app.launchdarkly.com/settings/authorization),创建一个访问令牌。只读时选择 Reader 角色;要切换和修改开关,选择 Writer,或者一个只限于 AI 可以修改的项目和环境的自定义角色。服务令牌不绑定到某个人。
- 把令牌(
api-...,只显示一次)复制到LAUNCHDARKLY_API_TOKEN,然后运行launchdarkly_get_caller_identity:它会显示账户、令牌名称和类型、所属成员以及权限范围。SDK 密钥(sdk-...)和移动端密钥(mob-...)在这里无效。 - 如果使用欧盟实例或联邦实例,把连接器的基础 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 — 在 Muse 中添加连接器
你的服务器 URL: 在 AnythingMCP 中打开 MCP Servers → 此连接器所在的服务器,复制它的 URL(
https://cloud.anythingmcp.com/mcp/…)。本指南中出现YOUR_SERVER_ID的地方都用它替换。
Muse 以自定义连接器的形式添加远程 MCP 服务器,并通过 OAuth 登录。
- 在 Muse 中打开 Settings → Connectors,选择 Add custom connector。
- 粘贴 MCP 服务器 URL
https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID。 - Muse 会打开 AnythingMCP 的登录页面:登录并批准访问。
- 在聊天中,向 Muse 提出需要用到
LaunchDarkly的工具的请求。
你也可以在聊天中完成设置,适用于网页版、iOS 和 Android 应用以及 WhatsApp。给 Muse 发送这条消息:
Create a Custom Connector for a new remote MCP server, then connect to it:
Name: AnythingMCP
Transport: remote streamable HTTP
URL: https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID
Auth: OAuth
自托管?请用你实例的公网 HTTPS 地址替换 https://cloud.anythingmcp.com。Muse 从 Meta 的云端连接,因此 localhost 无法使用。
可用工具
| Tool | What it does |
|---|---|
launchdarkly_get_caller_identity | Show what the access token is: account, token name and kind (personal or service), the member it belongs to and its scopes |
launchdarkly_list_projects | List the projects with key, name, tags and default client-side settings |
launchdarkly_get_project | Get one project with its settings; add expand: environments for its environments (SDK keys are left out) |
launchdarkly_list_environments | List the environments of a project (e.g |
launchdarkly_get_environment | Get one environment with its settings: client-side id, default TTL, secure mode, whether changes need comments, confirmation or approval… |
launchdarkly_list_flags | List the feature flags of a project: key, name, description, kind (boolean or multivariate), variations, tags, temporary flag, maintainer… |
launchdarkly_get_flag | Get one feature flag with its variations (with their _id), defaults and, per environment, whether it is on, its targets, rules (with… |
launchdarkly_list_flag_statuses | List the evaluation status of every flag in one environment: new, active, inactive (not evaluated for 7 days) or launched (serving one… |
launchdarkly_get_flag_status | Get the evaluation status of one flag in one environment (new, active, inactive, launched) and when it was last requested |
launchdarkly_create_flag | Create a feature flag in a project, by default a boolean flag (variations true and false) that is off in every environment |
launchdarkly_toggle_flag | Turn a feature flag on or off in one environment |
launchdarkly_update_flag | Change a feature flag with semantic patch instructions: targeting (addRule, removeRule, addClauses, addTargets, removeTargets… |
launchdarkly_delete_flag | Delete a feature flag from every environment of the project |
launchdarkly_list_segments | List the segments of an environment: key, name, description, tags, whether it is a big segment, and when it changed |
launchdarkly_get_segment | Get one segment with its included and excluded targets, rules (with _id) and version |
launchdarkly_create_segment | Create an empty segment in one environment; add targets and rules afterwards with launchdarkly_update_segment |
launchdarkly_update_segment | Change a segment with semantic patch instructions: addIncludedTargets, removeIncludedTargets, addExcludedTargets, removeExcludedTargets… |
launchdarkly_list_metrics | List the metrics of a project (conversions, clicks, page views, numeric custom events) with key, name, kind, event key, unit, success… |
launchdarkly_get_metric | Get one metric with its definition and, with expand, the experiments and metric groups that use it |
launchdarkly_list_experiments | List the experiments of a project across environments: key, name, hypothesis, environment, current iteration status (not started, running… |
launchdarkly_get_experiment | Get one experiment with its hypothesis, current iteration (status, start date, treatments and traffic allocation, primary and secondary… |
launchdarkly_list_audit_log | List audit log entries, newest first: who changed what (flags, segments, environments, members) and when, with the title, description and… |
launchdarkly_get_audit_log_entry | Get one audit log entry with the full change: the JSON patch or semantic instructions applied, the previous and current version of the… |
launchdarkly_list_members | List the account members: id, email, name, role (reader, writer, admin, owner, no_access) or custom roles, teams, last seen and whether… |
launchdarkly_get_member | Get one account member with role, custom roles, teams and permission grants |
launchdarkly_list_teams | List the teams: key, name, description, member count and the roles they hold |
launchdarkly_get_team | Get 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
Muse 在哪些地区可用? Meta 目前在美国和加拿大提供 Muse,可在网页版、iOS 和 Android 应用以及 WhatsApp 中使用。
Meta 会审核这个连接器吗? 不会。Meta 不审核自定义连接器。Muse 只能看到你在 AnythingMCP 中为此 MCP 服务器启用的工具,你也可以随时在 Settings → Connectors 中断开它。
下一步
这份指南对你有帮助吗?