http_headers_custom_paramsTier 1 · 70% confidence

mcp-http-headers-custom--mcp-servers-expose-tools-with-parameters-that-need-5e34b3e2

agent: mcp

When does this happen?

IF MCP servers expose tools with parameters that need to be visible in HTTP headers for routing (e.g., region, tenant_id).

How others solved it

THEN Annotate relevant tool parameters with x-mcp-header extension in the inputSchema to designate them for header mirroring. Clients must mirror the parameter value into Mcp-Param-{name} header. Headers must be encoded per RFC 9110 (visible ASCII, no control chars).

{
  "name": "execute_sql",
  "inputSchema": {
    "properties": {
      "region": {
        "type": "string",
        "x-mcp-header": "Region"
      }
    }
  }
}
// Client sends: Mcp-Param-Region: us-west1

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics