pub async fn serve<R, W>(
server: &McpServer,
reader: R,
writer: &mut W,
) -> Result<()>Expand description
The stdio loop: newline-delimited JSON-RPC in, one response line per request out. Generic over the reader/writer so tests can run the whole handshake in-process. EOF on stdin (the client closed the session) is a clean shutdown.