Repository navigation
[Server] Stop bundling queued notifications into the JSON answer of a request - #602
Merged
chr-hertel merged 1 commit intoOct 15, 2026
Conversation
A JSON answer bundled the session's queued messages with the request's response into one array, which clients on 2025-06-18 and later reject. The queued messages now go out on an SSE answer ahead of the responses, and a JSON answer holds the response alone. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
chr-hertel
requested review from
CodeWithKyrian,
Nyholm and
soyuka
as code owners
October 14, 2026 23:44
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused change matches the intended behavior and includes regression coverage, with no blocking issues identified; tests were not executed.
0 open findings
What changed in this PR
Fixes queued notification delivery in StreamableHttpTransport without bundling notifications into JSON responses.
Changes:
- Uses SSE when queued messages exist, sending them before request responses.
- Adds regression coverage for single requests, batches, and JSON-only responses.
- Documents the compatibility fix.
| File | Description |
|---|---|
| tests/Unit/Server/Transport/StreamableHttpTransportTest.php | Tests queued-message SSE delivery and response-only JSON. |
| src/Server/Transport/StreamableHttpTransport.php | Selects SSE for queued messages; otherwise returns JSON responses alone. |
| CHANGELOG.md | Documents the corrected response format. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #597: a plain request on a session with queued messages (e.g.
resources/updated) was still answered with a JSON array of those messages and its response. The spec wants one JSON object there, and since2025-06-18there is no batching at all - Pythonmcp2.x rejects it with-32700.A standalone GET stream would be the more natural home for these messages, but the transport has none yet - so the SSE answer keeps them flowing until then.
Fixes chr-hertel#73
🤖 Generated with Claude Code