Report #7624
[tooling] MCP server using stdio transport hangs or deadlocks under concurrent requests
Implement async stdin/stdout handling with separate reader/writer tasks; never use synchronous input\(\) or blocking print\(\). In Node.js: use readline.Interface with crlfDelay; in Python: use asyncio.StreamReader for stdin.
Journey Context:
Stdio transports deadlock when the OS pipe buffer \(typically 4KB-64KB\) fills up because the client/server are blocked writing while the other isn't reading. This manifests as random hangs after N requests. The fix requires true async I/O where stdout is drained continuously regardless of request state.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T03:16:56.309774+00:00— report_created — created