Repository navigation
Agent: accept client stdio MCP servers over ACP - #1622
Merged
Merged
Conversation
ACP's stable spec requires agents to support stdio MCP servers; Maple refused them, so session/new failed outright for clients that send one (T3 Code, Buzz's buzz-acp). The refusal guarded against running caller-supplied code on the host, but the ACP caller is always a local program that started `maple-agent acp` and can already run commands as the same user. session/new and session/load now start a client's stdio server through the existing host-owned stdio lifecycle: the task's folder, the login shell's PATH, its own process group, the same protected environment variables, and stopped on detach like the HTTP bindings. A client sends a program and argument list, not a typed command line, so the stdio transport gains an optional exact `argv` that is used as given, with no splitting or `~` expansion. Saved servers keep their typed line. Only the program is kept as the shown command, since arguments may hold secrets. Refs #1606 Co-Authored-By: Claude <[email protected]>
AnthonyRonning
force-pushed
the
acp-stdio-mcp
branch
from
November 17, 2026 08:00
e040a13 to
2d193c5
Compare
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.
Lets ACP clients attach stdio MCP servers in
session/newandsession/load. Maple refused them, so the session never opened for clients that send one: T3 Code and Buzz'sbuzz-acpboth hit this (#1606).Why the refusal goes. It guarded against running caller-supplied code on the host. But the ACP caller is always a local program that started
maple-agent acpover a pipe, so it can already run commands as the same user. The stable ACP spec also requires agents to support stdio MCP servers; HTTP is the optional one.What changes
argv. A client sends a program and an argument list, not a typed command line, so the words are used as given, with no splitting and no~expansion. Saved servers keep their typed line and behave as before.argv.Decisions for review
PATH, loader variables and the like) apply to a client's server too, as they do to one configured in Maple. A client that sends one of them getssession/newrefused with a message naming the variable.Rebased onto #1618, which added MCP over the ACP connection and per-model reasoning levels and kept stdio refused. Its two stdio-refusal tests are replaced by the acceptance tests here, and a session can now carry HTTP, stdio and
acpservers together.Refs #1606
Testing
prepare_session_mcpkeeps a stdio server's exact words, including an empty argument, and its environment.just ci-lint,just ci-testandjust ci-extrapass on macOS on the rebased tree (3,022 tests, 0 failed), with the MCP-over-ACP tests from Agent: serve MCP over ACP and model reasoning #1618 and the stdio tests passing together.buzz-acpthemselves.🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.