Description
Bug description
When using webflux client the MCP usage is unstable. It works for some MCPs and it doesn't work for others.
For instance it woks for Vaadin MCP but not for IntelliJ MCP.
Important to mention that at some moment during last week the Anthropic case was working.
Environment
- Spring AI 1.0.0-SNAPSHOT (2025-05-12)
- Java 17
- IntelliJ 2025.1 UE
- IntelliJ MCP Server 1.0.29
Steps to reproduce
- Install IntelliJ and IntelliJ MCP server plugin and open it with any maven project (it can be another type of project but the provided test query asks for pom file information)
- clone this example application
- Setup ANTHROPIC_API_KEY or/and OPENAI_API_KEY environment variables with your API keys
- Run TestMcpApplication
- In terminal run
To test IntelliJ MCP
curl "http://localhost:8080/chat?userInput=List%20project%20dependencies%20on%20pom%20file"
To test Vaadin MCP
curl "http://localhost:8080/chat?userInput=What%20do%20you%20know%20about%20Vaadin%20Dashbord%20component"
- In main branch using standard client everything works
- In reactive branch using webflux and Anthropic
-- Vaadin MCP still works (you will see updated information of Vaadin Dashboard new released component)
-- IntelliJ MCP does not work. It stops before calling the tool and no exception is thrown. (You will see that the agent tries to access the tool but it stops there. Something like
I'll help you list the project dependencies from the pom.xml file. Let me first check if there's a pom.xml file in your project.I found a pom.xml file in your project. Let me retrieve its content to show you the dependencies:
- In reactive-openai branch using webflux and OpenAI
-- Vaadin MCP and IntelliJ MCP do not work. It throws a bad request exception.
Weird thing is that if you only setup Vaadin MCP, for openAI case it works. It is only after setting up IntelliJ MCP when it fails. For Anthropic it still works. You can test modifying src/main/resources/mcp-servers-config.json
Expected behavior
The expected behavior is the same that you get with the standard client. In the case of this test this is some information of the pom file of the project.
Minimal Complete Reproducible example
Provided in the example application