Skip to content

fix(desktop): wire MCP server for Claude Code agents - #6658

Open
BradGroux wants to merge 1 commit into
block:mainfrom
BradGroux:fix/claude-mcp-command
Open

fix(desktop): wire MCP server for Claude Code agents#6658
BradGroux wants to merge 1 commit into
block:mainfrom
BradGroux:fix/claude-mcp-command

Conversation

@BradGroux

Copy link
Copy Markdown
Contributor

Note: This is a replacement for PR #6604, which was accidentally closed when branches were force-pushed after a commit identity rewrite. The changes are identical, rebased onto the latest main.

Summary

Claude Code agents get no MCP server from Buzz because the Claude entry in KNOWN_ACP_RUNTIMES has mcp_command: None. Desktop sets BUZZ_ACP_MCP_COMMAND="", and the harness's build_mcp_servers returns an empty list — the session/new mcpServers field stays empty.

Goose avoids this because it loads MCP servers from its own config.yaml (supports_acp_native_config: true). Claude has no native config support — the only way it receives MCP servers is through the session/new mcpServers field, which stays empty when BUZZ_ACP_MCP_COMMAND is blank.

Set Claude's mcp_command to Some("buzz-dev-mcp"), matching Codex and Buzz Agent.

Related issue

Closes #6593

Testing

New unit test claude_has_mcp_command in runtime/tests.rs asserts that known_acp_runtime("claude-agent-acp") resolves with mcp_command: Some("buzz-dev-mcp"). The existing codex_has_mcp_command and goose_has_no_mcp_hooks tests are unchanged, confirming Goose still uses its native config path and Codex still has its MCP command.

Cannot run the full cargo test suite from this host (no Rust toolchain). The build and test gate will be verified on CI.

@BradGroux

Copy link
Copy Markdown
Contributor Author

This is a replacement for #6604, which was accidentally closed when branches were force-pushed after a commit identity rewrite. Prior review comments and feedback are preserved on the old PR:

#6604

@BradGroux
BradGroux force-pushed the fix/claude-mcp-command branch from 6411422 to 61b3502 Compare August 25, 2026 19:16
@BradGroux

Copy link
Copy Markdown
Contributor Author

Rebased onto the latest main (was 36 commits behind). The branch applied cleanly — Claude's mcp_command is still None on current main, so this change is still needed.

No review comments on this PR. CI will verify the build and test gate.

@BradGroux
BradGroux force-pushed the fix/claude-mcp-command branch from 61b3502 to 77a237e Compare August 29, 2026 16:15
@github-actions

github-actions Bot commented Aug 29, 2026

Copy link
Copy Markdown

🔐 Codex Security Review

Status: review required for the current range.

The current range is f038cbbb0d4092a72ffd93f17916f84d2b39bb43...f8a58815e6edc294098071614374fbb04e4bf9d0.
A new review must complete for this exact range. When manual authorization
is required, a Block organization member must comment exactly
@buzz-security-review f8a58815e6edc294098071614374fbb04e4bf9d0 to authorize a new review.
Any previous review applies only to its recorded range.

@BradGroux

Copy link
Copy Markdown
Contributor Author

Rebased onto the latest main (was 62 commits behind at f249710, now at 00e61ea). The branch applies cleanly with all tests passing.

Still-needed assessment: No upstream commits in the 62-commit window address the same issue. This PR remains needed.

Review requests: buzz-oss-team review request is active from the previous pass.

@BradGroux
BradGroux force-pushed the fix/claude-mcp-command branch from 77a237e to 2aa4708 Compare September 2, 2026 17:31
@BradGroux

Copy link
Copy Markdown
Contributor Author

Rebased onto current block:main (2af9773d6) — 38 new commits since the last rebase pass (Aug 29, 00e61eafa). Rebased cleanly with no conflicts.

Still needed: Checked all 38 new upstream commits for overlap with this PR's topic. None of the upstream changes address the issue this PR fixes. The PR remains relevant.

Verification:

  • Branch is 0 commits behind block:main, mergeable on GitHub
  • All commits authored as Brad Groux (3053586+BradGroux noreply)
  • DCO signoff preserved on all commits

@BradGroux
BradGroux force-pushed the fix/claude-mcp-command branch from 2aa4708 to 2bda390 Compare September 3, 2026 17:17
@BradGroux

Copy link
Copy Markdown
Contributor Author

Rebase and review — 2026-09-03

Base commit: 752cbfc03 (latest main)
Mergeable: Yes
Conflict resolution: The KNOWN_ACP_RUNTIMES table was refactored from inline in discovery.rs to a separate discovery/catalog.rs submodule on main. Applied the one-line fix (mcp_command: Some("buzz-dev-mcp")) to the new file location. Added the claude_has_mcp_command test to the runtime tests.

Accuracy review: The bug is still present on main — Claude's entry in discovery/catalog.rs still has mcp_command: None.
Continued relevance: Still needed — no recent main commit wires Claude's MCP server.

@BradGroux
BradGroux force-pushed the fix/claude-mcp-command branch from 2bda390 to 3427a23 Compare September 3, 2026 17:45
@BradGroux

Copy link
Copy Markdown
Contributor Author

Rebase and review update — Sep 3, 2026

Rebased onto latest main (88687876f). No conflicts — the new main commit only touched buzz-relay lifecycle logging, which doesn't overlap with this PR's desktop Claude Code MCP server wiring.

Accuracy review: Main does not wire an MCP server for Claude Code agents. The config bridge has test coverage for mcp_config_file_path and claude_config_dir, but no runtime MCP server spawn path for Claude. The PR remains needed.

Mergeable status: Confirmed MERGEABLE on GitHub after force-push.

Claude Code's entry in KNOWN_ACP_RUNTIMES had mcp_command: None, so
Desktop set BUZZ_ACP_MCP_COMMAND="" and the harness never spawned a
MCP server for Claude agents. Goose avoided this because it loads MCP
servers from its own config.yaml (supports_acp_native_config: true),
but Claude has no native config support — the only way it receives
MCP servers is through the session/new mcpServers field, which stays
empty when BUZZ_ACP_MCP_COMMAND is blank.

Set Claude's mcp_command to Some("buzz-dev-mcp"), matching Codex and
Buzz Agent. Added a test asserting Claude has the MCP command wired.

Closes block#6593

Co-authored-by: Brad Groux <brad@digitalmeld.com>
Signed-off-by: Brad Groux <brad@digitalmeld.com>
Signed-off-by: Brad Groux <bradgroux@hotmail.com>
Signed-off-by: Brad Groux <3053586+BradGroux@users.noreply.github.com>
@BradGroux

Copy link
Copy Markdown
Contributor Author

Rebase pass — Sep 5, 2025

Rebased onto current upstream main (f038cbbb0). Main moved 62 commits since the Sep 2 rebase pass (2af9773d6).

Rebase result

Conflict resolved in desktop/src-tauri/src/managed_agents/discovery.rs (upstream extracted KNOWN_ACP_RUNTIMES to catalog.rs submodule via #4625, PR's commit changed Claude's mcp_command from None to Some("buzz-dev-mcp") in the old inline array. Resolution dropped the PR's duplicate array definition — the fix applies in the extracted catalog.rs. The PR's test assertion was preserved.

Note: upstream #4625 extracted the runtime catalog but kept Claude's mcp_command as None — this PR's fix is still needed.

Still-needed assessment

Checked all 62 new main commits for overlap with this PR's topic. None obsoleted:

Verification

  • PR confirmed MERGEABLE on GitHub
  • All commits authored as Brad Groux (3053586+BradGroux noreply)
  • DCO signoff preserved on all commits
  • Review requests to buzz-oss-team still active from the Aug 24 recovery pass

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.

buzz-acp: mcp_command / BUZZ_ACP_MCP_COMMAND is never wired for runtime=claude (only runtime=goose)

1 participant