refactor: Restructure SDK into subpackages & implement versioned HTTP transport layers#71
Merged
stenalpjolly merged 3 commits intoJul 7, 2026
Conversation
…TP transport layers
Contributor
|
Would it be possible to show the old UX and the new UX around the breaking change? |
anubhav756
requested changes
Jul 4, 2026
anubhav756
left a comment
Contributor
There was a problem hiding this comment.
Fyi, there are a lot of changes post the 2026 MCP version that are currently being added across other SDKs. See base branch mcp-v202606 and branches stacked on top of it.
We should be supporting the latest server v1.6.0 and for that it’s recommended to add those changes as well.
Contributor
|
Can we also setup automated conformance tests going forward in the Java SDK like it’s setup for other languages? |
…t JsonRpc visibility
Contributor
Author
|
Hi @anubhav756, thank you for the thorough review. I have resolved the feedback points as follows:
All unit tests compile and pass successfully. Ready for another review! |
anubhav756
approved these changes
Jul 7, 2026
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.
Summary
Restructures the Java SDK package layout into domain-specific subpackages (
client,transport,auth,tool,exception) instead of a single flat root package, and refactors the HTTP transport layer to delegate version-specific initialization and requests to dedicated subclass routers.Expectation & Implementation
com.google.cloud.mcp(entrypoint classes)com.google.cloud.mcp.client(client implementation classes)com.google.cloud.mcp.transport(transport interfaces and HttpMcpTransport router)com.google.cloud.mcp.transport.vXXXX(version-specific transport subclasses: v20241105, v20250326, v20250618, v20251125)com.google.cloud.mcp.auth(credential handling and resolver classes)com.google.cloud.mcp.tool(tool definition and runner classes)com.google.cloud.mcp.exception(McpException)HttpMcpTransportto instantiate and delegate all calls to a version-specific subclass implementation depending on the selectedProtocolVersion.BaseMcpTransportto reduce duplication.example/anddemo-applications/cymbal-transit/to resolve the new SDK packages successfully.Test cases
mvn test -Dtest="*Test,!*E2ETest" -Dnet.bytebuddy.experimental=trueAcceptance criteria
Breaking changes
McpToolboxClientBuilder,ToolDefinition,CredentialsProviderwere moved fromcom.google.cloud.mcppackage to domain subpackages. Callers must update their import declarations.Migration Guide (v0.2.0 to v0.3.0)
Version
0.3.0restructures the SDK package layout into domain-specific subpackages. If you are upgrading from0.2.0, you must update your import statements as follows:import com.google.cloud.mcp.McpToolboxClientBuilder;import com.google.cloud.mcp.client.McpToolboxClientBuilder;import com.google.cloud.mcp.McpToolboxClient;import com.google.cloud.mcp.McpToolboxClient;(Unchanged)import com.google.cloud.mcp.Tool;import com.google.cloud.mcp.tool.Tool;import com.google.cloud.mcp.ToolDefinition;import com.google.cloud.mcp.tool.ToolDefinition;import com.google.cloud.mcp.CredentialsProvider;import com.google.cloud.mcp.auth.CredentialsProvider;import com.google.cloud.mcp.AuthTokenGetter;import com.google.cloud.mcp.auth.AuthTokenGetter;import com.google.cloud.mcp.GoogleCredentialsProvider;import com.google.cloud.mcp.auth.GoogleCredentialsProvider;import com.google.cloud.mcp.McpException;import com.google.cloud.mcp.exception.McpException;