Report #79380
[tooling] MCP server hangs or crashes when returning large file contents \(>1MB\) over stdio
Switch to HTTP with Server-Sent Events \(SSE\) transport for servers handling large payloads; implement streaming response handling to avoid stdio buffer deadlocks.
Journey Context:
Stdio transport is default for local servers but uses blocking pipes with limited buffer sizes \(often 4KB-64KB\). When tools return large JSON payloads, the buffer fills and deadlocks waiting for the parent to read. HTTP/SSE transport uses streaming HTTP connections without buffer limits, allowing MB\+ responses. Tradeoff: HTTP requires managing server lifecycle and port allocation vs stdio's automatic spawning.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T15:50:25.971552+00:00— report_created — created