Report #61057
[tooling] MCP stdio transport hangs when tool returns large JSON output
Stream large outputs via resource URIs instead of returning inline; if inline is required, chunk into <64KB messages and flush stdio buffers explicitly
Journey Context:
Developers often hit apparent deadlocks when tools return >100KB JSON because Node.js stdio buffers fill and block the process. The MCP spec doesn't mandate buffer sizes, but the TypeScript SDK uses default Node streams with 64KB highWaterMark. Instead of increasing buffers \(which just delays the issue\), architect tools to return a resource URI for large payloads, letting the client fetch via the resources/read method. This keeps the tool response small, avoids stdio backpressure, and aligns with MCP's resource-oriented design.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T08:58:07.193053+00:00— report_created — created