Skip to content

README: use McpClientCustomizer in the client customizer snippets - #91

Open
shin1488 wants to merge 1 commit into
spring-ai-community:mainfrom
shin1488:docs-client-customizer-type
Open

README: use McpClientCustomizer in the client customizer snippets#91
shin1488 wants to merge 1 commit into
spring-ai-community:mainfrom
shin1488:docs-client-customizer-type

Conversation

@shin1488

@shin1488 shin1488 commented Jul 26, 2026

Copy link
Copy Markdown

The @Bean snippets in the README and in AuthenticationMcpTransportContextProvider's javadoc declare the bean as McpSyncClientCustomizer. Spring AI removed that type in 2.0.0-M3, replacing the sync and async client customizers with the parameterized McpClientCustomizer<B>. This project moved to M3 in d477aa3, which migrated the Java sources but not the documentation, and now targets 2.0.0 — so the snippets no longer compile against the version it ships with.

Configurations of this bean in the repository already use the current type — for example samples/sample-mcp-client-webclient/.../McpConfiguration.java, samples/integration-tests/src/main/.../McpClientConfiguration.java and mcp-client-security-spring-boot/.../McpOAuth2ClientConfigurations.java:

@Bean
McpClientCustomizer<McpClient.SyncSpec> syncClientCustomizer() {
    return (name, syncSpec) -> syncSpec.transportContextProvider(new AuthenticationMcpTransportContextProvider());
}

The lambda is unchanged — McpClientCustomizer takes the same (name, spec) arguments — so this is the type only. Four snippets in the README and the one in the javadoc are updated, along with the sentence naming McpSyncClientCustomizer and McpAsyncClientCustomizer, which now names McpClientCustomizer for both. In the javadoc the angle brackets are written as HTML entities, as the surrounding <pre> block already does for the annotation.

Spring AI removed McpSyncClientCustomizer and McpAsyncClientCustomizer in 2.0.0-M3,
replacing them with the parameterized McpClientCustomizer<B>. This project moved to M3 in
d477aa3, which migrated the Java sources but not the documentation, and now targets 2.0.0 —
so the @bean snippets in the README and in AuthenticationMcpTransportContextProvider's
javadoc no longer compile against the version it ships with.

The lambda is unchanged, so this is the type only. In the javadoc the angle brackets are
written as HTML entities, as the surrounding pre block already does for the annotation.

Signed-off-by: Yeongchan Shin <syc1488@naver.com>
@shin1488
shin1488 marked this pull request as ready for review July 26, 2026 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant