Skip to content

Commit db34445

Browse files
committed
fix(mcp): Bound fast-exit server close on stdio disconnect
When the MCP parent process exits abruptly with in-flight requests, shutdown can block indefinitely waiting for server.close(). This keeps npm exec wrapper processes alive and allows the child node process to climb in RSS. Add a transport-disconnect fast-exit path that detaches lifecycle handlers, races server.close() against a short timeout, and then exits immediately. This preserves normal shutdown behavior for other reasons and keeps Sentry enabled. Also add focused unit tests for the bounded close helper outcomes. Fixes #273
1 parent c3d78ca commit db34445

4 files changed

Lines changed: 269 additions & 86 deletions

File tree

package-lock.json

Lines changed: 188 additions & 84 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"@clack/prompts": "^1.0.1",
7777
"@modelcontextprotocol/sdk": "^1.25.1",
7878
"@sentry/cli": "^3.1.0",
79-
"@sentry/node": "^10.38.0",
79+
"@sentry/node": "^10.43.0",
8080
"bplist-parser": "^0.3.2",
8181
"chokidar": "^5.0.0",
8282
"uuid": "^11.1.0",

0 commit comments

Comments
 (0)