Skip to content

Implement SEP-3415: Events extension #1488

Todo

Description

@cwahn

Motivation

SEP-3415 became Final in November 2026, and the Events extension is in Beta. It lets MCP servers expose upstream events and clients subscribe without modeling subscriptions as tool calls. The draft TypeScript reference PR covers all three modes; Python #3822 covers poll and webhook, and C# #2038 tracks SDK support. rmcp has an extension capability map and subscriptions/listen, but no Events support. #1447 / #1468 addressed capability round-tripping; Beta uses capabilities.extensions, not top-level capabilities.events.

Proposal

Implement both roles for MCP 2026-07-28 and later, with no legacy initialize advertisement. Include discovery, paginated catalogs, poll, push over stdio and Streamable HTTP, authenticated webhooks (signed challenge verification, Standard Webhooks v1, refresh, bounded retries, and receiver; grants are always finite, which the Beta permits even for ttlMs: null), and opt-in catalog changes. Optional well-known receiver discovery, v1a signing, Server Card publishing, suspension, and no-expiry/durable grants are out of scope.

Proposed API: non-default events, events-webhook-receiver, and events-webhook (outbound dispatcher), plus runtime opt-in. Register a descriptor with either a durable-cursor check source or a bounded replaying emit source. Provide typed list/poll methods and one async subscription stream. No background work for unused Events; no new mandatory dependencies.

Shared changes: never persist long-lived requests (subscriptions/listen, events/stream) to the EventStore, and cancel them on disconnect; drop request-correlated notifications queued after a stdio notifications/cancelled; extend Mcp-Name/Mcp-Param-* to the four named Events requests; add the eventsListChanged listen filter field; redact events/* params in Debug.

Proposed PR order

  1. Long-lived request lifetime on HTTP (no EventStore, cancel on disconnect) and the stdio post-cancel notification fence.
  2. Negotiation, catalog, routing headers, listen filter, check/emit sources, and poll in both roles.
  3. Push in both roles.
  4. Standard Webhooks codec and receiver.
  5. Webhook server, secure dispatch, and finite in-memory subscriptions.

Each PR should pass CI with its own tests. We'll wire the Events conformance scenarios (#521, #541) once a Beta-aligned revision is pinned. For ext-events#9 we follow the Beta text (abandoned deliveries may advance the watermark) and will adopt the WG's resolution.

Questions before implementation

  • Would you prefer a registered EventsServer exposed through a defaulted handler hook, or a composable handler wrapper?
  • Is an Events-specific listen filter field preferable to a reusable extension registration seam at this point?
  • Should the Rust API follow normal semver with #[non_exhaustive] types, or carry a separate experimental marker given the wire extension's Beta status?
  • Is the dependency budget right: no JSON Schema validator and no new crates, with webhook egress reusing reqwest (validating resolver, no redirects or proxies)?
  • Is the proposed PR size/order workable, particularly the first usable poll slice?
  • #1024 persists modern stateless SSE responses for Last-Event-ID replay and doesn't cancel them on disconnect (tests/test_streamable_http_event_store.rs:270), while the 2026-07-28 transport says streams aren't resumable and a disconnect MUST cancel. Is exempting only long-lived requests acceptable now, with unary requests handled separately?

I used AI assistance to research and draft this proposal and plan to use it during implementation. I will review and test the changes.

Activity

  1. added
    enhancement
    P2
    T-service
    T-transport
    on Nov 24, 2026
  2. github-actions commented on Nov 24, 2026

    @github-actions
    Contributor

    @baxen is on triage rotation this week and is the reviewer for this one.

    Codex labeled this enhancement / P2 (T-service, T-transport). Please confirm or correct those labels.

    Automated triage. Labels are a first pass and the assigned maintainer has the final say.

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

Metadata

Metadata

Assignees

Labels

P2T-serviceT-transportenhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions