Skip to content

feat(acp): add BUZZ_ACP_MCP_ARGS for MCP servers that need arguments#2740

Open
maxchop wants to merge 1 commit into
block:mainfrom
maxchop:feat/acp-mcp-args
Open

feat(acp): add BUZZ_ACP_MCP_ARGS for MCP servers that need arguments#2740
maxchop wants to merge 1 commit into
block:mainfrom
maxchop:feat/acp-mcp-args

Conversation

@maxchop

@maxchop maxchop commented Jul 24, 2026

Copy link
Copy Markdown

feat(acp): add BUZZ_ACP_MCP_ARGS for MCP servers that need arguments

What this changes

BUZZ_ACP_MCP_COMMAND is handed to the agent as a bare binary with an empty
args list:

vec![McpServer {
    name: /* file stem of mcp_command */,
    command: config.mcp_command.clone(),
    args: vec![],
    ...
}]

That works for a server that is directly executable with no arguments, which
is the buzz-dev-mcp case the current docs describe. It does not work for a
server that is launched through a runner. Setting

BUZZ_ACP_MCP_COMMAND="npx -y some-mcp-server"

does not split into program and arguments, so the whole string is treated as
one executable path and the spawn fails. There is currently no way to attach
such a server to an ACP agent at all.

This adds BUZZ_ACP_MCP_ARGS, mirroring the BUZZ_ACP_AGENT_COMMAND /
BUZZ_ACP_AGENT_ARGS pair that already exists directly above it in
CliArgs, including the same value_delimiter = ',':

BUZZ_ACP_MCP_COMMAND=npx
BUZZ_ACP_MCP_ARGS=-y,some-mcp-server

Why this shape

It follows the convention the crate already uses for the agent subprocess
rather than introducing a second one, so there is nothing new to learn: the
command and args split the same way in both places.

Splitting BUZZ_ACP_MCP_COMMAND on whitespace instead would have been fewer
lines, but it would silently change the meaning of any existing value
containing a space, and it does not match how the agent side is configured.

Compatibility

BUZZ_ACP_MCP_ARGS defaults to empty, so any existing configuration behaves
exactly as before. The MCP server name is still derived from the command's
file stem, unaffected by the arguments.

Tests

Three tests added alongside the existing build_mcp_servers tests:

  • mcp_args_default_to_empty
  • mcp_args_are_passed_to_the_server
  • mcp_args_do_not_affect_the_derived_server_name

cargo test -p buzz-acp --lib passes: 595 passed, 0 failed.
cargo fmt -p buzz-acp -- --check is clean.

Docs

.env.example and crates/buzz-acp/README.md both updated with the new
variable.

BUZZ_ACP_MCP_COMMAND is passed to the agent as a bare binary with an
empty args list, so it only supports MCP servers that are directly
executable with no arguments (such as buzz-dev-mcp).

Servers that are launched through a runner cannot be attached at all.
A value like "npx -y some-mcp-server" is not split, so it is treated as
a single executable path and fails to spawn.

Add BUZZ_ACP_MCP_ARGS, mirroring the existing BUZZ_ACP_AGENT_COMMAND and
BUZZ_ACP_AGENT_ARGS pair, including the comma value delimiter. The
default is empty, so existing configurations are unaffected and the
server name is still derived from the command's file stem.
@maxchop
maxchop requested a review from a team as a code owner July 24, 2026 18:05
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.

1 participant