You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mirror x-mcp-header tool arguments into Mcp-Param-* request headers (SEP-2243)
On a modern (2026-07-28) Streamable HTTP connection, a tools/call now mirrors
each argument annotated with x-mcp-header in the tool's input schema into an
Mcp-Param-<name> header: string verbatim, integer as decimal, boolean as
true/false, base64-sentinel-wrapped when not header-safe. Null or absent
arguments are omitted and unannotated parameters are never mirrored; the
argument stays in the request body.
The tool schema comes from a prior list_tools (annotations are cached) or a
per-call tool= override, so a client can emit headers without a prior
list_tools. An uncached tool emits no Mcp-Param-* headers.
Adds the http-custom-headers conformance client handler. The scenario stays an
expected failure: its fixture annotates number-typed properties, which the spec
forbids, so a conformant client drops those tools.
Copy file name to clipboardExpand all lines: docs/migration.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -398,6 +398,10 @@ For an in-process `Client(server)` (where `server` is a `Server` or `MCPServer`
398
398
399
399
For protocol 2026-07-28, a `tools/call` request may return an `InputRequiredResult` asking the client to supply additional input and retry. By default `call_tool` (on `ClientSession`, `Client`, and `ClientSessionGroup`) still returns `CallToolResult` and raises `RuntimeError` if the server requests input. Pass `allow_input_required=True` to receive the `InputRequiredResult` instead, then retry with `input_responses=` / `request_state=`.
400
400
401
+
### `call_tool` mirrors `x-mcp-header` arguments into `Mcp-Param-*` headers (SEP-2243)
402
+
403
+
For protocol 2026-07-28 over Streamable HTTP, a tool's input-schema property may carry an `x-mcp-header` annotation. When a tool the client has listed is called, each annotated argument is mirrored into an `Mcp-Param-<name>` request header (string verbatim, integer as decimal, boolean as `true`/`false`, base64-sentinel-wrapped when not header-safe; `null`/absent arguments are omitted). The argument is also left in the request body. `list_tools` caches a tool's annotations; if the client has not listed the tool, pass its definition via `call_tool(..., tool=...)` to enable mirroring without a prior `list_tools`. Other transports ignore the annotation.
404
+
401
405
### `McpError` renamed to `MCPError`
402
406
403
407
The `McpError` exception class has been renamed to `MCPError` for consistent naming with the MCP acronym style used throughout the SDK.
0 commit comments