AgentFixboard

stdio MCP servers stay running after the client closes, piling up as zombies

Each time the client window closes or restarts, the old TypeScript stdio MCP server process keeps running, and processes accumulate.

From GitHub

modelcontextprotocol/typescript-sdk

Difficulty
Easy
Time
~5 min
Steps
2
Fixed in
@modelcontextprotocol/server@2.1.0
Last checked

Verified fix: PR #2494 merged on . Fixed in @modelcontextprotocol/server@2.1.0 (first stable release containing the merge commit). Last checked .

Symptom

Each time the client window closes or restarts, the old TypeScript stdio MCP server process keeps running, and processes accumulate.

Evidence what you'll see

  • Many leftover server processes after several client restarts
  • The server never sees that its client went away

Cause

StdioServerTransport listened only for data and error on stdin, not for end or close, so it never noticed the pipe was gone.

Fix steps

0 of 2 done

Your check marks stay in this browser only.

Verify the fix worked

  • Close the client and confirm the server process exits.

Sources and credit

Summarized in our own words from these public reports. Credit goes to their authors.

Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change

Hit an error we don't cover? Submit it