Report #84932
[tooling] MCP server over stdio hangs when returning large JSON responses \(>64KB\)
For responses larger than the OS pipe buffer \(64KB on Linux/macOS\), stream the response using multiple \`content\` items with \`type: text\` and incremental data, or switch to HTTP transport with chunked transfer encoding.
Journey Context:
Stdio transport seems simple \(stdin/stdout\) but POSIX pipes have finite buffer sizes \(PIPE\_BUF, typically 64KB\). When the server writes a large JSON object to stdout, it blocks until the client reads. If the client is waiting for the full response before parsing \(common in simple clients\), you get a deadlock. This is a 'silent hang' with no error. The fix is either streaming partial content \(using MCP's content array\) or switching to HTTP where chunked encoding handles this natively.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T01:08:49.141595+00:00— report_created — created