# 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](https://github.com/modelcontextprotocol/typescript-sdk/blob/v1.x/src/types.ts), which [raises it](https://github.com/modelcontextprotocol/typescript-sdk/blob/v1.x/src/shared/protocol.ts) 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](https://modelcontextprotocol.io/specification/2026-07-28/basic/transports/stdio.md) 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](/answers/mcp-tool-reliability/what-happens-to-an-mcp-call-if-the-connection-drops) loses the in-flight request, and the client re-issues it with a new id.

---

Published: 2026-11-24

Sources:
- MCP TypeScript SDK: ErrorCode enum (ConnectionClosed = -32000): https://github.com/modelcontextprotocol/typescript-sdk/blob/v1.x/src/types.ts (fetched 2026-11-24)
- MCP TypeScript SDK: Protocol (raises ConnectionClosed on close): https://github.com/modelcontextprotocol/typescript-sdk/blob/v1.x/src/shared/protocol.ts (fetched 2026-11-24)
- MCP specification: stdio transport: https://modelcontextprotocol.io/specification/2026-07-28/basic/transports/stdio.md (fetched 2026-11-24)

Source: https://tessary.ai/answers/agent-error-messages/what-does-mcp-error-32000-connection-closed-mean
More on Agent error messages: https://tessary.ai/answers/agent-error-messages
From Tessary, agent reliability for AI agents in production: https://tessary.ai
