fix: upgrade MCP SDK to 2.0.0 and update schema handling - #1455
Open
hemasekhar-p wants to merge 1 commit into
Open
fix: upgrade MCP SDK to 2.0.0 and update schema handling#1455hemasekhar-p wants to merge 1 commit into
hemasekhar-p wants to merge 1 commit into
Conversation
hemasekhar-p
force-pushed
the
issue1453-fix
branch
from
August 25, 2026 10:47
ca8faf1 to
019cbff
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please ensure you have read the contribution guide before creating a pull request.
Link to Issue or Description of Change
1. Link to an existing issue (if applicable):
Problem:
When using
google-adkalongsidespring-ai2.0.x, invoking MCP tool declarations (AbstractMcpTool.declaration()) fails with a runtimejava.lang.NoSuchMethodError. This is caused by a version incompatibility: google-adk pinned io.modelcontextprotocol.sdk:mcp to 1.1.2 where Tool.inputSchema() returned a McpSchema.JsonSchema record. In MCP Java SDK 2.0.0 (used by Spring AI 2.0.x), Tool.inputSchema() returns Map<String, Object>. Additionally, MCP SDK 2.0 removes the deprecated customizeRequest(...) method on SSE transport builders and strictly enforces non-null inputSchema on Tool instances.Solution:
Testing Plan
Please describe the tests that you ran to verify your changes. This is required
for all PRs that are not small documentation or typo fixes.
Unit Tests:
I have added or updated unit tests for my change.
All unit tests pass locally.
ConversionUtilsTest: Verified conversions for ADK tools with parameters, no parameters, and no declarations without throwing IllegalArgumentException.
AbstractMcpToolTest: Verified tool declarations and JSON schema mappings using MCP SDK 2.0.0 Map<String, Object> schemas.
DefaultMcpTransportBuilderTest: Verified Stdio, SSE (with custom headers via requestBuilder), and Streamable HTTP transport builders.
Checklist