Skip to content

Add SEP-3415 Events Extension Protocol Support #3881

Open

Description

@vijaydeepsinha

The [SEP-3415: Events Extension](https://modelcontextprotocol.io/seps/3415-events-extension) has been finalized, but the official MCP Python SDK does not yet provide a native reference implementation for it.

The Python SDK should implement the Events extension as defined in SEP-3415, including event discovery, capability negotiation, event subscriptions, and the supported delivery mechanisms (polling, push streams, and webhooks). The implementation should also cover subscription lifecycle management, cursor-based event recovery, and relevant security requirements.

Tests, documentation, and usage examples should be included to ensure interoperability and provide a reference for developers building event-driven MCP clients and servers in Python.

Activity

  1. changed the title [-]Add SEP-3415 Events Extension[/-] [+]Add SEP-3415 Events Extension Protocol Support[/+] on Nov 21, 2026
  2. added
    enhancementRequest for a new feature that's not currently supported
    on Nov 21, 2026
  3. Pranjulchaurasiya commented on Nov 21, 2026

    @Pranjulchaurasiya

    Hi @vijaydeepsinha,

    I would like to help implement the reference implementation for SEP-3415 in the Python SDK.

    Looking at how extensions and subscription streams are structured in the SDK today (src/mcp/client/extension.py for capability negotiation and src/mcp/client/subscriptions.py / src/mcp/shared/subscriptions.py for SEP-2575 streams):

    Proposed Incremental Roadmap:

    1. Types & Capability Negotiation:

      • Define the Pydantic wire models for event descriptors, subscription requests/responses, delivery parameters, and cursor pagination under src/mcp/shared/events.py (or extending mcp_types).
      • Wire capability advertisement into ClientCapabilities / ServerCapabilities and extension negotiation.
    2. Client-side Subscription & Delivery Drivers:

      • Implement events/subscribe, events/unsubscribe, and polling/stream consumer drivers with cursor-based replay and bounded event backlog protection (mirroring the _MAX_PENDING_EVENTS safety in client/subscriptions.py).
    3. Server-side Handlers & Lifecycle:

      • Add server subscription state tracking, event dispatching helpers, and transport delivery adapters.
    4. Testing & Examples:

      • Add unit tests across crossed streams (jsonrpc_pair) asserting clean capability negotiation, subscription lifecycle, and cursor resume/recovery, along with client/server usage examples.

    Question for Maintainers:

    Would you prefer this delivered as a single cohesive PR, or staged starting with Phase 1 (types, capability models, and client subscription driver)?

    If this approach aligns with the SDK's design direction, could you please assign this issue to me so I can prepare the PR?

    (Prepared with AI assistance)

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

Metadata

Metadata

Labels

enhancementRequest for a new feature that's not currently supported

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions