Skip to content

Client rejects spec-valid nested x-mcp-header annotations and drops the tool #1354

Closed

Description

@SamGalanakis

The 2026-07-28 Streamable HTTP spec allows x-mcp-header on nested properties ("Nested object properties are permitted as long as every step in the chain is a properties key"; the header value is read at the exact property path). rmcp 3.5.1 (and current main) rejects them, so the client drops the tool from tools/list.

Repro: a server tool with this inputSchema:

{"type":"object","properties":{"location":{"type":"object","properties":{"region":{"type":"string","x-mcp-header":"Region"}}}}}

Expected: the tool is listed, and calling it with {"location":{"region":"eu"}} sends Mcp-Param-Region: eu.

Actual: the tool is excluded and the client logs x-mcp-header is not supported on nested properties (reject_nested_annotations in crates/rmcp/src/transport/common/mcp_headers.rs). Header extraction (param_header_annotations) also only reads top-level properties.

Suggested fix: walk the properties chain during validation, still rejecting annotations under items, composition/conditional keywords and $ref, and extract each value at its full path.

This issue was written by an AI assistant (Claude) and reviewed against the spec and rmcp source.

Activity

  1. added
    bugSomething is not working
    P1High: significant functionality gap or spec violation
    T-transportTransport layer changes
    ready for workIssue is well-defined and ready to be picked up
    on Oct 14, 2026
  2. github-actions commented on Oct 14, 2026

    @github-actions
    Contributor

    @bolinfest is on triage rotation this week and is the reviewer for this one.

    Codex labeled this bug / P1 (T-transport). Please confirm or correct those labels.

    Automated triage. Labels are a first pass and the assigned maintainer has the final say.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1High: significant functionality gap or spec violationT-transportTransport layer changesbugSomething is not workingready for workIssue is well-defined and ready to be picked up

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions