Skip to content

tools/call omits SEP-2243 Mcp-Param-* headers (x-mcp-header mirroring), rejected by strict modern servers #1846

Closed

Description

@SamMorrowDrums

Problem

Connecting to a strict modern (2026-07-28) HTTP MCP server (e.g. the GitHub MCP Server) and calling a tool whose argument carries a SEP-2243 x-mcp-header annotation fails with:

header mismatch: missing Mcp-Param-owner header for parameter "owner"

The Inspector never sends the mirrored Mcp-Param-* header, so the server rejects the call with -32020.

Root cause

SEP-2243 x-mcp-header → Mcp-Param-* mirroring lives only inside the SDK's client.callTool(), and there it is additionally gated && detectProbeEnvironment() !== "browser". Two independent reasons it never happens in the Inspector:

  1. The Inspector doesn't use callTool(). To drive MRTR / input_required manually (History: drive MRTR manually to keep pending-request UX on modern connections #1704), tools/call is routed through client.request("tools/call", …) (requestWithInputRequired). That path has no mirroring — so it is bypassed on every transport (web, CLI, TUI), not just the browser.
  2. The web path couldn't carry the header anyway. RemoteClientTransport.requestSend() only forwarded { sessionId, message, relatedRequestId }; per-request headers never reached the backend's upstream transport.send.

#1632 added x-mcp-header display + invalid-tool exclusion, but never wired the header onto the tools/call wire.

Fix

  • core: in InspectorClient.attemptToolCall, on a modern connection, build the Mcp-Param-* headers (faithful port of the SDK's non-public buildMcpParamHeaders + value encoding, in core/json/xMcpHeader.ts) and attach them to the tools/call request options. Protocol.request forwards headers to the transport and preserves them across MRTR retry legs. Fixes CLI/TUI (direct StreamableHTTP) outright.
  • web: forward per-send headers through RemoteClientTransport.requestSend → /api/mcp/send → the backend's upstream transport.send. The browser can't set cross-origin headers, but the Node backend can — which is exactly where the Inspector's real request is issued.

Verified end-to-end against the live GitHub MCP Server (HTTP, modern era): tool calls with annotated arguments now succeed.

Metadata

Metadata

Labels

v2

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions