Summary
An ACP host (Alas, https://github.com/mrmans0n/alas) injects a per-session, dynamically-configured stdio MCP server into session/new's mcpServers array (fresh command/env per session — the server binary, socket path, and session id are all generated at session-creation time). The server itself is verified working: running it directly and sending initialize + tools/list over stdio returns a valid tool list.
Inside the resulting Claude Code session, the agent has no visibility into this server at all:
- It doesn't show up as an available/deferred tool.
ToolSearch (deferred-tool lookup) returns no match for its name or its tool names.
- It doesn't even appear as a "known but not yet connected/authenticated" server, unlike statically-configured MCP connectors (e.g. Atlassian, Slack), which do show up in that state when unauthenticated.
Meanwhile the ACP host has no way to detect this from its side: it only knows that it sent the server in mcpServers — ACP defines no confirmation signal for "the agent successfully connected to server X and exposed its tools." So the host UI shows the server as attached/requested while the model-facing session behaves as if it was never mentioned.
Versions
@agentclientprotocol/claude-agent-acp: 0.59.0
- Bundled
@anthropic-ai/claude-agent-sdk: 0.3.207
@agentclientprotocol/sdk: 1.2.1
- Platform: macOS (darwin), Node (current)
Repro
- Have an ACP client send
session/new with an mcpServers entry of the plain stdio shape (no type field, i.e. the default/stdio variant per the ACP schema):
{
"name": "myserver",
"command": "/path/to/binary",
"args": ["mcp"],
"env": [{"name": "SOME_RUNTIME_VAR", "value": "generated-per-session"}]
}
where the command/env are freshly generated for this specific session (not a static entry present in ~/.claude.json or any project .mcp.json ahead of time).
- Confirm the binary works standalone: pipe
initialize then tools/list JSON-RPC lines to it directly — it returns a normal tool list.
- Start a prompt in the resulting session and ask the model what MCP servers/tools it has. It reports none, and
ToolSearch for the server's tool names returns nothing.
Expected
Either:
- The server is connected and its tools appear (directly or via
ToolSearch) like any other MCP server, or
- If it fails to connect, that failure is visible to the model (as "known but unavailable", matching the treatment of unauthenticated static connectors) and/or surfaced back to the ACP host via
session/update so the host doesn't report it as successfully requested.
Additional context
Happens consistently across fresh sessions, not tied to a specific worktree/session id. The server config is otherwise schema-valid per the ACP McpServer stdio variant (bare name/command/args/env, no type key).
Summary
An ACP host (Alas, https://github.com/mrmans0n/alas) injects a per-session, dynamically-configured stdio MCP server into
session/new'smcpServersarray (fresh command/env per session — the server binary, socket path, and session id are all generated at session-creation time). The server itself is verified working: running it directly and sendinginitialize+tools/listover stdio returns a valid tool list.Inside the resulting Claude Code session, the agent has no visibility into this server at all:
ToolSearch(deferred-tool lookup) returns no match for its name or its tool names.Meanwhile the ACP host has no way to detect this from its side: it only knows that it sent the server in
mcpServers— ACP defines no confirmation signal for "the agent successfully connected to server X and exposed its tools." So the host UI shows the server as attached/requested while the model-facing session behaves as if it was never mentioned.Versions
@agentclientprotocol/claude-agent-acp: 0.59.0@anthropic-ai/claude-agent-sdk: 0.3.207@agentclientprotocol/sdk: 1.2.1Repro
session/newwith anmcpServersentry of the plain stdio shape (notypefield, i.e. the default/stdio variant per the ACP schema):{ "name": "myserver", "command": "/path/to/binary", "args": ["mcp"], "env": [{"name": "SOME_RUNTIME_VAR", "value": "generated-per-session"}] }~/.claude.jsonor any project.mcp.jsonahead of time).initializethentools/listJSON-RPC lines to it directly — it returns a normal tool list.ToolSearchfor the server's tool names returns nothing.Expected
Either:
ToolSearch) like any other MCP server, orsession/updateso the host doesn't report it as successfully requested.Additional context
Happens consistently across fresh sessions, not tied to a specific worktree/session id. The server config is otherwise schema-valid per the ACP
McpServerstdio variant (barename/command/args/env, notypekey).