Repository navigation
fix(transport): accept nested x-mcp-header annotations - #1359
Merged
DaleSeo merged 3 commits intoOct 16, 2026
Merged
Conversation
Contributor
|
@bolinfest is on triage rotation this week and is the reviewer for this one. Automated classification did not run for this one, so it needs a full manual pass. Automated triage. Labels are a first pass and the assigned maintainer has the final say. |
gocamille
reviewed
Oct 15, 2026
DaleSeo
force-pushed
the
DaleSeo/client-rejects-spec-valid-nested-x-mcp-header-an
branch
from
October 15, 2026 16:42
9dbff39 to
b88dbf8
Compare
gocamille
previously approved these changes
Oct 16, 2026
gocamille
left a comment
Contributor
There was a problem hiding this comment.
This looks good to me, thanks @DaleSeo! I checked the new tests against main and they all fail there for the right reason. I had a minor ask for the body: the server side changes too (an inline nested annotation now gets -32020 when the header is missing), so maybe a sentence in Breaking Changes would be useful.
gocamille
reviewed
Oct 16, 2026
gocamille
reviewed
Oct 16, 2026
gocamille
approved these changes
Oct 16, 2026
DaleSeo
deleted the
DaleSeo/client-rejects-spec-valid-nested-x-mcp-header-an
branch
October 16, 2026 20:19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1354.
Motivation and Context
The 2026-07-28 Streamable HTTP spec allows
x-mcp-headeron any property you can reach from the schema root using onlypropertieskeys. rmcp only handled top-level annotations, so it dropped tools with nested annotations fromtools/listand only read top-level argument values when building headers.Now, annotations are collected along the full
propertieschain, with each annotation's path. The existing checks for valid tokens, primitive types, and duplicates that differ only in case apply at every level. The client reads the header value from the full path, and the server checks it there too. If part of the path is missing, the client leaves out the header.How Has This Been Tested?
Added tests
Breaking Changes
There are no API changes, but one behavior has changed. The old code only checked
properties, so it silently ignored annotations underitems, composition or conditional keywords,$defsor$reftargets, and the schema root. The spec says those annotations make the tool invalid, so the client now leaves those tools out oftools/listand logs a warning.Types of changes
Checklist
Additional context