Symptom
listTools() rejects with a generic connection error. The transport has already printed the real reason on onerror.
Evidence what you'll see
- The awaited error is
MCP error -32000: Connection closed. - The
onerrorline before it isReadBuffer exceeded maximum size of 10485760 bytes. - A second
onerrorline isUnexpected token 'A', "AAAAAAAAAA"... is not valid JSON.
Why it happens
The stdio transport reports the failure only through onerror. The pending request is rejected with Connection closed, which is the same text for every transport death. In this report the body was a tools/list result whose description was 20 MB of the letter A, past the 10485760 byte read buffer.
Affected versions
@modelcontextprotocol/sdk@1.30.0 on Node 22, stdio. The linked issue does not name an operating system.
Fix steps
0 of 2 done
Your check marks stay in this browser only.
How to check it worked
- The caller that hit the oversized tools/list result sees
ReadBuffer exceeded maximum size of 10485760 bytes, not onlyMCP error -32000: Connection closed.
If it still fails
- After the buffer line, the issue still shows
Unexpected token 'A'because the stream is not resynced. The linked issue does not name a release that puts the buffer error on the awaited rejection.
Sources and credit
Summarized in our own words from these public reports. Credit goes to their authors.
Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change
Hit an error we don't cover? Submit it