Skip to content

subscriptions/listen #2901

Description

@maxisbey

The opt-in long-lived notification stream: server accepts a filter, acks first, routes only opted-in types, tags with subscriptionId; client demux helper for #2894 to wire in.

What's in it

  • Server: accept subscriptions/listen with a filter, send the ack first, route only opted-in notification types, tag each with subscriptionId.
  • A way for the existing notification publishers (list_changed, resources/updated) to feed the listen stream.
  • Client demux helper (open/maintain stream, demux by id, re-subscribe after a stdio reconnect) — wired in by New Client (all-versions, low-level + high-level) #2894.

Conformance

  • The sep-2575-server-* subscription checks inside server-stateless run (not skip) and pass
  • Together with Backwards compatibility & version negotiation, New HTTP serving path (modern + dual-era), Capabilities API + server/discover handler, Context object (layered, per-request): server-stateless

Dependencies

References

Activity

  1. added
    v2Affects the v2 line (2.x on main)
    spec-2026-07-28Concerns the SDK's implementation of the 2026-07-28 MCP spec revision
    on Jun 17, 2026
  2. maxisbey commented on Jul 7, 2026

    @maxisbey
    ContributorAuthor

    Shipped across #3035 (server runtime: filtered listen, ack-first, opted-in routing, subscriptionId tagging, pluggable subscription bus), #3046 (client plumbing: request-id options, transport-correct cancellation), and #3047 (client driver: client.listen() async context manager with typed events). The sep-2575 subscription checks inside server-stateless run and pass.

    Two notes: re-subscribe-after-reconnect is deliberately an explicit user loop (no auto-re-listen); listen over stdio is not yet served and is tracked as follow-up work before the stable release.

    AI Disclaimer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    spec-2026-07-28Concerns the SDK's implementation of the 2026-07-28 MCP spec revisionv2Affects the v2 line (2.x on main)

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions