MCP support via spring ai
Hi,
@ddobrin is it possible currently to use springai for mcp client ? I did not find examples and documentations about the subject, it seems to me not possible. If you confirm, what do you think to add it as feature. For information, i can contribute. Thanks
Hi @mekkiamiri Can you please elaborate how you see it used? What would be your use cases?
While you can leverage MCP in ADK, you can use MCP in Spring AI:
- write a dynamic MCP Tool Provider that automatically discovers and exposes MCP tools. This provider uses Spring AI's @Tool annotation dynamically and you don't have to do it manually
- build a @Tool and have the full control over the MCP client, which I find many times useful in cases where you use sampling, etc
I'd like to understand your use case better. Feel free to DM me on social media if you like
@mekkiamiri - please provide an answer to the prev comment, to assess how we can collaborate
Would recommend of revisiting this with Spring AI 2.0.0 RC (GA in May 2026) as there have been signficant changes to MCP support in Spring AI 2.0.0-M*
Can you please look into this again as Spring AI 2.0.0 is now released? https://mvnrepository.com/artifact/org.springframework.ai/spring-ai-bom/2.0.0
ADK Java has been updated to use Spring AI 2.0.0, and validated with Java 21 and 25.
Here's the commit: https://github.com/ddobrin/adk-java/tree/spring-update
and here's the PR for it: https://github.com/google/adk-java/pull/1298
@ddobrin my idea is to use at max spring ai and keep adk as a bridge for spring ai. I created this pr: https://github.com/google/adk-java/pull/1300 I rebased my pr. for spring ai changes, the pr is not yet merged
Hi @mekkiamiri provided some feedback in the associated PR. Thank you