Smith::MCP::StdioTransport
Inherits Smith::MCP::Transport < Reference < Object
A child process speaking JSON-RPC over its stdin/stdout.
stderr is drained by its own fiber and never mixed into the protocol stream: servers log to stderr freely, and a single stray line on the wrong stream would otherwise desynchronise the connection.
Constants
Time a terminated server gets to exit before it is killed outright.
How many stderr lines to keep. Enough to explain a failed handshake, little enough that a chatty server cannot grow the process.
Constructors
Instance methods
SIGTERM, then SIGKILL. Both are needed: a server that ignores TERM would otherwise be left behind as an orphan holding whatever it opened.
One complete message. Framing is line-based, so neither side may embed a raw newline — JSON escapes them, which is why this works at all.