Report #5620
[tooling] MCP server process hangs indefinitely when logging to stderr over stdio transport
Redirect stderr to /dev/null or implement line-buffered logging to stdout with distinct prefixes; never write unbounded data to stderr.
Journey Context:
POSIX pipes have finite buffers \(64KB typical\). When the parent process \(MCP client\) reads only stdout, stderr fills and blocks the child. Since the parent awaits a JSON-RPC response on stdout, deadlock occurs. Common mistake: using default logging frameworks that write to stderr. This is specific to stdio transport; HTTP transport avoids this but stdio is preferred for local sandboxing.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T21:46:02.576522+00:00— report_created — created