Skip to content

Introduce McpClientCustomizer abstraction#5606

Merged
chemicL merged 2 commits intomainfrom
dgarnier/mcp-customizer
Mar 16, 2026
Merged

Introduce McpClientCustomizer abstraction#5606
chemicL merged 2 commits intomainfrom
dgarnier/mcp-customizer

Conversation

@Kehrlann
Copy link
Contributor

@Kehrlann Kehrlann commented Mar 16, 2026

Context

I need a way to customize the HttpClientStreamableHttpTransport for mcp-security OAuth2 support. With a customizer abstraction, the specific "request customizer" beans are not injected in the auto-config anymore: they should be folded into a McpClientCustomizer<HttpClientStreamableHttpTransport.Builder>.

Changes

BREAKING CHANGES

  • RemoveMcpSyncClientCustomizer and McpAsyncClientCustomizer, and replace them with McpClientCustomizer (see below)
  • Ignore McpSyncHttpClientRequestCustomizer and McpAsyncHttpClientRequestCustomizer beans in auto-configuration

Additions

  • Add McpClientCustomizer<T>, which allows customizing a named client component (client spec, client transport).
  • Use in all transport autoconfiguration, allowing users to change multiple properties in the builders.

@Kehrlann Kehrlann force-pushed the dgarnier/mcp-customizer branch 2 times, most recently from 30c4e8f to c8654d1 Compare March 16, 2026 06:49
@sdeleuze sdeleuze added this to the 2.0.0-M3 milestone Mar 16, 2026
@sdeleuze sdeleuze added enhancement New feature or request MCP labels Mar 16, 2026
- Replace Mcp[A]SyncClientCustomizer by this new abstraction.
- Use in all transports to customize the transport builders.

Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
@Kehrlann Kehrlann force-pushed the dgarnier/mcp-customizer branch from c8654d1 to f262cb8 Compare March 16, 2026 10:30
@Kehrlann Kehrlann marked this pull request as ready for review March 16, 2026 10:31
Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
@Kehrlann Kehrlann force-pushed the dgarnier/mcp-customizer branch from f262cb8 to 244b5c5 Compare March 16, 2026 10:44
@Kehrlann Kehrlann requested a review from tzolov March 16, 2026 10:45
@chemicL chemicL merged commit 272c736 into main Mar 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request MCP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants