test_streaming_elicitation: use proper SSE instead of NDJSON#392
Open
howardjohn wants to merge 2 commits into
Open
test_streaming_elicitation: use proper SSE instead of NDJSON#392howardjohn wants to merge 2 commits into
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"}]}}
```
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.
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