What does "MCP error -32000: Connection closed" mean?

“MCP error -32000: Connection closed” means the client’s connection to an MCP server ended while a request was still waiting. It’s ConnectionClosed in the MCP TypeScript SDK, which raises it when the transport closes with requests pending, so it says what happened to the connection, not why.

Over stdio, the client launches the server as a subprocess, and the spec says that if the process exits unexpectedly, its in-flight requests are lost. So check first whether the process ever ran: a missing runtime, a wrong path, or a package that failed to install would end it before the first request.

Run the exact launch command in a terminal and read what it writes to stderr. The reason is in the server’s output, not in the error.

Over HTTP there is no subprocess to exit. There, a broken response stream loses the in-flight request, and the client re-issues it with a new id.

published

sources

keep reading

More on this.

Try Tessary on Cloud.

free · 10,000 traces a month · 1 GB · 30-day retention · $10 one-time credit for triage and RCA · no credit card