🔴 Required Information
Describe the Bug:
The google-adk-spring-ai library is binary-incompatible with Spring AI 2.0.0 (GA) and the MCP 1.x SDK. This is due to a classpath collision in the io.modelcontextprotocol.json.McpJsonMapper class. ADK calls a static method (.getDefault()) that existed in the legacy MCP 0.17.x SDK but has been removed in the 1.x line used by Spring AI 2.0.
Steps to Reproduce:
- Create a Spring Boot project and include the Spring AI 2.0.0 BOM and dependencies.
- Add the
com.google.adk:google-adk-spring-ai:1.2.0 dependency.
- Attempt to initialize an
McpToolset or any code path that triggers the DefaultMcpTransportBuilder.
- Observe the runtime crash during class loading/initialization.
Expected Behavior:
The ADK McpToolset should be compatible with the modern mcp-core:1.x architecture, allowing users to leverage the stable release of Spring AI 2.0 alongside Google ADK.
Observed Behavior:
The application fails with the following stack trace:
java.lang.NoSuchMethodError: 'io.modelcontextprotocol.json.McpJsonMapper io.modelcontextprotocol.json.McpJsonMapper.getDefault()'
at com.google.adk.tools.mcp.DefaultMcpTransportBuilder.<clinit>(DefaultMcpTransportBuilder.java:...)
Environment Details:
- ADK Library Version: 1.2.0
- OS: macOS / Linux
- TS Version: N/A (Java Environment)
Model Information:
- Which model is being used: N/A (This is a protocol/library level initialization error)
🟡 Optional Information
Regression:
No. This is an incompatibility introduced by the architectural shift between MCP 0.17.x (which ADK pins) and MCP 1.x (which Spring AI 2.0 pins).
Additional Context:
Both google-adk and spring-ai now share a dependency on the same Fully Qualified Class Name (FQCN): io.modelcontextprotocol.json.McpJsonMapper.
- ADK's
DefaultMcpTransportBuilder expects a static getDefault() method.
- Spring AI 2.0 pulls in
mcp-core:1.x, where this method was removed/renamed to createDefault().
Since Gradle/Maven resolves the conflict to version 1.x to satisfy Spring AI, the ADK code attempts to call a non-existent method on the 1.x class.
Minimal Reproduction Code:
In a standard Spring AI 2.0 project, simply attempting to use the default MCP transport via ADK will fail:
// This triggers the static initializer of DefaultMcpTransportBuilder
McpToolset toolset = McpToolset.builder()
.parameters(StreamableHttpServerParameters.builder()
.uri("https://mcp-server/mcp")
.build())
.build();
How often has this issue occurred?:
- Always (100%) when Spring AI 2.0 and Google ADK 1.2.0 are present on the same classpath.
🔴 Required Information
Describe the Bug:
The
google-adk-spring-ailibrary is binary-incompatible with Spring AI 2.0.0 (GA) and the MCP 1.x SDK. This is due to a classpath collision in theio.modelcontextprotocol.json.McpJsonMapperclass. ADK calls a static method (.getDefault()) that existed in the legacy MCP 0.17.x SDK but has been removed in the 1.x line used by Spring AI 2.0.Steps to Reproduce:
com.google.adk:google-adk-spring-ai:1.2.0dependency.McpToolsetor any code path that triggers theDefaultMcpTransportBuilder.Expected Behavior:
The ADK
McpToolsetshould be compatible with the modernmcp-core:1.xarchitecture, allowing users to leverage the stable release of Spring AI 2.0 alongside Google ADK.Observed Behavior:
The application fails with the following stack trace:
Environment Details:
Model Information:
🟡 Optional Information
Regression:
No. This is an incompatibility introduced by the architectural shift between MCP 0.17.x (which ADK pins) and MCP 1.x (which Spring AI 2.0 pins).
Additional Context:
Both
google-adkandspring-ainow share a dependency on the same Fully Qualified Class Name (FQCN):io.modelcontextprotocol.json.McpJsonMapper.DefaultMcpTransportBuilderexpects a staticgetDefault()method.mcp-core:1.x, where this method was removed/renamed tocreateDefault().Since Gradle/Maven resolves the conflict to version 1.x to satisfy Spring AI, the ADK code attempts to call a non-existent method on the 1.x class.
Minimal Reproduction Code:
In a standard Spring AI 2.0 project, simply attempting to use the default MCP transport via ADK will fail:
How often has this issue occurred?: