Skip to content

feat: allow the MCP tools that the experimentation skill needs - #971

Merged
cchu-ld merged 2 commits into
mainfrom
cchu/mcp-tool-allowlist
Oct 26, 2026
Merged

cchu-ld merged 2 commits into
mainfrom
cchu/mcp-tool-allowlist

Conversation

@cchu-ld

@cchu-ld cchu-ld commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

Related issues

This change prepares for #970, which adds the experiment-orchestration skill. It does not depend on #970.

Describe the solution you've provided

ldcli aws-devops-agent setup connects the LaunchDarkly MCP server to the agent space with a tool allowlist. AWS has no option to allow all tools. The list came from #847 and had only list-projects, list-flags, get-flag, and toggle-flag. With that list, the agent cannot do the steps of the skill.

The allowlist now has these tools:

  • Read-only: list-projects, get-project, get-environment, list-flags, get-flag, get-flag-status-across-envs, check-flag-rollout-complete, query-change-history, list-metrics, get-metric, list-experiments, get-experiment, get-experiment-results, get-experiment-metric-results, list-segments, get-segment, list-approval-requests, list-release-policies, match-release-policies.
  • Mutative: toggle-flag, create-flag, update-rollout, archive-flag, create-experiment, start-experiment-iteration, stop-experiment-iteration, start-guarded-rollout, stop-guarded-rollout, update-targeting-rules, update-individual-targets, create-approval-request.

The approval, targeting, and release policy tools are for incident work and for environments that need approval. If an environment needs approval, toggle-flag, update-rollout, and start-guarded-rollout return requiresApproval: true, and the agent must call create-approval-request. The targeting tools turn a change off for one segment or context, not for all traffic. The list does not have apply-approval-request, so the agent cannot approve its own request.

The agent calls a read-only tool with no approval. So each tool that changes LaunchDarkly state is mutative. A new test makes sure that each tool has one classification and that the tools that write are mutative.

The list does not have create-metric. The skill uses metrics that the user names in step 1, so the agent does not create metrics.

Describe alternatives you've considered

Setup can update the tools of an association that an older ldcli version made. I did not do this, because the command is not released yet.

Additional context

I called tools/list on https://mcp.launchdarkly.com/mcp/launchdarkly with a LaunchDarkly token. The server has 174 tools, and all 31 tools in the allowlist are in that list. The classification matches the annotations of the server: each read-only tool has readOnlyHint: true, and each mutative tool has readOnlyHint: false. I did not run setup against a real agent space with the new list.

🤖 Generated with Claude Code


Note

Overview
Expands the LaunchDarkly MCP tool allowlist used when ldcli aws-devops-agent setup associates the MCP server with an agent space, so the agent can run experiment-orchestration and related workflows instead of only listing flags and toggling.

Read-only tools grow from three to nineteen (projects, environments, flags, metrics, experiments, segments, approvals, release policies, change history, etc.). Mutative tools grow from toggle-flag alone to twelve, including flag lifecycle, experiments, guarded rollouts, targeting updates, and create-approval-request (not apply-approval-request). Comments document why each bucket exists: read-only tools run without user approval; anything that changes LaunchDarkly state must be mutative.

Adds TestMCPAssociationClassifiesTheSkillTools, which runs setup and asserts every allowlisted tool has a matching ToolDetails entry and that representative write vs read tools get the correct AWS ToolClassification.

Reviewed by Cursor Bugbot for commit 4e920d4. Bugbot is set up for automated code reviews on this repo. Configure here.

The MCP server association allowed only list-projects, list-flags,
get-flag, and toggle-flag. The experiment-orchestration skill also must
create flags, run experiments, read results, and start guarded rollouts.

The allowlist now has 14 read-only tools and 9 mutative tools. Each tool
that changes LaunchDarkly state is mutative, so the agent asks before it
calls the tool.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
var (
mcpReadOnlyTools = []string{"list-projects", "list-flags", "get-flag"}
mcpMutativeTools = []string{"toggle-flag"}
mcpReadOnlyTools = []string{

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note AWS only allows agent spaces to have 500 tools across all MCP servers.

Technically LD has 174 available tools - we're limiting it to just these here to support the experimentation skill and the core LD features.

The allowlist now has these mutative tools: create-approval-request,
update-targeting-rules, and update-individual-targets. It also has these
read-only tools: list-approval-requests, list-segments, get-segment,
list-release-policies, and match-release-policies.

An environment that needs approval rejects a flag change. The tool then
tells the agent to call create-approval-request. The targeting tools turn
a change off for one segment or context, not for all traffic.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cchu-ld
cchu-ld marked this pull request as ready for review October 26, 2026 21:14
@cchu-ld
cchu-ld requested a review from a team as a code owner October 26, 2026 21:14
@cchu-ld
cchu-ld requested review from a team and tiffanylphan and removed request for a team October 26, 2026 21:14
@cchu-ld
cchu-ld merged commit a31fe9a into main Oct 26, 2026
12 checks passed
@cchu-ld
cchu-ld deleted the cchu/mcp-tool-allowlist branch October 26, 2026 21:20
cchu-ld added a commit that referenced this pull request Oct 26, 2026
The experiment-orchestration skill keeps its experiment record in the flag
description and creates a missing primary metric, so the allowlist includes
update-flag-settings and create-metric. The list starts from the one on main
(#971).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cchu-ld added a commit that referenced this pull request Oct 26, 2026
The experiment-orchestration skill keeps its experiment record in the flag
description and creates a missing primary metric, so the allowlist includes
update-flag-settings and create-metric. The list starts from the one on main
(#971).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants