Unstable MCP implementation for reactive webflux client (IntelliJ MCP not working)

Open
#3,116 2 comments 0 reactions 2 assignees View on GitHub

@tzolov is already working on this.

Since May 12, 2025.

Assessment

This issue has not been assessed yet.

Description

bug mcp

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

Dominant language
Java
Stars
9.5k
Forks
2.9k
Avg merge
1d 10h
Merged PRs (30d)
5

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from spring-projects/spring-ai

All issues in spring-projects/spring-ai

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.