[Bug] stdio MCP server stdin closed before initialize request on startup
Bug Description
Claude Code closes stdio MCP server stdin on startup before initialize
I’m seeing a reproducible startup issue with a local stdio MCP server in Claude Code (v2.1.63, Linux).
The server fails on initial startup, but manual reconnect works immediately.
MCP config (~/.claude.json):
"mcpServers": {
"meterian-mcp": {
"type": "stdio",
"command": "node",
"args": ["/home/fooz/.meterian/mcp-server/src/mcp/server/entry.js"],
"env": {}
}
}
Evidence from ~/.claude/debug/latest:
2026-03-02T18:44:16.136Z [DEBUG] MCP server "meterian-mcp": Starting connection with timeout of 30000ms
2026-03-02T18:44:16.402Z [ERROR] MCP server "meterian-mcp" Server stderr: [MCP SERVER] booting...
[MCP SERVER] ready
18:44:16 MCP - stdin end
18:44:16 MCP - stdin close
[MCP SERVER] beforeExit: 0
[MCP SERVER] exit: 0
2026-03-02T18:44:16.402Z [DEBUG] MCP server "meterian-mcp": Connection failed after 270ms: MCP error -32000: Connection closed
2026-03-02T18:44:16.402Z [ERROR] MCP server "meterian-mcp" Connection failed: MCP error -32000: Connection closed
Interpretation: the server process starts cleanly, then receives stdin EOF/close from parent before any initialize request, and exits normally.
Manual /mcp reconnect right after startup succeeds.
Could you investigate why Claude closes stdio MCP stdin on initial startup connection attempt?
p.s. please note that this MCP server works correctly with Gemini CLI, Codex, and all major IDEs. Downloadable from https://meterianhq.github.io/vscode-extension-tracker/features/mcp-server/#standalone-installation-without-vs-code
Environment Info
- Platform: linux
- Terminal: gnome-terminal
- Version: 2.1.63
- Feedback ID: ead057b0-159e-4077-b1d5-478819612fc8
Errors
[]This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