Add HeaderMismatchError to schema and reserve -32000..-32099 for MCP#2642
Open
pja-ant wants to merge 2 commits into
Open
Add HeaderMismatchError to schema and reserve -32000..-32099 for MCP#2642pja-ant wants to merge 2 commits into
pja-ant wants to merge 2 commits into
Conversation
Declares the -32001 HeaderMismatch error (previously only in transport prose) as a schema type with constant and example, and adds normative language to the Error Responses section reserving the -32000..-32099 range for MCP-defined errors so implementations don't allocate conflicting codes.
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
SamMorrowDrums
added a commit
to SamMorrowDrums/modelcontextprotocol
that referenced
this pull request
Jun 1, 2026
Per WG feedback (Kurtis), revert the bare-header-tolerated design and restore strict byte-equality between _meta and the corresponding HTTP header on both request (Accept-Language) and response (Content-Language) sides, with header absence on requests tolerated for CDN compatibility. Use error code -32005 for HeaderMismatch instead of -32001, which is already in conflicting use across SDKs (REQUEST_TIMEOUT in Python and Kotlin vs HeaderMismatch in Go and C#); the code is provisional pending SEP-2243 / SEP-2678 / PR modelcontextprotocol#2642 schema-level reservation work. Add a Normalization footgun section covering Fastly, Varnish, CloudFront and reverse-proxy header rewriting; consolidate operator-config detail in that section so Security and Backward Compatibility just link to it. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
4 tasks
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.
Motivation and Context
The
-32001HeaderMismatcherror code from SEP-2243 was defined only in transport prose, not in the schema. This adds it as a proper schema type alongside the other error interfaces.This also adds normative language to the Error Responses section reserving
-32000to-32099for MCP-defined errors. JSON-RPC designates this range as "implementation-defined server errors"; MCP claims it so that SDKs and applications don't allocate codes that later collide with protocol-defined ones.How Has This Been Tested?
npm run preppasses (schema validation, example validation, link check, formatting).Breaking Changes
None to the wire protocol. Implementations that have already allocated custom codes in
-32000..-32099would be non-conforming under the new MUST NOT, but that was always the intent of this range.Types of changes
Checklist
npm run generate:schema)npm run preppasses