fix(mcpserver): catch KeyboardInterrupt and SystemExit gracefully on stdio transport
Closed
HI
24d ago+4+4+0123456789-1-1-0123456789
Summary
Running MCPServer.run("stdio") from a terminal or interactive process previously left uncaught KeyboardInterrupt / SystemExit exceptions unhandled around anyio.run, causing noisy interpreter shutdown tracebacks out of _thread._shutdown when users interrupt the server with Ctrl+C.
Solution
Wrap anyio.run(self.run_stdio_async) in MCPServer.run with a try ... except (KeyboardInterrupt, SystemExit): pass block so stdio server runs exit cleanly without dumping unhandled worker thread exceptions to the console.
Fixes #3551