Skip to content

v0.25.16

Choose a tag to compare

@yuanhao yuanhao released this 28 Oct 15:58
· 38 commits to main since this release
03e61bd

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 waitid and WNOWAIT, 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).