Repository navigation
Server-side 2026-07-28 stateless support: classifier, driver split, server/discover - #2928
Merged
Merged
Claude / Claude Code Review
completed
Jun 20, 2026 in 21m 23s
Code review found 2 potential issues
Found 5 candidates, confirmed 2. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 2 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | src/mcp/server/_streamable_http_modern.py:158-164 |
Modern HTTP entry answers valid JSON-RPC notifications with PARSE_ERROR |
| 🟡 Nit | docs/migration.md:504-515 |
migration.md example uses ctx.connection, which ServerRequestContext does not expose |
Annotations
Check warning on line 164 in src/mcp/server/_streamable_http_modern.py
claude / Claude Code Review
Modern HTTP entry answers valid JSON-RPC notifications with PARSE_ERROR
handle_modern_request validates the POST body only as JSONRPCRequest, so a syntactically valid JSON-RPC notification (no `id`, e.g. `notifications/cancelled` from a 2026-era client) is answered with PARSE_ERROR (-32700) at HTTP 400, even though the JSON parsed fine. -32700 is reserved for invalid JSON; a parsed-but-not-a-request body should be accepted (202, like the legacy transport does for notifications) or at worst rejected with INVALID_REQUEST (-32600). Note this behaviour pre-dates the PR,
Check warning on line 515 in docs/migration.md
claude / Claude Code Review
migration.md example uses ctx.connection, which ServerRequestContext does not expose
The new `stateless_http=True` migration example accesses `ctx.connection.exit_stack` on a handler typed as `ServerRequestContext`, but `ServerRequestContext` has no `connection` attribute, so following the doc verbatim raises `AttributeError`. The PR's own tests reach the connection via the private `ctx.session._connection`; the example should either use the actual accessor or wait until `connection` is exposed on `ServerRequestContext`.
Loading