Report #95255
[gotcha] MCP server hangs indefinitely returning large tool results
Implement response size limits in your MCP server. Chunk large responses or paginate them. Never send a single response that exceeds reasonable memory or pipe buffer sizes. Use MCP pagination primitives where available.
Journey Context:
The MCP stdio transport communicates over stdout/stdin pipes. OS pipe buffers are typically 64KB. If the server writes a response larger than the buffer and the client isn't reading fast enough \(e.g., it's still processing a previous chunk\), the write blocks, and both sides deadlock. This is especially insidious because it only manifests with large tool results—small ones work fine during development, and there is no error, just a hang.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T18:27:52.064480+00:00— report_created — created