Skip to content

feat: add subscription listen streams (SEP-2575) - #1000

Merged
alexhancock merged 2 commits into
mainfrom
feat/sep-2575-subscriptions-listen
Jul 21, 2026
Merged

feat: add subscription listen streams (SEP-2575)#1000
alexhancock merged 2 commits into
mainfrom
feat/sep-2575-subscriptions-listen

Conversation

@DaleSeo

@DaleSeoDaleSeo commented Jul 16, 2026

Copy link
Copy Markdown
Member

Motivation and Context

SEP-2575 replaces the old way of delivering notifications through resources/subscribe, resources/unsubscribe, and standalone Streamable HTTP GET streams. It introduces a new transport-neutral request called subscriptions/listen. This update brings in typed models and high-level server/client APIs that ensure acknowledgment ordering, subscription ID tagging, opt-in filtering, concurrent stream isolation, cancellation, and smooth or abrupt termination for both stdio and Streamable HTTP.

We still support legacy resource subscriptions, HTTP sessions, GET/DELETE, and resumable streams for older protocol versions.

How Has This Been Tested?

Add tests. The conformance suite passes

Breaking Changes

No existing stable-protocol behavior is removed. The legacy subscribe() and unsubscribe() APIs are deprecated for the 2026 protocol revision but retain their existing wire behavior for older negotiated versions.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

@github-actionsgithub-actionsBot added T-documentation Documentation improvements T-dependencies Dependencies related changes T-test Testing related changes T-CI Changes to CI/CD workflows and configuration T-config Configuration file changes T-core Core library changes T-examples Example code changes T-handler Handler implementation changes T-model Model/data structure changes T-service Service layer changes T-transport Transport layer changes labels Jul 16, 2026
@DaleSeo
DaleSeoforce-pushed the feat/sep-2575-subscriptions-listen branch from 57f0dad to 5a1ead3CompareJuly 17, 2026 00:48
@DaleSeoDaleSeo self-assigned this Jul 17, 2026
@DaleSeo
DaleSeoforce-pushed the feat/sep-2575-subscriptions-listen branch from 5a1ead3 to a10f1c2CompareJuly 17, 2026 13:56
@DaleSeo
DaleSeo marked this pull request as ready for review July 17, 2026 13:58
@DaleSeo
DaleSeo requested a review from a team as a code ownerJuly 17, 2026 13:58
@DaleSeoDaleSeo linked an issue Jul 17, 2026 that may be closed by this pull request
7 tasks
alexhancock
alexhancock previously approved these changes Jul 20, 2026
Comment threadcrates/rmcp/src/handler/server.rs Outdated
.map(ServerResult::DiscoverResult),
ClientRequest::PingRequest(_request) => {
self.ping(context).await.map(ServerResult::empty)
if mrtr_supported {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we consolidate helpers for this? It stands out to me that I did something slightly different for detecting (and now validating) legacy requests in #999

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexhancock Extracted uses_legacy_lifecycle and reused it in both tower.rs and server.rs.

@DaleSeo
DaleSeoforce-pushed the feat/sep-2575-subscriptions-listen branch 3 times, most recently from 9741293 to ddd07a9CompareJuly 20, 2026 19:18
@DaleSeo
DaleSeo requested a review from alexhancockJuly 20, 2026 19:28
@DaleSeo
DaleSeoforce-pushed the feat/sep-2575-subscriptions-listen branch 2 times, most recently from 3a7c650 to 513c348CompareJuly 21, 2026 01:17
@DaleSeo
DaleSeoforce-pushed the feat/sep-2575-subscriptions-listen branch from 513c348 to 90d72a6CompareJuly 21, 2026 01:23
@alexhancock
alexhancock merged commit ff1a715 into mainJul 21, 2026
21 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2026-07-28T-CIChanges to CI/CD workflows and configurationT-configConfiguration file changesT-coreCore library changesT-dependenciesDependencies related changesT-documentationDocumentation improvementsT-examplesExample code changesT-handlerHandler implementation changesT-modelModel/data structure changesT-serviceService layer changesT-testTesting related changesT-transportTransport layer changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement SEP-2575: Make MCP Stateless

2 participants

@DaleSeo@alexhancock