Repository navigation
v0.25.16
MCP stdio: a process group of its own (opt-in, Unix)
McpClient::connect_stdio_with(command, args, env, StdioOptions::new().own_process_group(true)), or StdioTransport::with_options:
- Ctrl+C: a Ctrl+C in the host's terminal no longer reaches the server.
- Close and drop:
close()and dropping the client kill the whole group, so whatever the server started (npx→node,uvx→python) goes with it. Today only the command itself is killed, and a child that ignores its closed input survives. - Safety: the group is signalled only while its leader is still the transport's (running, or exited and not yet collected), checked with
waitidandWNOWAIT, so the signal can't reach an unrelated process group. - Trade-off: when the host exits without dropping its clients (killed, an uncaught Ctrl+C,
process::exit), whatever in the group ignores its closed input keeps running. So catch Ctrl+C and drop or close your clients. The default is unchanged.
A stdio server that stops reading reads as gone
A failed write marks the server: McpClient::exited() answers "… no longer reads its input (its process is still running)", and an McpToolSource withdraws its tools.
Full details: CHANGELOG.md (#383).