René's URL Explorer Experiment


Title: SEP-1335: Address Streamable HTTP transport issues · Issue #1335 · modelcontextprotocol/modelcontextprotocol · GitHub

Open Graph Title: SEP-1335: Address Streamable HTTP transport issues · Issue #1335 · modelcontextprotocol/modelcontextprotocol

X Title: SEP-1335: Address Streamable HTTP transport issues · Issue #1335 · modelcontextprotocol/modelcontextprotocol

Description: Authors: Jonathan Hefner (@jonathanhefner) Status: Draft Type: Standards Track Created: 2025-08-12 Abstract This SEP proposes changes to the Streamable HTTP transport in order to mitigate issues regarding resumability and long-running co...

Open Graph Description: Authors: Jonathan Hefner (@jonathanhefner) Status: Draft Type: Standards Track Created: 2025-08-12 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-08-12 Abstract This SEP proposes changes to the Streamable HTTP transport in order to mitigate issues re...

Opengraph URL: https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1335

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"SEP-1335: Address Streamable HTTP transport issues","articleBody":"**Authors:** Jonathan Hefner (@jonathanhefner)\n**Status:** Draft\n**Type:** Standards Track\n**Created:** 2025-08-12\n\n## Abstract\n\nThis SEP proposes changes to the Streamable HTTP transport in order to mitigate issues regarding resumability and long-running connections.\n\n\n## Motivation\n\nThe Streamable HTTP transport currently exhibits the following issues:\n\n- **Unable to resume without an initial SSE event**\n\n  If a server starts an SSE stream but a disconnection occurs before an event is sent, there is no way for the client to resume the stream, because resuming requires a `Last-Event-ID`.\n\n  This is especially problematic because the spec says that [disconnection should not be interpreted as the client cancelling its request](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/eba3959164c6b1ef87b87c8fe3574972f3f30055/docs/specification/draft/basic/transports.mdx?plain=1#L116).\n\n- **Servers must maintain potentially long-running connections**\n\n  The spec [does not allow](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/eba3959164c6b1ef87b87c8fe3574972f3f30055/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- **Clients may reconnect excessively**\n\n  There is no indication of how long clients should wait before attempting reconnection.  If servers were allowed to disconnect at will, there is no established scheme to prevent clients from reconnecting immediately.\n\n- TODO: elaborate on challenges for load-balanced servers concerning server-to-client requests\n\n\n## Proposed Changes\n\n### `rel=\"stream\"` URL\n\nWhen a server starts an SSE stream, it MAY send an HTTP `Link` header that includes a `rel=\"stream\"` URL.  The server MAY embed whatever values it chooses in the URL, such as a unique request ID; however, the URL MUST be same-origin (same scheme, hostname, and port) as the server URL.\n\nIn the event of a disconnection, the client SHOULD resume the SSE stream.  To resume the stream the client MUST send a GET request to the `rel=\"stream\"` URL instead of the typical `/mcp` endpoint.\n\nWhen sending a GET request to the `rel=\"stream\"` URL, the client SHOULD include an appropriate `Last-Event-ID` header (if possible), and the server MUST respect the `Last-Event-ID` header.\n\n#### Rationale\n\nThe `rel=\"stream\"` URL acts as a unique endpoint for clients to resume the stream, regardless of having received an initial event.  It can also provide benefits with respect to routing.\n\nAn alternative would be to (automatically, transparently) send an empty initial SSE event with an event ID to prime the client to reconnect.  However, the client will likely receive an HTTP header before it receives the first SSE event, reducing the window in which a network failure could prevent the client from receiving resumption information.\n\nNote that neither approach fully eliminates that window of failure.  To fully eliminate the window of failure, we should introduce a mechanism like idempotency tokens.  However, that may impose a slightly higher burden on the server, may be relevant to other transports, and is outside the scope of this SEP.\n\n#### Backward Compatibility\n\n- **New Client + Old Server**: Server will not send header.  No backward incompatibility as long as client supports the old way of resuming (GET `/mcp`).\n- **Old Client + New Server**: Client will ignore header.  No backward incompatibility as long as server supports the old way of resuming (GET `/mcp`).\n\n### Allow server to disconnect at will\n\nChange [this part of the spec](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/04c6e1f0ea6544c7df307fb2d7c637efe34f58d3/docs/specification/draft/basic/transports.mdx?plain=1#L109-L111):\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 say:\n\n\u003e The server **MAY** close the connection before sending the JSON-RPC _response_ if it has sent a `Link` header with a `rel=\"stream\"` URL.\n\nFurthermore, if the server does close the connection before sending the JSON-RPC response, at some point before closing the connection, the server SHOULD send the [`retry` field](https://html.spec.whatwg.org/multipage/server-sent-events.html#:~:text=field%20name%20is%20%22retry%22) in the stream.\n\nThe client SHOULD respect the `retry` field when resuming the stream.\n\n#### Rationale\n\nServers may disconnect at will, avoiding long-running connections.  Sending a `retry` field should prevent the client from hammering the server with inappropriate reconnection attempts.\n\n#### Backward Compatibility\n\n- **New Client + Old Server**: 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### Multi-turn requests for server-to-client requests\n\nWhen the server requires additional input from the client, it should send server-to-client requests (e.g., sampling requests) on the SSE stream.  When the server wants to wait for input from the client, it MUST disconnect.  The next time the client attempts to reconnect via the `rel=\"stream\"` URL, the server MUST respond with HTTP status code `204 No Content` (which is the standard mechanism to signal the end of an SSE stream).\n\nWhen the client receives a request from the server over the SSE stream, it should process the request, but it MUST store its response in a buffer instead of sending it to the server.  Once the SSE processing loop has been terminated due to the `204 No Content` response, the client MUST POST its buffered responses (as a JSON array) to the `rel=\"stream\"` URL.\n\nThen, the server MUST respond with a new SSE stream, including a `Link` header with a `rel=\"stream\"` URL.\n\nThis multi-turn interaction should repeat until the client has received the response to its original request.\n\n**Server algorithm:**\n\n1. Server sends messages, including server-to-client requests, until it wants to wait for input from the client.\n2. Server disconnects.\n3. When client GETs `rel=\"stream\"` URL, server responds with `204 No Content`.\n4. When client POSTs input to `rel=\"stream\"` URL, server returns new SSE stream, including new `rel=\"stream\"` URL.\n5. Go to step 1.\n\n**Client algorithm:**\n\n1. Client processes SSE stream events.  If an event is a server-to-client request, client stores its response in a buffer.\n2. When server disconnects, client attempts to reconnect but receives `204 No Content`, signaling end of the SSE stream.\n3. If there are buffered responses to server-to-client requests, client POSTs responses to `rel=\"stream\"` URL.\n4. Client receives new SSE stream from the POST.\n5. Go to step 1.\n\n#### Rationale\n\nThis feature allows the server to stop execution when input is required from the client.  When the server receives a POST to the `rel=\"stream\"` URL, it can use values embedded in the URL to look up state and resume execution, processing the POSTed input.  Thus load-balanced server instances are able to resume execution and send the result directly to the client without sticky (pinned) sessions.\n\n#### Backward Compatibility\n\n- **New Client + Old Server**: Server will not send a `rel=\"stream\"` URL.  No backward incompatibility as long as client supports the old way of responding to a server-to-client request (POST `/mcp`).\n- **Old Client + New Server**: Client will resume stream with GET `/mcp` and send input with POST `/mcp`.  No backward incompatibility as long as server supports the old way of resuming and sending input.\n","author":{"url":"https://github.com/jonathanhefner","@type":"Person","name":"jonathanhefner"},"datePublished":"2025-08-12T21:00:33.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":38},"url":"https://github.com/1335/modelcontextprotocol/issues/1335"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:2bcd3eca-d96b-241d-b544-ddf2e1773dd4
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC0A2:25DDC5:2C4530:3F1968:6A5DEB85
html-safe-nonce76fdff32bfda23841d8878070569b22ec2fb43ff1af08195fc439babf661f003
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMEEyOjI1RERDNToyQzQ1MzA6M0YxOTY4OjZBNURFQjg1IiwidmlzaXRvcl9pZCI6IjQzMTA2NzMwNzQwNjMwMTA2OTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac250413400fe6969809d2d898dbf481b8f6c8d710afa0c85c890b16e0907e8578
hovercard-subject-tagissue:3315922817
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/modelcontextprotocol/modelcontextprotocol/1335/issue_layout
twitter:imagehttps://opengraph.githubassets.com/d7cae705240eb8a63b43dfe4611fefd6b00b977eda03ca25a0f2e3d254d1dd0d/modelcontextprotocol/modelcontextprotocol/issues/1335
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/d7cae705240eb8a63b43dfe4611fefd6b00b977eda03ca25a0f2e3d254d1dd0d/modelcontextprotocol/modelcontextprotocol/issues/1335
og:image:altAuthors: Jonathan Hefner (@jonathanhefner) Status: Draft Type: Standards Track Created: 2025-08-12 Abstract This SEP proposes changes to the Streamable HTTP transport in order to mitigate issues re...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejonathanhefner
hostnamegithub.com
expected-hostnamegithub.com
None8e8f322dc74b1a8d5bafb296008dbb96bb4a0bc6ee2d6f30844ab111697c520d
turbo-cache-controlno-preview
go-importgithub.com/modelcontextprotocol/modelcontextprotocol git https://github.com/modelcontextprotocol/modelcontextprotocol.git
octolytics-dimension-user_id182288589
octolytics-dimension-user_loginmodelcontextprotocol
octolytics-dimension-repository_id862570523
octolytics-dimension-repository_nwomodelcontextprotocol/modelcontextprotocol
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id862570523
octolytics-dimension-repository_network_root_nwomodelcontextprotocol/modelcontextprotocol
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release7ae00b343090b49d0d18b8184187f51a39ed917c
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/modelcontextprotocol/modelcontextprotocol/issues/1335#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fmodelcontextprotocol%2Fissues%2F1335
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fmodelcontextprotocol%2Fissues%2F1335
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=modelcontextprotocol%2Fmodelcontextprotocol
Reloadhttps://github.com/modelcontextprotocol/modelcontextprotocol/issues/1335
Reloadhttps://github.com/modelcontextprotocol/modelcontextprotocol/issues/1335
Reloadhttps://github.com/modelcontextprotocol/modelcontextprotocol/issues/1335
Please reload this pagehttps://github.com/modelcontextprotocol/modelcontextprotocol/issues/1335
modelcontextprotocol https://github.com/modelcontextprotocol
modelcontextprotocolhttps://github.com/modelcontextprotocol/modelcontextprotocol
Notifications https://github.com/login?return_to=%2Fmodelcontextprotocol%2Fmodelcontextprotocol
Fork 1.7k https://github.com/login?return_to=%2Fmodelcontextprotocol%2Fmodelcontextprotocol
Star 8.6k https://github.com/login?return_to=%2Fmodelcontextprotocol%2Fmodelcontextprotocol
Code https://github.com/modelcontextprotocol/modelcontextprotocol
Issues 112 https://github.com/modelcontextprotocol/modelcontextprotocol/issues
Pull requests 80 https://github.com/modelcontextprotocol/modelcontextprotocol/pulls
Discussions https://github.com/modelcontextprotocol/modelcontextprotocol/discussions
Actions https://github.com/modelcontextprotocol/modelcontextprotocol/actions
Projects https://github.com/modelcontextprotocol/modelcontextprotocol/projects
Models https://github.com/modelcontextprotocol/modelcontextprotocol/models
Security and quality 0 https://github.com/modelcontextprotocol/modelcontextprotocol/security
Insights https://github.com/modelcontextprotocol/modelcontextprotocol/pulse
Code https://github.com/modelcontextprotocol/modelcontextprotocol
Issues https://github.com/modelcontextprotocol/modelcontextprotocol/issues
Pull requests https://github.com/modelcontextprotocol/modelcontextprotocol/pulls
Discussions https://github.com/modelcontextprotocol/modelcontextprotocol/discussions
Actions https://github.com/modelcontextprotocol/modelcontextprotocol/actions
Projects https://github.com/modelcontextprotocol/modelcontextprotocol/projects
Models https://github.com/modelcontextprotocol/modelcontextprotocol/models
Security and quality https://github.com/modelcontextprotocol/modelcontextprotocol/security
Insights https://github.com/modelcontextprotocol/modelcontextprotocol/pulse
SEP-1335: Address Streamable HTTP transport issueshttps://github.com/modelcontextprotocol/modelcontextprotocol/issues/1335#top
https://github.com/jonathanhefner
SEPhttps://github.com/modelcontextprotocol/modelcontextprotocol/issues?q=state%3Aopen%20label%3A%22SEP%22
statelesshttps://github.com/modelcontextprotocol/modelcontextprotocol/issues?q=state%3Aopen%20label%3A%22stateless%22
https://github.com/jonathanhefner
jonathanhefnerhttps://github.com/jonathanhefner
on Aug 12, 2025https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1335#issue-3315922817
@jonathanhefnerhttps://github.com/jonathanhefner
disconnection should not be interpreted as the client cancelling its requesthttps://github.com/modelcontextprotocol/modelcontextprotocol/blob/eba3959164c6b1ef87b87c8fe3574972f3f30055/docs/specification/draft/basic/transports.mdx?plain=1#L116
does not allowhttps://github.com/modelcontextprotocol/modelcontextprotocol/blob/eba3959164c6b1ef87b87c8fe3574972f3f30055/docs/specification/draft/basic/transports.mdx?plain=1#L109-L111
this part of the spechttps://github.com/modelcontextprotocol/modelcontextprotocol/blob/04c6e1f0ea6544c7df307fb2d7c637efe34f58d3/docs/specification/draft/basic/transports.mdx?plain=1#L109-L111
retry fieldhttps://html.spec.whatwg.org/multipage/server-sent-events.html#:~:text=field%20name%20is%20%22retry%22
jonathanhefnerhttps://github.com/jonathanhefner
SEPhttps://github.com/modelcontextprotocol/modelcontextprotocol/issues?q=state%3Aopen%20label%3A%22SEP%22
statelesshttps://github.com/modelcontextprotocol/modelcontextprotocol/issues?q=state%3Aopen%20label%3A%22stateless%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.