Skip to content

fix(server): exit when MCP parent process disappears - #217

Merged
dbast merged 1 commit into
mainfrom
stop
Jun 1, 2026
Merged

dbast merged 1 commit into
mainfrom
stop

Conversation

@dbast

@dbast dbast commented Jun 1, 2026

Copy link
Copy Markdown
Member

Start a parent-death watchdog before server setup so conda-meta-mcp
terminates itself if the launching MCP host/proxy process exits
without graceful shutdown. This prevents stale stdio or streamable-http
server processes from surviving client shutdown and holding ports such
as 4042.

This is a defensive workaround for upstream lifecycle gaps where MCP
hosts or proxy runners may forcefully terminate the stdio parent without
cleaning up descendants.

Related upstream issues:
- modelcontextprotocol/python-sdk#526
- modelcontextprotocol/python-sdk#2231
- PrefectHQ/fastmcp#353
- anthropics/claude-code#1935
- modelcontextprotocol/typescript-sdk#2023
- modelcontextprotocol/typescript-sdk#2002
- microsoft/vscode#316266
@dbast
dbast merged commit b3920b0 into main Jun 1, 2026
7 checks passed
@dbast
dbast deleted the stop branch June 1, 2026 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant