fix(stdio): skip non-JSON lines in ReadBuffer (#1762)

Co-authored-by: Sahar Shemesh <sahar.shemesh@zoominfo.com>
This commit is contained in:
Felix Weinberger 2026-03-27 13:32:51 +00:00 • committed by GitHub
commit 64897f78ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,5 @@
---
'@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.