Runtime figures for server-status: start time, tool count, response sizes.
Get server statistics.
Whether start() ran and the server has not stopped.
Registered tools.
Names of the registered tools.
Number of registered tools.
Get all registered tools as a map.
Check if the server is running.
Start the MCP server and listen for messages via stdio.
Stop the MCP server.
Main MCP server class that handles the complete MCP protocol lifecycle.
Remarks
Owns the stdio server lifecycle. The protocol is served by the MCP SDK (
serveStdio, both eras) over a size-limited stdio transport; the tools come from the tool registry.The stdio server ends when the client goes away: stdin
end,closeorerror, a failing stdout (EPIPE), SIGINT, SIGTERM, SIGHUP, or its parent process disappearing. The last check covers clients that die while another process still holds the stdin pipe open, so EOF never arrives.