Skip to content

Conversation

@wilocu
Copy link
Contributor

@wilocu wilocu commented Jul 31, 2025

Summary

This PR addresses the confusion around splitting complex MCP SSE URLs into the required url and sse-endpoint properties. The
functionality already worked correctly, but users lacked clear examples and guidance on how to properly configure complex URLs
like http://localhost:3000/mcp-hub/sse/cf9ec4527e3c4a2cbb149a85ea45ab01.

Changes
Enhanced Documentation:

  • JavaDoc improvements in McpSseClientProperties.java with comprehensive URL splitting examples
  • AsciiDoc documentation in mcp-client-boot-starter-docs.adoc with real-world configuration examples
  • URL splitting guidelines table showing how to split various URL patterns
  • Troubleshooting section for common 404 errors

Test Coverage:

  • Added mcpHubStyleUrlWithTokenPath() test in McpSseClientPropertiesTests.java
  • Validates the exact URL pattern from the GitHub issue
  • Ensures complex token-based paths work correctly

Better Error Messages:

  • Enhanced error handling in SseHttpClientTransportAutoConfiguration.java
  • Clear validation messages explaining proper URL splitting
  • Examples in error messages for quick debugging

Testing

Files Modified

  • auto-configurations/mcp/spring-ai-autoconfigure-mcp-client-common/src/main/java/org/springframework/ai/mcp/client/common/auto
    configure/properties/McpSseClientProperties.java
  • auto-configurations/mcp/spring-ai-autoconfigure-mcp-client-common/src/test/java/org/springframework/ai/mcp/client/common/auto
    configure/properties/McpSseClientPropertiesTests.java
  • auto-configurations/mcp/spring-ai-autoconfigure-mcp-client-httpclient/src/main/java/org/springframework/ai/mcp/client/httpcli
    ent/autoconfigure/SseHttpClientTransportAutoConfiguration.java
  • spring-ai-docs/src/main/antora/modules/ROOT/pages/api/mcp/mcp-client-boot-starter-docs.adoc

Signed-off-by: Mattia Pasetto [email protected]

I am still pretty new to contributions, please double check and let me know of any errors.

Signed-off-by: Mattia Pasetto <[email protected]>
@ilayaperumalg ilayaperumalg added the documentation Improvements or additions to documentation label Oct 22, 2025
@ilayaperumalg ilayaperumalg added this to the 1.1.0.M4 milestone Oct 22, 2025
@ilayaperumalg ilayaperumalg self-assigned this Oct 22, 2025
@ilayaperumalg
Copy link
Member

@wilocu Thanks for the PR! Can you apply similar changes to SseWebFluxTransportAutoConfiguration as well?

@ilayaperumalg ilayaperumalg modified the milestones: 1.1.0.M4, 1.1.0.RC1 Oct 29, 2025
@ilayaperumalg
Copy link
Member

@wilocu Thanks for the PR improving the SSE URL handling and documentation updates. LGTM, rebased and merged as 357190d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation MCP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants