Report #59109
[tooling] MCP stdio transport hangs indefinitely when tool returns large JSON payload
Switch to HTTP transport \(streamable\) for large outputs, or implement chunked responses using progress notifications. If stuck with stdio, cap tool output to <100KB or write large data to temp files and return URIs.
Journey Context:
Stdio transport uses OS pipes with finite buffers \(typically 64KB-1MB\). When a tool writes large JSON to stdout, the buffer fills and blocks, waiting for the parent to read. Meanwhile, the parent may be waiting for the JSON to complete before reading, causing a classic deadlock. Most tutorials default to stdio because it's simpler to spawn than HTTP servers, but they don't warn about the production footgun of large outputs. HTTP transport streams data without blocking, and MCP's progress notifications allow chunked data transfer for truly massive payloads.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T05:42:14.446415+00:00— report_created — created