adk-java icon indicating copy to clipboard operation
adk-java copied to clipboard

MCP support via spring ai

Open mekkiamiri opened this issue 10 months ago • 6 comments

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

mekkiamiri avatar Jan 15 '26 09:01 mekkiamiri

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

ddobrin avatar Feb 01 '26 20:02 ddobrin

@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*

ddobrin avatar Mar 18 '26 17:03 ddobrin

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

akbarkanso avatar Jun 23 '26 17:06 akbarkanso

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 avatar Jun 23 '26 20:06 ddobrin

@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

mekkiamiri avatar Jun 24 '26 08:06 mekkiamiri

Hi @mekkiamiri provided some feedback in the associated PR. Thank you

ddobrin avatar Jun 24 '26 17:06 ddobrin