Skip to content

Commit 5268def

Browse files
authored
Merge pull request modelcontextprotocol#1852 from modelcontextprotocol/fweinberger/sep-1699-clarify
Clarify SEP-1699: SSE stream resumption and polling
2 parents 48d9c77 + 0dfbf9d commit 5268def

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

docs/specification/draft/basic/transports.mdx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ MCP endpoint.
111111
at any time in order to avoid holding a long-lived connection. The client
112112
**SHOULD** then "poll" the SSE stream by attempting to reconnect.
113113
- If the server does close the _connection_ prior to terminating the _SSE stream_,
114-
it **SHOULD** send an SSE event with a standard `retry` field before
114+
it **SHOULD** send an SSE event with a standard [`retry`](https://html.spec.whatwg.org/multipage/server-sent-events.html#the-retry-value) field before
115115
closing the connection. The client **MUST** respect the `retry` field,
116116
waiting the given number of milliseconds before attempting to reconnect.
117117
- The SSE stream **SHOULD** eventually include a JSON-RPC _response_ for the
@@ -148,6 +148,9 @@ MCP endpoint.
148148
[resuming](#resumability-and-redelivery) a stream associated with a previous client
149149
request.
150150
- The server **MAY** close the SSE stream at any time.
151+
- If the server closes the _connection_ without terminating the _stream_, it
152+
**SHOULD** follow the same polling behavior as described for POST requests:
153+
sending a `retry` field and allowing the client to reconnect.
151154
- The client **MAY** close the SSE stream at any time.
152155

153156
### Multiple Connections
@@ -168,15 +171,20 @@ lost:
168171
- If present, the ID **MUST** be globally unique across all streams within that
169172
[session](#session-management)—or all streams with that specific client, if session
170173
management is not in use.
171-
2. If the client wishes to resume after a broken connection, it **SHOULD** issue an HTTP
172-
GET to the MCP endpoint, and include the
174+
- Event IDs **SHOULD** encode sufficient information to identify the originating
175+
stream, enabling the server to correlate a `Last-Event-ID` to the correct stream.
176+
2. If the client wishes to resume after a disconnection (whether due to network failure
177+
or server-initiated closure), it **SHOULD** issue an HTTP GET to the MCP endpoint,
178+
and include the
173179
[`Last-Event-ID`](https://html.spec.whatwg.org/multipage/server-sent-events.html#the-last-event-id-header)
174180
header to indicate the last event ID it received.
175181
- The server **MAY** use this header to replay messages that would have been sent
176182
after the last event ID, _on the stream that was disconnected_, and to resume the
177183
stream from that point.
178184
- The server **MUST NOT** replay messages that would have been delivered on a
179185
different stream.
186+
- This mechanism applies regardless of how the original stream was initiated (via
187+
POST or GET). Resumption is always via HTTP GET with `Last-Event-ID`.
180188

181189
In other words, these event IDs should be assigned by servers on a _per-stream_ basis, to
182190
act as a cursor within that particular stream.

docs/specification/draft/changelog.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ the previous revision, [2025-06-18](/specification/2025-06-18).
2626
3. Updated the [Security Best Practices guidance](https://modelcontextprotocol.io/specification/draft/basic/security_best_practices).
2727
4. Clarify that input validation errors should be returned as Tool Execution Errors rather than Protocol Errors to enable model self-correction ([SEP-1303](https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1303)).
2828
5. Support polling SSE streams by allowing servers to disconnect at will ([SEP-1699](https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1699)).
29-
6. Align OAuth 2.0 Protected Resource Metadata discovery with RFC 9728, making `WWW-Authenticate` header optional with fallback to `.well-known` endpoint ([SEP-985](https://github.com/modelcontextprotocol/modelcontextprotocol/issues/985)).
30-
7. Add support for default values in all primitive types (string, number, enum) for elicitation schemas ([SEP-1034](https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1034)).
31-
8. Establish JSON Schema 2020-12 as the default dialect for MCP schema definitions ([SEP-1613](https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1613)).
29+
6. Clarify SEP-1699: GET streams support polling, resumption always via GET regardless of stream origin, event IDs should encode stream identity, disconnection includes server-initiated closure (Issue [#1847](https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1847)).
30+
7. Align OAuth 2.0 Protected Resource Metadata discovery with RFC 9728, making `WWW-Authenticate` header optional with fallback to `.well-known` endpoint ([SEP-985](https://github.com/modelcontextprotocol/modelcontextprotocol/issues/985)).
31+
8. Add support for default values in all primitive types (string, number, enum) for elicitation schemas ([SEP-1034](https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1034)).
32+
9. Establish JSON Schema 2020-12 as the default dialect for MCP schema definitions ([SEP-1613](https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1613)).
3233

3334
## Other schema changes
3435

0 commit comments

Comments
 (0)