Skip to content

Adapt modern MCP transports to SDK McpHeaders - #7390

Merged
tzolov merged 1 commit into
spring-projects:mainfrom
tzolov:mcp-sdk-headers
Nov 13, 2026
Merged

tzolov merged 1 commit into
spring-projects:mainfrom
tzolov:mcp-sdk-headers

Conversation

@tzolov

@tzolov tzolov commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

The MCP Java SDK reworked McpParamHeaders into McpHeaders and
renamed McpHeaderDecoder.paramHeaders to headers, so the modern
WebFlux and WebMvc server transports no longer compiled against the
current SDK snapshot.

  • Use McpHeaders and McpHeaderDecoder.headers
  • Add the decoded Mcp-Name and Mcp-Param-* headers to the
    transport context of every request, not only of tools/call,
    because extensions may mirror a parameter into Mcp-Name

The MCP Java SDK reworked `McpParamHeaders` into `McpHeaders` and
renamed `McpHeaderDecoder.paramHeaders` to `headers`, so the modern
WebFlux and WebMvc server transports no longer compiled against the
current SDK snapshot.

- Use `McpHeaders` and `McpHeaderDecoder.headers`
- Add the decoded `Mcp-Name` and `Mcp-Param-*` headers to the
  transport context of every request, not only of `tools/call`,
  because extensions may mirror a parameter into `Mcp-Name`

Based on a patch by Daniel Garnier-Moiroux.

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
@tzolov tzolov added this to the 2.1.0 milestone Nov 13, 2026
@tzolov tzolov added mcp bug Something isn't working labels Nov 13, 2026
@tzolov
tzolov merged commit bc7217e into spring-projects:main Nov 13, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working mcp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant