feat(acp): add BUZZ_ACP_MCP_ARGS for MCP servers that need arguments#2740
Open
maxchop wants to merge 1 commit into
Open
feat(acp): add BUZZ_ACP_MCP_ARGS for MCP servers that need arguments#2740maxchop wants to merge 1 commit into
maxchop wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(acp): add BUZZ_ACP_MCP_ARGS for MCP servers that need arguments
What this changes
BUZZ_ACP_MCP_COMMANDis handed to the agent as a bare binary with an emptyargs list:
That works for a server that is directly executable with no arguments, which
is the
buzz-dev-mcpcase the current docs describe. It does not work for aserver that is launched through a runner. Setting
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 theBUZZ_ACP_AGENT_COMMAND/BUZZ_ACP_AGENT_ARGSpair that already exists directly above it inCliArgs, including the samevalue_delimiter = ',':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_COMMANDon whitespace instead would have been fewerlines, 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_ARGSdefaults to empty, so any existing configuration behavesexactly 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_serverstests:mcp_args_default_to_emptymcp_args_are_passed_to_the_servermcp_args_do_not_affect_the_derived_server_namecargo test -p buzz-acp --libpasses: 595 passed, 0 failed.cargo fmt -p buzz-acp -- --checkis clean.Docs
.env.exampleandcrates/buzz-acp/README.mdboth updated with the newvariable.