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
    ServerIssues & PRs related to the Server component
    ClientIssues & PRs related to the Client component
    SchemaIssues & PRs related to the Schema component
    breaking changeBreaking the Backwards Compatibility Promise
    P0Broken core functionality, security issues, critical missing feature
    improves spec complianceImproves consistency with other SDKs such as TyepScript
    needs designValid issue but needs maintainer alignment on design or approach
    enhancementRequest for a new feature that's not currently supported
    on May 26, 2026
  2. added
    2026-07-28All issues and PRs related to the spec release 2026-07-28
    on May 26, 2026
  3. removed
    P0Broken core functionality, security issues, critical missing feature
    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-28All issues and PRs related to the spec release 2026-07-28ClientIssues & PRs related to the Client componentSchemaIssues & PRs related to the Schema componentServerIssues & PRs related to the Server componentbreaking changeBreaking the Backwards Compatibility PromiseenhancementRequest for a new feature that's not currently supportedimproves spec complianceImproves consistency with other SDKs such as TyepScriptneeds designValid issue but needs maintainer alignment on design or approach

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions