fix(stdio): skip non-JSON lines in ReadBuffer (#1762)
Co-authored-by: Sahar Shemesh <sahar.shemesh@zoominfo.com>
This commit is contained in:
parent
a2e503733f
commit
64897f78ce
1 changed files with 106 additions and 11 deletions
5
.changeset/stdio-skip-non-json.md
Normal file
5
.changeset/stdio-skip-non-json.md
Normal 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.
|
||||
Loading…
Reference in a new issue