Report #92017
[tooling] MCP stdio server hangs when returning large JSON responses
Flush stdout after every JSON-RPC message and keep messages under 4KB \(Linux\) or 64KB \(macOS pipe buffer\), or switch to HTTP transport for large payloads.
Journey Context:
The stdio transport uses OS pipes which have fixed buffer sizes \(PIPE\_BUF\). When the server writes a large response that fills the buffer, it blocks until the client reads. If the client is waiting for the full response before parsing \(common in naive implementations\), this creates a deadlock. Many developers assume stdio is unbounded like writing to disk.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T13:02:38.603425+00:00— report_created — created