MCP error -32000: Connection closed. Why MCP servers exit on startup

MCP error -32000: Connection closed means the server process your client started is gone. We launched 171 local (stdio) MCP servers with no credentials; 34 of 171 failed to start or answer the handshake (31 exited, 2 failed to install, 1 timed out). Below is what each one printed, grouped by cause.

Short answer

Run the exact command from your MCP config in a terminal and read the first error. In our tests the causes were (with counts): mcp Python SDK 2.x API change (8); Install failed (2); No runnable entry point (3); Needs a command-line argument or subcommand (6); Needs a running service, file or program (5); Package retired in favour of another install (1); Python dependency missing or incompatible (2); Tried to install its own dependencies at startup (1); Started an HTTP server instead of stdio (1); Node.js crash on startup (3); Exited with no output (2). Separately, 29 servers stopped at a credential check: see MCP servers that need an API key or sign-in.

Last tested 2026-10-22

How we test: methodology. Context cost: lowest context cost MCP servers. Not tested by us: security, output quality, and behaviour with real credentials.

Check these first

  1. Run the command yourself. Copy command and args from your config into a terminal. If it prints an error and returns to the prompt, that error is the cause.
  2. Set required environment variables in the server's env block. Many servers exit at once without a key or URL.
  3. Check the start command. Some packages need a subcommand or argument; some have no runnable entry point at all (see below).

Causes we recorded, with verbatim output

Our stored output keeps the end of each server's stderr. Excerpts are verbatim, shortened to one line. Our client is not Claude Code, Claude Desktop or Cursor; we have not tested the suggested fixes.

mcp Python SDK 2.x API change (8)

The package was written for version 1 of the mcp Python SDK and crashed on import under 2.x. What to try not tested by us: See the mcp Python SDK 2.x page for the verbatim errors and the mcp<2 pin (not tested by us).

ServerLaunchWhat it printed (verbatim excerpt)Tested
Fetch (Python alt)
mcp-server-fetch-python 0.1.1
uvxAttributeError: 'Server' object has no attribute 'list_tools'2026-10-22
Kubernetes (Python)
mcp-server-kubernetes 0.1.6
uvxModuleNotFoundError: No module named 'mcp.server.fastmcp'. This is mcp 2.x, where FastMCP was renamed to MCPServer (from mcp.server.mcpserver import MCPServer) and other …2026-10-22
Office Word
mcp-server-office 0.2.0
uvxAttributeError: 'Server' object has no attribute 'list_tools'2026-10-22
Playwright (Python)
playwright-mcp-server 0.1.0
uvxModuleNotFoundError: No module named 'mcp.server.fastmcp'. This is mcp 2.x, where FastMCP was renamed to MCPServer (from mcp.server.mcpserver import MCPServer) and other …2026-10-22
Postgres MCP Pro (Crystal DBA)
postgres-mcp 0.3.0
uvxAttributeError: 'Server' object has no attribute 'list_resources'2026-10-22
SQLite (legacy reference, Python)
mcp-server-sqlite 2025.4.25
uvxAttributeError: 'Server' object has no attribute 'list_resources'2026-10-22
Tree-sitter
mcp-server-tree-sitter 0.7.0
uvxModuleNotFoundError: No module named 'mcp.server.fastmcp'. This is mcp 2.x, where FastMCP was renamed to MCPServer (from mcp.server.mcpserver import MCPServer) and other …2026-10-22
YouTube Transcript (Python)
mcp-youtube-transcript 0.3.5
uvxImportError: cannot import name 'FastMCP' from 'mcp.server' (<temp dir>/py_mcp-youtube-transcript/.venv/lib/python3.13/site-packages/mcp/server/__init__.py)2026-10-22

Install failed (2)

The package did not install, so there was no process to start. What to try not tested by us: Read the install error first: a native build step (node-gyp) needs build tools; a package whose versions were all yanked cannot be installed at all.

ServerLaunchWhat it printed (verbatim excerpt)Tested
AWS Core (AWS Labs)
awslabs.core-mcp-server 1.0.27
uvxcause: Because all versions of awslabs-core-mcp-server were yanked (reason: load individual MCPs) and you require awslabs-core-mcp-server, we can conclude that your …2026-10-22
Memory Keeper
mcp-memory-keeper 0.14.1
npxnpm error gyp ERR! command "/usr/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"2026-10-22

No runnable entry point (3)

The package installed but declares no executable (no npm bin entry, no Python console script), so npx/uvx had nothing to run. What to try not tested by us: Check the package README for the real start command or the right package name; npx can be pointed at a named binary with npx -y --package=<pkg> <bin>.

ServerLaunchWhat it printed (verbatim excerpt)Tested
Filesystem (cyanheads)
@cyanheads/filesystem-mcp-server 1.0.4
npxno bin entry2026-10-22
Memory (Python)
mcp-server-memory 0.0.1
uvxno bin entry2026-10-22
Sanity
@sanity/mcp-server 0.12.2
npxno bin entry2026-10-22

Needs a command-line argument or subcommand (6)

The server printed a usage error and exited because it was started with no arguments. What to try not tested by us: Add the argument or subcommand its README names (for example a --tools list, a database path, or a run/mcp subcommand) to args in your MCP config.

ServerLaunchWhat it printed (verbatim excerpt)Tested
Cloudflare
@cloudflare/mcp-server-cloudflare 0.2.0
npx[DEBUG 2026-10-22T06:16:38.830Z] Uncaught exception: Error: Unknown command: undefined. Expected 'init' or 'run'.2026-10-22
codenib CodeGraph
codenib 0.2.4
uvxcodenib: error: the following arguments are required: command2026-10-22
mcp-proxy (Python)
mcp-proxy 0.13.0
uvx[E 2026-10-22 01:15:03,293.293 mcp_proxy.__main__] Either a command_or_url for a default server or at least one --named-server (or --named-server-config) must be …2026-10-22
MotherDuck / DuckDB (official)
mcp-server-motherduck 1.1.0
uvxError: In-memory databases require the --read-write flag.2026-10-22
Neon (official)
@neondatabase/mcp-server-neon 0.6.5
npxInvalid number of arguments2026-10-22
PayPal (official)
@paypal/mcp 1.8.1
npxThe --tools arguments must be provided.2026-10-22

Needs a running service, file or program (5)

The server tried to reach something that was not there on our test machine (a local database or Docker socket, a config or OAuth keys file, a URL setting, or another program on PATH) and exited. What to try not tested by us: Start the service or create the file it names before the client launches the server, and put any URL or path it needs into env or args.

ServerLaunchWhat it printed (verbatim excerpt)Tested
Docker
mcp-server-docker 0.3.0
uvxdocker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))2026-10-22
Elasticsearch (official)
@elastic/mcp-server-elasticsearch 0.3.1
npx"message": "Elasticsearch URL cannot be empty",2026-10-22
Gmail (GongRzhe)
@gongrzhe/server-gmail-autoauth-mcp 1.1.11
npxError: OAuth keys file not found. Please place gcp-oauth.keys.json in current directory or <home dir>/.gmail-mcp2026-10-22
lbrain agent memory
lbrain-coding-agents 0.1.3
uvxlbrain is not on PATH. Install the engine first:2026-10-22
Neo4j Memory (official)
mcp-neo4j-memory 0.4.5
uvxFailed to connect to Neo4j: Couldn't connect to localhost:7687 (resolved to ('[::1]:7687', '127.0.0.1:7687')):2026-10-22

Package retired in favour of another install (1)

