Skip to content

[Server][Client][Transport] SEP-2243: Emit Mcp-Method and Mcp-Name HTTP headers #353

Closed

Description

@chr-hertel

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

Tracked by umbrella #336.

Spec summary

Surfaces the JSON-RPC method and target name as HTTP headers (e.g. Mcp-Method: tools/call, Mcp-Name: <tool name>) so middleboxes (proxies, gateways, observability) can route/trace/prioritize without parsing the body. Gated on protocol version — non-breaking.

PHP SDK changes

  • src/Server/Transport/StreamableHttpTransport.php — set/echo Mcp-Method / Mcp-Name headers on responses; read them on requests.
  • Add a small middleware under src/Server/Transport/Http/Middleware/ (e.g. McpMethodHeaderMiddleware.php).
  • src/Client/Transport/HttpTransport.php — set Mcp-Method and Mcp-Name on outgoing client POSTs.
  • Gate on negotiated protocol version (works with SEP-2575's per-request version).
  • Update conformance/inspector tests.

Related

Activity

  1. added
    Server
    Client
    improves spec compliance
    enhancement
    on May 26, 2026
  2. added
    2026-07-28
    on May 26, 2026
  3. chr-hertel commented on Aug 19, 2026

    @chr-hertel
    MemberAuthor

    Implemented via #445, #453, #441, as the broader x-mcp-header mechanism (src/Schema/Wire/McpHeader.php) — validated server-side by StandardHeaderValidator, emitted client-side by HeaderFactory.

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-28ClientServerenhancementimproves spec compliance

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions