Skip to content

[Server][Transport] SEP-2322: Multi Round-Trip Requests on Streamable HTTP #342

Closed

Description

@chr-hertel

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

Tracked by umbrella #334.

Spec summary

Introduces a transport mechanism for multi round-trip exchanges within a single logical request (e.g. server → client → server → client → ...). Replaces session-scoped server-initiated requests with a per-request "conversation". Schema additions correlate sub-requests/responses to a parent request.

PHP SDK changes

  • src/Server/Transport/StreamableHttpTransport.php — POST handler must support multi-turn streams (keep connection open for nested round trips within a single logical request), separate from messages/listen.
  • src/Server/Protocol.php — Fiber suspension currently relies on session-stored __pending_responses. Refactor to associate pending responses with the request rather than the session.
  • src/JsonRpc/MessageFactory.php — new envelope fields for parent-request correlation.
  • src/Client/Transport/HttpTransport.php and src/Client/Protocol.php — handle inline server requests on the response stream.
  • New schemas in src/Schema/ to describe MRTR envelope.

Breaking change. Companion to SEP-2567 (sessionless) — they must land together.

Related

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 #446, #449. InputRequiredResult + RequestStateCodec provide the multi round-trip pattern: a handler names what it still needs, the client resends with the answer.

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