Repository navigation
test_streaming_elicitation: use proper SSE instead of NDJSON - #392
howardjohn wants to merge 2 commits into
Conversation
NDJSON is not acceptable in the spec.
Before:
```
$ curl -iN --max-time 5 -H 'Content-Type: application/json' -H 'Accept: application/json, text/event-stream' -H 'MCP-Protocol-Version: 2026-07-28' -H 'Mcp-Method: tools/call' -H 'Mcp-Name: test_streaming_elicitation' --data '{
"jsonrpc":"2.0",
"id":1,
"method":"tools/call",
"params":{
"name":"test_streaming_elicitation",
"arguments":{},
"_meta":{
"io.modelcontextprotocol/protocolVersion":"2026-07-28",
"io.modelcontextprotocol/clientInfo":{"name":"conformance-client","version":"1.0.0"},
"io.modelcontextprotocol/clientCapabilities":{}
}
}
}' http://localhost:3001/mcp
HTTP/1.1 200 OK
X-Powered-By: Express
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: Mcp-Session-Id
Content-Type: application/json
Transfer-Encoding: chunked
Date: Mon, 06 Jul 2026 16:30:12 GMT
Connection: keep-alive
Keep-Alive: timeout=5
{"jsonrpc":"2.0","method":"notifications/progress","params":{"progressToken":"token-abc","total":100,"value":50}}
{"jsonrpc":"2.0","id":1,"result":{"content":[{"type":"text","text":"Streaming complete"}]}}
```
After:
```
$ curl -iN --max-time 5 -H 'Content-Type: application/json' -H 'Accept: application/json, text/event-stream' -H 'MCP-Protocol-Version: 2026-07-28' -H 'Mcp-Method: tools/call' -H 'Mcp-Name: test_streaming_elicitation' --data '{
"jsonrpc":"2.0",
"id":1,
"method":"tools/call",
"params":{
"name":"test_streaming_elicitation",
"arguments":{},
"_meta":{
"io.modelcontextprotocol/protocolVersion":"2026-07-28",
"io.modelcontextprotocol/clientInfo":{"name":"conformance-client","version":"1.0.0"},
"io.modelcontextprotocol/clientCapabilities":{}
}
}
}' http://localhost:3001/mcp
HTTP/1.1 200 OK
X-Powered-By: Express
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: Mcp-Session-Id
Content-Type: text/event-stream
Cache-Control: no-cache
Date: Mon, 06 Jul 2026 16:32:49 GMT
Connection: keep-alive
Keep-Alive: timeout=5
Transfer-Encoding: chunked
event: message
data: {"jsonrpc":"2.0","method":"notifications/progress","params":{"progressToken":"token-abc","total":100,"value":50}}
event: message
data: {"jsonrpc":"2.0","id":1,"result":{"content":[{"type":"text","text":"Streaming complete"}]}}
```
|
Backlog sweep: this needs a rebase now that #462 has landed (same area of everything-server.ts) before it can merge. If that's not something you have time for, no problem, say so and a maintainer may pick it up; otherwise I'll close it in two weeks if there's no update. Thanks for the contribution either way. |
|
This PR also covers #531: its subscription changes frame both the acknowledgment and subsequent list-change notifications as SSE. Following up on the rebase request, I prepared The new regression tests launch the real everything-server and parse the stream with the existing
GitHub CI passed: For completeness, the local full suite hit existing The branch is available for updating this PR. The added coverage targets subscription framing/filtering and retained response normalization; it does not establish complete protocol or cross-SDK conformance. Rebase conflict resolution, regression tests, and this comment were produced with OpenAI ChatGPT coding tools. Zero × Youngseok Oh |
Motivation and Context
NDJSON is not acceptable in the spec.
Before:
After:
How Has This Been Tested?
curlabove + running the server through a real client that rejected the invalid NDJSONBreaking Changes
No
Types of changes
Checklist
Additional context