For a stdio-transport MCP server, which signal indicates the client intends to shut down the session?
Answer: stdin reaches EOF (the client closes the write end of the pipe)
In stdio transport, the client spawns the server as a subprocess. When the client is done, it closes the stdin pipe, which causes the server to read EOF. The server should treat EOF as the shutdown signal and begin graceful draining. There is no dedicated shutdown method in the MCP protocol; SIGTERM handling is supplementary but not the primary signal.