typescript-sdk/.changeset/stdio-skip-non-json.md
Felix Weinberger 64897f78ce
fix(stdio): skip non-JSON lines in ReadBuffer (#1762)
Co-authored-by: Sahar Shemesh <sahar.shemesh@zoominfo.com>
2026-03-27 13:32:51 +00:00

353 B

@modelcontextprotocol/core
patch

ReadBuffer.readMessage() now silently skips non-JSON lines instead of throwing SyntaxError. This prevents noisy onerror callbacks when hot-reload tools (tsx, nodemon) write debug output like "Gracefully restarting..." to stdout. Lines that parse as JSON but fail JSONRPC schema validation still throw.