MCP Shipyard
← Rules catalog

Invalid x-mcp-header annotation: clients drop the whole MCP tool

x-mcp-header values must be unique header tokens on string, integer or boolean properties. Streamable HTTP clients exclude tools that break the rules.

majorschema.x-mcp-header-invalidGeneral

Fix every x-mcp-header annotation in your tool schemas, or remove it. The rule schema.x-mcp-header-invalid is a major finding for general MCP clients. It runs only when the server negotiated protocol 2026-07-28.

What you see

  • A scan reports, per property, one or more problems and ends with Clients will exclude this tool.
  • In the client, the tool is missing from the list while the others work. The 2026-07-28 spec says clients SHOULD log a warning with the tool name and the reason; where that log appears depends on the client and is not verified here.

Why it happens

x-mcp-header mirrors a parameter value into an Mcp-Param-{name} HTTP header so load balancers and proxies can route on it. The spec lists constraints, and the rule checks these:

  • The value must not be empty and must be a valid HTTP field-name token.
  • Values must be case-insensitively unique within the schema.
  • Only string, integer and boolean properties are allowed. number is not.
  • The property must be statically reachable from the schema root: not inside items, anyOf, oneOf, allOf, not or conditionals.

The spec says clients using Streamable HTTP "MUST reject tool definitions where any x-mcp-header value violates these constraints" and must exclude the tool from tools/list. One bad annotation therefore removes the whole tool. The spec also says not to mark sensitive parameters (passwords, API keys, tokens, PII), since header values are visible to intermediaries. The rule warns when a property path looks sensitive.

Check it yourself

curl -s -X POST https://mcp.acme.example/mcp \
  -H 'Content-Type: application/json' -H 'Accept: application/json, text/event-stream' \
  -H "Authorization: Bearer $TOKEN" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' \
 | jq '.result.tools[] | {name, headers: [.inputSchema.. | objects | select(has("x-mcp-header")) | {h: .["x-mcp-header"], type}]}'

Fix

"region": { "type": "string", "description": "Warehouse region, e.g. eu-west", "x-mcp-header": "Region" }
  • Use short tokens made of letters, digits and -, _, ..
  • Change type: "number" to integer, or drop the annotation.
  • Move a nested-in-array annotation to a top-level property or remove it.
  • Never annotate secrets or personal data.

Verify

Every annotation passes the list above, the tool appears in a 2026-07-28 client, and the re-scan passes.

Which clients care

General, per the rule. Applies to clients on the Streamable HTTP transport; the spec lets stdio clients ignore the annotation.

Source

MCP tools specification: https://modelcontextprotocol.io/specification/2026-07-28/server/tools

Run a free scan at https://mcpshipyard.com/scan to check every rule at once.

Check every rule at once

A free scan runs this check and the other 152 against your live URL.

Scan a server