Report #52332
[tooling] MCP server over stdio hangs or client receives no response
Explicitly flush stdout after every JSON-RPC message; in Python use \`flush=True\` in print or \`sys.stdout.flush\(\)\`, in Node use \`process.stdout.write\` with callback and flush.
Journey Context:
By default stdout is line-buffered only when connected to a TTY; when piped to the MCP client it's block-buffered. Many developers assume print/write is immediate. The symptom is the client hanging waiting for a response that is stuck in the buffer. This is often mistaken for JSON parsing errors or protocol mismatches. Flushing after every newline-delimited JSON message is required by the MCP spec but often missed in quick implementations.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T18:20:04.728161+00:00— report_created — created