File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,8 @@ pub struct ServerSseMessage {
6262 /// The event ID for this message. When set, clients can use this ID
6363 /// with the `Last-Event-ID` header to resume the stream from this point.
6464 pub event_id : Option < String > ,
65- /// The JSON-RPC message content. For priming events, set this to `None`.
65+ /// The JSON-RPC message content. Set to `None` for priming events.
66+ /// See [SEP-1699](https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1699)
6667 pub message : Option < Arc < ServerJsonRpcMessage > > ,
6768 /// The retry interval hint for clients. Clients should wait this duration
6869 /// before attempting to reconnect. This maps to the SSE `retry:` field.
@@ -81,7 +82,7 @@ pub(crate) fn sse_stream_response(
8182 let data = serde_json:: to_string ( msg. as_ref ( ) ) . expect ( "valid message" ) ;
8283 Sse :: default ( ) . data ( data)
8384 } else {
84- // Priming event: empty data per SSE spec (just "data:\n")
85+ // Priming event: empty data per SEP-1699 (just "data:\n")
8586 Sse :: default ( ) . data ( "" )
8687 } ;
8788
Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ async fn test_with_js_streamable_http_client() -> anyhow::Result<()> {
7272 stateful_mode : true ,
7373 sse_keep_alive : None ,
7474 cancellation_token : ct. child_token ( ) ,
75+ ..Default :: default ( )
7576 } ,
7677 ) ;
7778 let router = axum:: Router :: new ( ) . nest_service ( "/mcp" , service) ;
You can’t perform that action at this time.
0 commit comments