-
Notifications
You must be signed in to change notification settings - Fork 2k
Improved the documentation in the MCP Server Boot Starter regarding Starter selection #3511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improved the documentation in the MCP Server Boot Starter regarding Starter selection #3511
Conversation
…rding `Starter` selection, and added descriptions of precautions for `spring-ai-starter-mcp-server-webflux`. Signed-off-by: Sun Yuhan <[email protected]>
|
Hi @ilayaperumalg what do you think of this? |
yuluo-yx
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
BTW, I think this can solve the problem you are facing now, or we can also solve it through configuration?
such as spring.main.web-application-type=reactive.
Should this be added to the documentation?
Yes, we can indeed solve this issue through this configuration. I had also considered documenting this configuration, but ultimately, I thought that if users are using other components in their projects that depend on |
- Improved the documentation in the `MCP Server Boot Starter` regarding `Starter` selection, and added descriptions of precautions for `spring-ai-starter-mcp-server-webflux`. Fixes: #3511 Signed-off-by: Sun Yuhan <[email protected]> (cherry picked from commit 384478e)
- Improved the documentation in the `MCP Server Boot Starter` regarding `Starter` selection, and added descriptions of precautions for `spring-ai-starter-mcp-server-webflux`. Fixes: spring-projects#3511 Auto-cherry-pick to 1.0.x Signed-off-by: Sun Yuhan <[email protected]>
- Improved the documentation in the `MCP Server Boot Starter` regarding `Starter` selection, and added descriptions of precautions for `spring-ai-starter-mcp-server-webflux`. Fixes: spring-projects#3511 Auto-cherry-pick to 1.0.x Signed-off-by: Sun Yuhan <[email protected]>
Spring AI provides three starters for MCP servers:
spring-ai-starter-mcp-server,spring-ai-starter-mcp-server-webmvc, andspring-ai-starter-mcp-server-webflux, among whichspring-ai-starter-mcp-server-webfluxis designed for reactive projects.However, due to Spring Boot's default behavior, if both
org.springframework.web.servlet.DispatcherServletandorg.springframework.web.reactive.DispatcherHandlerare present in the classpath, Spring Boot will prioritize the former:https://github.com/spring-projects/spring-boot/blob/0daf3f5897a9bad169ad7ebad6d79e4260a24822/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/WebApplicationType.java#L60-L71
This means that if users mistakenly use
spring-ai-starter-mcp-server-webfluxin a project built withspring-boot-starter-web, MCP endpoints such as/ssewill become non-functional.Of course, this is not an issue with Spring AI itself. However, considering that it has already caused considerable confusion :
I believe adding appropriate documentation would help users better understand what they are doing and avoid such pitfalls.