Skip to content

[Server][Client] SEP-2575: Stateless protocol (per-request version, server/discover, messages/listen) #340

Closed

Description

@chr-hertel

Implements SEP-2575 for the MCP Spec 2026-07-28 release.

Tracked by umbrella #334.

Spec summary

Removes the mandatory initialize/initialized handshake. Protocol version and client info travel in _meta on every request; servers can use server/discover to fetch capabilities. Adds messages/listen RPC replacing the GET-SSE channel.

PHP SDK changes

  • src/Server/Handler/Request/InitializeHandler.php, src/Schema/Request/InitializeRequest.php, src/Schema/Result/InitializeResult.php — keep working for old clients but make optional; gate on protocol version.
  • src/Server/Protocol.php — drop hard requirement that initialize precedes other calls; route server/discover and messages/listen.
  • Add src/Server/Handler/Request/DiscoverHandler.php and MessagesListenHandler.php; corresponding schemas under src/Schema/Request|Result/.
  • src/Server/Transport/Http/Middleware/ProtocolVersionMiddleware.php — extend to also read _meta.protocolVersion from JSON-RPC payloads and emit UnsupportedVersionError.
  • src/Server/Transport/StreamableHttpTransport.php — route streaming through messages/listen POST; legacy GET-SSE deprecated.
  • src/Client/Protocol.php and src/Client/Builder.php — skip handshake when negotiating new version; emit per-request capabilities/version; handle UnsupportedVersionError retry.

Breaking change. Coordinate with deprecation policy (SEP-2596, umbrella #339).

Related SEPs

Activity

  1. added
    Server
    Client
    Schema
    breaking change
    P0
    improves spec compliance
    needs design
    enhancement
    on May 26, 2026
  2. added
    2026-07-28
    on May 26, 2026
  3. removed
    P0
    on Aug 19, 2026
  4. chr-hertel commented on Aug 19, 2026

    @chr-hertel
    MemberAuthor

    Implemented via #443, #444, #447, #448, #455, #456, #457. The modern (2026-07-28) lifecycle now serves server/discover and subscriptions/listen (the spec's finalized name for this issue's sketched messages/listen); the legacy initialize handshake is still served for older clients on the same endpoint.

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

    2026-07-28ClientSchemaServerbreaking changeenhancementimproves spec complianceneeds design

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions