Expand description
Spawning one configured MCP server, in isolation (#5428).
Why: a task run may have several connectors configured and exactly one of
them broken — a typo’d command, a server that hangs on initialize, a
binary that exits immediately. None of that may abort the run or the other
servers, so every connection attempt is independently bounded and every
failure is a value, never an error that propagates.
What: connect spawns the child through the SHARED
trusty_common::stdio_mcp_client::StdioMcpClient (never a bespoke
transport), runs the handshake and tools/list under one
HANDSHAKE_TIMEOUT, and returns either the live client plus its tools or
a one-line reason. A remote transport is refused here with the same shape,
because “slice 1 does not speak HTTP” is a status, not a fault.
Test: super::tests::spawn_tests, mcp_loader_e2e::spawn_failure_isolates_the_healthy_server.
Structs§
- Connected
- A live server: its client handle and the tools it advertised.
Constants§
- HANDSHAKE_
TIMEOUT - Wall-clock bound on one server’s whole startup: handshake plus
tools/list.
Functions§
- connect
- Spawn one server and discover its tools, or say why not.
- connect_
within connectwith the startup bound supplied.