Title: SEP-1699: Support SSE polling via server-side disconnect · Issue #1699 · modelcontextprotocol/modelcontextprotocol · GitHub
Open Graph Title: SEP-1699: Support SSE polling via server-side disconnect · Issue #1699 · modelcontextprotocol/modelcontextprotocol
X Title: SEP-1699: Support SSE polling via server-side disconnect · Issue #1699 · modelcontextprotocol/modelcontextprotocol
Description: Authors: Jonathan Hefner (@jonathanhefner) Status: Draft Type: Standards Track Created: 2025-10-22 Abstract This SEP proposes changes to the Streamable HTTP transport in order to mitigate issues regarding long-running connections and res...
Open Graph Description: Authors: Jonathan Hefner (@jonathanhefner) Status: Draft Type: Standards Track Created: 2025-10-22 Abstract This SEP proposes changes to the Streamable HTTP transport in order to mitigate issues re...
X Description: Authors: Jonathan Hefner (@jonathanhefner) Status: Draft Type: Standards Track Created: 2025-10-22 Abstract This SEP proposes changes to the Streamable HTTP transport in order to mitigate issues re...
Opengraph URL: https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1699
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"SEP-1699: Support SSE polling via server-side disconnect","articleBody":"**Authors:** Jonathan Hefner (@jonathanhefner)\n**Status:** Draft\n**Type:** Standards Track\n**Created:** 2025-10-22\n\n## Abstract\n\nThis SEP proposes changes to the Streamable HTTP transport in order to mitigate issues regarding long-running connections and resumability.\n\n## Motivation\n\nThe Streamable HTTP transport spec [does not allow](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/04c6e1f0ea6544c7df307fb2d7c637efe34f58d3/docs/specification/draft/basic/transports.mdx?plain=1#L109-L111) servers to close a connection while computing a result. In other words, barring client-side disconnection, servers must maintain potentially long-running connections.\n\n## Specification\n\nWhen a server starts an SSE stream, it MUST immediately send an SSE event consisting of an [`id`](https://html.spec.whatwg.org/multipage/server-sent-events.html#:~:text=field%20name%20is%20%22id%22) and an empty [`data`](https://html.spec.whatwg.org/multipage/server-sent-events.html#:~:text=field%20name%20is%20%22data%22) string in order to prime the client to reconnect with that event ID as the `Last-Event-ID`.\n\nNote that the SSE standard explicitly [permits setting `data` to an empty string](https://html.spec.whatwg.org/multipage/server-sent-events.html#:~:text=data%20buffer%20is%20an%20empty%20string), and says that the appropriate client-side handling is to record the `id` for `Last-Event-ID` but otherwise ignore the event (i.e., not call the event handler callback).\n\nAt any point after the server has sent an event ID to the client, the server MAY disconnect at will. Specifically, [this part of the MCP spec](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/04c6e1f0ea6544c7df307fb2d7c637efe34f58d3/docs/specification/draft/basic/transports.mdx?plain=1#L109-L111) will be changed from:\n\n\u003e The server **SHOULD NOT** close the SSE stream before sending the JSON-RPC _response_ for the received JSON-RPC _request_\n\nTo:\n\n\u003e The server **MAY** close the connection before sending the JSON-RPC _response_ if it has sent an SSE event with an event ID to the client\n\nIf a server disconnects, the client will interpret the disconnection the same as a network failure, and will attempt to reconnect. In order to prevent clients from reconnecting / polling excessively, the server SHOULD send an SSE event with a [`retry`](https://html.spec.whatwg.org/multipage/server-sent-events.html#:~:text=field%20name%20is%20%22retry%22) field indicating how long the client should wait before reconnecting. Clients MUST respect the `retry` field.\n\n## Rationale\n\nServers may disconnect at will, avoiding long-running connections. Sending a `retry` field will prevent the client from hammering the server with inappropriate reconnection attempts.\n\n## Backward Compatibility\n\n- **New Client + Old Server**: No changes. No backward incompatibility.\n- **Old Client + New Server**: Client should interpret an at-will disconnect the same as a network failure. `retry` field is part of the SSE standard. No backward incompatibility if client already implements proper SSE resuming logic.\n\n## Additional Information\n\nThis SEP supersedes (in part) [SEP-1335](https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1335).\n","author":{"url":"https://github.com/jonathanhefner","@type":"Person","name":"jonathanhefner"},"datePublished":"2025-10-22T16:12:37.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":10},"url":"https://github.com/1699/modelcontextprotocol/issues/1699"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:56cc36df-ecdf-0e9a-2ba0-01444ef8d25f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8624:251DF3:3022685:3FC1737:6A5CFC15 |
| html-safe-nonce | faab6bfe836e00a7ea67ba4fbcaf3dbb2ac2f558e6661b312658592122d13f9e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NjI0OjI1MURGMzozMDIyNjg1OjNGQzE3Mzc6NkE1Q0ZDMTUiLCJ2aXNpdG9yX2lkIjoiNzU5Njc0NDA3Mzk2NzEwNzA5MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 817c21c916487070d52e9a69084672139fad8ccf2198da6786b9b6db6e59cdf2 |
| hovercard-subject-tag | issue:3541498150 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/modelcontextprotocol/modelcontextprotocol/1699/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c6ee1dfff72c8cc59022a6a88c3e57c8f8619022d692522df16c628fdd2c8061/modelcontextprotocol/modelcontextprotocol/issues/1699 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c6ee1dfff72c8cc59022a6a88c3e57c8f8619022d692522df16c628fdd2c8061/modelcontextprotocol/modelcontextprotocol/issues/1699 |
| og:image:alt | Authors: Jonathan Hefner (@jonathanhefner) Status: Draft Type: Standards Track Created: 2025-10-22 Abstract This SEP proposes changes to the Streamable HTTP transport in order to mitigate issues re... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jonathanhefner |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| go-import | github.com/modelcontextprotocol/modelcontextprotocol git https://github.com/modelcontextprotocol/modelcontextprotocol.git |
| octolytics-dimension-user_id | 182288589 |
| octolytics-dimension-user_login | modelcontextprotocol |
| octolytics-dimension-repository_id | 862570523 |
| octolytics-dimension-repository_nwo | modelcontextprotocol/modelcontextprotocol |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 862570523 |
| octolytics-dimension-repository_network_root_nwo | modelcontextprotocol/modelcontextprotocol |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width