Serverdex error reference · read 21 November 2026
Server transport closed unexpectedly: what it means and how to fix it
Server transport closed unexpectedly · Transport closedThe stdio or HTTP transport ended while the client still expected it to be open. The process exited, was killed, or the HTTP stream was cut — the client reports the closure rather than the server's own error.
Shown by: Claude Desktop · Claude Code · Codex · custom clients
Causes, most likely first — and the fix for each
1The server process crashed after the handshake (unhandled exception on the first tool call, out of memory).
Fix: Run the server in a terminal, repeat the action that triggers the closure, and read the crash output. Fix the environment variable or dependency it names.
2The server was started but its stdout was polluted by a log line, so the client gave up and closed the transport.
Fix: Route logs to stderr; see the TypeScript SDK troubleshooting page.
3Codex and some clients close a stdio server that stays silent for too long on start (reports mention ~90 seconds).
Fix: Make the server answer initialize quickly; move slow setup (model loading, big downloads) after the handshake or run it as a remote server.
Still failing?
Work through the twelve general causes in order in MCP server not working: the causes, in order, check the exact config file path and shape for your client in the client setup guides, or generate a known-good config with the config generator.
Sources (read 21 November 2026)
Other MCP errors: MCP error -32000: Connection closed · MCP error -32001: Request timed out · MCP error -32601: Method not found · MCP error -32602: Invalid params · MCP error -32603: Internal error · MCP error -32600: Invalid request · HTTP 406 Not Acceptable from an MCP server · spawn npx ENOENT · spawn uvx ENOENT (and uv, docker) · Client closed (Cursor) · No tools, prompts, or resources (Cursor) · Unexpected token … is not valid JSON · SSE error: Invalid content type, expected text/event-stream · Could not attach to MCP server (Claude Desktop) · Failed to reconnect to an MCP server (Claude Code) · MCP server needs authentication (401 Unauthorized) · MCP OAuth loop (infinite sign-in tabs) · Tools limited to 40 total (Cursor) · executable file not found in $PATH (Antigravity) · MODULE_NOT_FOUND / No module named mcp.server.fastmcp.