The npm package itself printed that it is deprecated and pointed to a different install. What to try not tested by us: Follow the install it names (here, the vendor CLI's built-in MCP command).

ServerLaunchWhat it printed (verbatim excerpt)Tested
Railway (official)
@railway/mcp-server 0.1.12
npx@railway/mcp-server is deprecated.2026-10-22

Python dependency missing or incompatible (2)

Import failed inside a dependency: a module the package uses was not installed, or an installed version did not match. What to try not tested by us: Install the missing module or pin the dependency version the package was built against; reinstalling into a fresh environment rules out leftovers.

ServerLaunchWhat it printed (verbatim excerpt)Tested
Chroma (official)
chroma-mcp 0.2.6
uvxImportError: cannot import name 'eval_type_backport' from 'pydantic._internal._typing_extra' …2026-10-22
Sentry (legacy reference, Python)
mcp-server-sentry 2025.1.14
uvxModuleNotFoundError: No module named 'httpx'2026-10-22

Tried to install its own dependencies at startup (1)

The npm package ran pip at startup to install Python requirements; pip refused (PEP 668, externally managed Python), and the server exited. What to try not tested by us: Install the requirements file it names into a virtual environment yourself, or run the server from an environment where pip installs are allowed.

ServerLaunchWhat it printed (verbatim excerpt)Tested
LM Studio MCP (community, samscarrow)
lmstudio-mcp-server 1.0.1
npxhint: See PEP 668 for the detailed specification.2026-10-22

Started an HTTP server instead of stdio (1)

The process came up as an HTTP server (it printed a localhost URL) and never answered on stdin/stdout, so our stdio client timed out. What to try not tested by us: Either connect your client to the URL it prints, or start it in stdio mode if its README offers one.

ServerLaunchWhat it printed (verbatim excerpt)Tested
PDF (MCP)
@modelcontextprotocol/server-pdf 2.0.3
npxMCP server listening on http://localhost:3001/mcp2026-10-22

Node.js crash on startup (3)

Node printed an uncaught-exception stack trace and exited. Our stored log keeps only the end of stderr, so the first error line was cut. What to try not tested by us: Run the exact command from your config in a terminal and read the first error line.

ServerLaunchWhat it printed (verbatim excerpt)Tested
HubSpot
@hubspot/mcp-server 0.4.0
npxNode.js stack trace (Node.js v20.19.2), exited code 1; first error line not kept in our log2026-10-22
Lara Translate
@translated/lara-mcp 2.1.0
npxNode.js stack trace (Node.js v20.19.2), exited code 1; first error line not kept in our log2026-10-22
Stripe (official)
@stripe/mcp 0.3.3
npxNode.js stack trace (Node.js v20.19.2), exited code 1; first error line not kept in our log2026-10-22

Exited with no output (2)

The process exited with code 1 and printed nothing on stdout or stderr. What to try not tested by us: Run the exact command from your config in a terminal; check the README for required environment variables or arguments.

ServerLaunchWhat it printed (verbatim excerpt)Tested
MySQL
@benborla29/mcp-server-mysql 2.0.9
npxexited code 1 (no stdout or stderr)2026-10-22
Twilio (alpha)
@twilio-alpha/mcp 0.7.0
npxexited code 1 (no stdout or stderr)2026-10-22

Servers that started cleanly: 137 of 171 stdio servers completed the handshake or answered with a credential check. Browse working ones: all rankings · best free MCP servers.

FAQ

What does MCP error -32000: Connection closed mean?

In the official MCP TypeScript SDK, -32000 is the ConnectionClosed error code. For a local (stdio) server it means the server process your client started went away before or during the handshake. The client message does not say why; the server's own output does.

Why does an MCP server close the connection right after it starts?

In our tests through 2026-10-22, of the local (stdio) MCP servers we launched, 34 of 171 failed to start or answer the handshake (31 exited, 2 failed to install, 1 timed out). By cause, with counts: mcp Python SDK 2.x API change (8); Install failed (2); No runnable entry point (3); Needs a command-line argument or subcommand (6); Needs a running service, file or program (5); Package retired in favour of another install (1); Python dependency missing or incompatible (2); Tried to install its own dependencies at startup (1); Started an HTTP server instead of stdio (1); Node.js crash on startup (3); Exited with no output (2). A further 29 stopped at a credential check without an API key or token.

How do I find the real error behind -32000?

Run the exact command and args from your MCP config in a terminal and read what it prints, or open your client's MCP server log. A working stdio server prints nothing on stdout and waits for input.

Did you reproduce -32000 in Claude Code, Claude Desktop or Cursor?

No. We launched each server with our own stdio MCP client and recorded what the process printed when it exited. We did not run these servers inside those clients, and we have not tested the suggested fixes.