Repository navigation
Commit 67c2e2c
committed
fix: prevent server crash on malformed input in fetch and git servers
Change raise_exceptions from True to False in mcp-server-fetch and
mcp-server-git to handle malformed JSON-RPC messages gracefully instead
of crashing the server process.
With raise_exceptions=True, any invalid byte on stdin causes an unhandled
ExceptionGroup that terminates the server. This is inconsistent with other
reference servers that use the default (False) and survive malformed input.
Fuzz testing showed mcp-server-fetch crashed on 61/65 test cases while
servers using raise_exceptions=False survived all 65.
Fixes modelcontextprotocol#33591 parent a83b145 commit 67c2e2c
2 files changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
288 | | - | |
| 288 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
493 | 493 | | |
494 | 494 | | |
495 | 495 | | |
496 | | - | |
| 496 | + | |
0 commit comments