Skip to content

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

Open
DaleSeo wants to merge 2 commits into
mainfrom
feat/sep-2575-subscriptions-listen
Open

feat: add subscription listen streams (SEP-2575)#1000
DaleSeo wants to merge 2 commits into
mainfrom
feat/sep-2575-subscriptions-listen

Conversation

@DaleSeo

@DaleSeo DaleSeo 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-actions github-actions Bot 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
DaleSeo force-pushed the feat/sep-2575-subscriptions-listen branch from 57f0dad to 5a1ead3 Compare July 17, 2026 00:48
@DaleSeo DaleSeo self-assigned this Jul 17, 2026
@DaleSeo
DaleSeo force-pushed the feat/sep-2575-subscriptions-listen branch from 5a1ead3 to a10f1c2 Compare July 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 owner July 17, 2026 13:58
@DaleSeo DaleSeo 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 thread crates/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
Member Author

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
DaleSeo force-pushed the feat/sep-2575-subscriptions-listen branch 3 times, most recently from 9741293 to ddd07a9 Compare July 20, 2026 19:18
@DaleSeo
DaleSeo requested a review from alexhancock July 20, 2026 19:28
@DaleSeo
DaleSeo force-pushed the feat/sep-2575-subscriptions-listen branch from ddd07a9 to 3a7c650 Compare July 20, 2026 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-CI Changes to CI/CD workflows and configuration T-config Configuration file changes T-core Core library changes T-dependencies Dependencies related changes T-documentation Documentation improvements T-examples Example code changes T-handler Handler implementation changes T-model Model/data structure changes T-service Service layer changes T-test Testing related changes T-transport Transport layer changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement SEP-2575: Make MCP Stateless

2 participants