Open
Description
As per https://modelcontextprotocol.io/specification/2025-03-26/basic/lifecycle#stdio
For the stdio transport the client SHOULD initiate shutdown by
- First, closing the input stream to the child process (the server)
- Waiting for the server to exit, or sending SIGTERM if the server does not exit within a reasonable time
- Sending SIGKILL if the server does not exit within a reasonable time after SIGTERM
None of this is happening, only SIGTERM is sent in the current code: https://github.com/modelcontextprotocol/typescript-sdk/blob/main/src/client/stdio.ts#L202
As a result MCP server can't exit cleanly on Windows. Non-Windows platforms exit cleanly as per SIGTERM handling.