Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: modelcontextprotocol/java-sdk
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: modelcontextprotocol/java-sdk
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: x-mcp-header
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 18 files changed
  • 1 contributor

Commits on Oct 31, 2026

  1. Validate SEP-2243 Mcp-Param headers in the modern server

    - Tools can mark inputSchema arguments with x-mcp-header, so clients
      mirror them into Mcp-Param-{Name} headers. Servers MUST reject a
      request whose headers and body disagree, with 400 / -32020.
    - Since only tools/call use those header, they are not part of the
      McpRequestHandler interface, and rather are carried through the
      McpTransportContext.
    - The HTTP transport extracts and decodes Mcp-Param-* headers and puts
      them in the context. STDIO puts a marker "not mirrored" value instead.
    - Validation happens in ToolsFeature, where we have both the tool
      definition (including x-mcp-header annotations in the schema) and the
      values for the tool call.
    - McpHeaderDecoder and McpParamHeaders are public, so other HTTP
      transports can reuse them.
    - Mcp-Name now uses the same strict decoder.
    
    Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
    Kehrlann committed Oct 31, 2026
    Configuration menu
    Copy the full SHA
    0206291 View commit details
    Browse the repository at this point in the history
Loading