createmcps.com

MCP-HDR-002

Missing Mcp-Name on tools/call rejected with 400 + HeaderMismatch

“Mcp-Name | params.name or params.uri | tools/call, resources/read, prompts/get requests.” — spec anchor

How to fix this

`tools/call`, `resources/read` and `prompts/get` must carry `Mcp-Name` holding the body's `params.name` (or `params.uri`). Reject the request with 400 and `-32020` when it is missing.

Example: failing and passing

The tools/call request has no Mcp-Name header, and the server runs the tool anyway.
Violates MCP-HDR-002 · HTTP
POST /mcp HTTP/1.1
Host: mcp.example.com
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call

{"jsonrpc": "2.0", "id": 1, "method": "tools/call",
  "params": {"name": "get_weather", "arguments": {"location": "Seattle, WA"},
    "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28",
              "io.modelcontextprotocol/clientCapabilities": {}}}}

HTTP/1.1 200 OK
Content-Type: application/json

{"jsonrpc": "2.0", "id": 1, "result": {"resultType": "complete", "content": [{"type": "text", "text": "Seattle: 12°C, light rain"}], "isError": false}}
The server rejects the tools/call that lacks Mcp-Name with 400 Bad Request and HeaderMismatch (-32020).
Complies with MCP-HDR-002 · HTTP
POST /mcp HTTP/1.1
Host: mcp.example.com
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call

{"jsonrpc": "2.0", "id": 1, "method": "tools/call",
  "params": {"name": "get_weather", "arguments": {"location": "Seattle, WA"},
    "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28",
              "io.modelcontextprotocol/clientCapabilities": {}}}}

HTTP/1.1 400 Bad Request
Content-Type: application/json

{"jsonrpc": "2.0", "id": 1, "error": {"code": -32020, "message": "Header mismatch: required header Mcp-Name is missing"}}

Check your own server against MCP-HDR-002

Probe P3.3 checks MCP-HDR-002 in a request of its own, so one run shows your server's result for this rule next to the rest. Validate a server or read how the validator works.

Background on this topic: the Mcp-Method header explained.

Other Request metadata headers rules

  • MCP-HDR-001Missing Mcp-Method rejected with 400 + HeaderMismatch
  • MCP-HDR-003Mcp-Name header must match the request body
  • MCP-HDR-004Missing MCP-Protocol-Version rejected (modern-only servers)
  • MCP-HDR-005MCP-Protocol-Version header must match _meta.protocolVersion
  • MCP-HDR-006Header names compared case-insensitively
  • MCP-HDR-007Base64 sentinel-encoded header values decoded before comparison
  • MCP-HDR-008Mcp-Param-{Name} validated against body when x-mcp-header is declared
  • MCP-HDR-009Mcp-Param-{Name} containing invalid characters is rejected
  • MCP-HDR-010Header validation runs before method dispatch