Google Cloud Blog
Follow
Announcing MCP Toolbox Java SDK v1.0: Agentic data access for the enterprise
Google proudly announces the release of MCP Toolbox Java SDK version 1.0, enhancing agent orchestration for enterprise Java. This SDK provides type-safe agent management, crucial for mission-critical AI deployments due to Java's concurrency and state management capabilities. The Model Context Protocol (MCP) acts as a universal interface, simplifying integration by decoupling AI models from data sources. This eliminates the need for numerous custom connections, reducing security risks and maintenance overhead.Key improvements in Java SDK v1.0 include transport layer abstraction for flexible network implementations and decoupled client authentication for enhanced security compliance. Native support for default parameters reduces payload sizes, while pruning bound parameters prevents sensitive data exposure to LLMs. Standardized version selection and robust session tracking ensure protocol consistency. Developers can easily attach custom headers to outgoing requests for added metadata.A real-world example demonstrates an autonomous transit concierge application using AlloyDB and Spring Boot. This agent answers complex travel queries by integrating unstructured pet policies with structured schedules and booking functionalities. The MCP Toolbox maps natural language intents to secure SQL queries via a tools.yaml configuration.Stateful agent architecture is achieved using Spring Boot and LangChain4j, managing conversational memory within HTTP sessions. This architecture allows for clean separation of concerns, with a declarative agent interface and a tool execution service. The SDK simplifies session management, defines agent personas, and enables type-safe tool execution.Authentication is secured by default using Application Default Credentials (ADC), eliminating hard-coded keys. Runtime warnings alert developers to potential credential exposure over plaintext HTTP. The decoupled nature of MCP Toolbox and the Spring Boot agent allows independent scaling on Google Cloud Run. Developers can easily add the SDK dependency to their Maven or Gradle projects. Resources like the GitHub repository and demo application are available for getting started.