Skip to content

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

@chr-hertel

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

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 componentServerIssues & PRs related to the Server componentenhancementRequest for a new feature that's not currently supportedimproves spec complianceImproves consistency with other SDKs such as TyepScript

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions