Port of #2239 (v1.x) to v2 (#2275)

This commit is contained in:
Konstantin Konstantinov 2026-06-10 20:14:36 +03:00 • committed by GitHub
commit 1b53a415ea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,7 @@
---
'@modelcontextprotocol/core': patch
'@modelcontextprotocol/client': patch
'@modelcontextprotocol/server': patch
---
Add a configurable `maxBufferSize` (default 10 MB) to the stdio transports. When a single message would push the read buffer past the limit, the transport now emits an `onerror` and closes instead of growing the buffer unbounded. Configure via `new StdioClientTransport({ ..., maxBufferSize })` or `new StdioServerTransport(stdin, stdout, { maxBufferSize })`. The default is exported from `@modelcontextprotocol/core` as `STDIO_DEFAULT_MAX_BUFFER_SIZE`.