Get ahead
VMware offers training and certification to turbo-charge your progress.
Learn moreThis blog post is co-authored with David Soria Parra, Christian Tzolov, and Dariusz Jędrzejczyk.
The Model Context Protocol (MCP), an open protocol developed by Anthropic, is transforming the way AI applications connect and share context. It has garnered extensive support across AI applications, functioning as a standardized interface for Large Language Models (LLMs) to interact with data sources, tools, and AI agents. Whether you're building autonomous systems that need to access databases, orchestrating complex AI workflows, or creating systems where multiple agents collaborate, MCP provides the foundational layer that makes these integrations seamless.
What sets MCP apart is its focus on composability and interoperability. Beyond just connecting to data sources, MCP enables developers to build rich, interactive AI systems where agents can share context, access tools, and work together through a consistent interface. This means you can quickly plug into a growing ecosystem of pre-built integrations while maintaining the flexibility to switch between different LLM providers, making it an ideal foundation for building sophisticated AI applications.
What began as an experimental project last November has turned into an exciting collaboration with the Spring AI team and Anthropic.
We're thrilled to announce that the experimental project has been moved into the official MCP Java SDK.
This SDK is the latest language binding of the protocol, alongside the Python, TypeScript, and Kotlin SDKs, on modelcontextprotocol.io. Java has long been the language of the enterprise, and the MCP Java SDK makes it easier for organizations to develop cutting-edge AI applications.
The MCP Java SDK provides a comprehensive foundation for integrating AI models with external tools and data sources. Key features of the SDK include:
Spring WebFlux-based SSE transport for reactive applications.
Spring WebMVC-based SSE transport for servlet-based applications.
Please check out the documentation for more information on getting started, and visit the GitHub repository to open issues and join discussions.
The Spring AI project extends the MCP Java SDK by adding developer productivity enhancements for integration with Spring Boot applications. With Spring Boot starters, developers can quickly configure MCP clients and servers using Spring’s dependency injection and configuration management, making it easier to integrate AI-driven workflows into their applications.
spring-ai-mcp-client-spring-boot-starter
– Core client starter supporting STDIO and HTTP-based SSE transport.spring-ai-mcp-client-webflux-spring-boot-starter
– WebFlux-based SSE transport implementation for reactive applications.spring-ai-mcp-server-spring-boot-starter
– Core server starter supporting STDIO transport.spring-ai-mcp-server-webmvc-spring-boot-starter
– Spring MVC-based SSE transport implementation for servlet-based applications.spring-ai-mcp-server-webflux-spring-boot-starter
– WebFlux-based SSE transport implementation for reactive applications.Here’s an example of how to declaratively configure an STDIO-transported client application. In application.yml
, define the following configuration:
spring:
ai:
mcp:
client:
stdio:
servers-configuration: classpath:mcp-servers.json
And the referenced JSON file defines the server to connect to in the Claude Desktop format.
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/Users/username/Desktop",
"/Users/username/Downloads"
]
}
}
}
When the client application starts, it will launch the MCP server, establish STDIO communication channels, and manage the server lifecycle.
Spring AI M6 also introduces the @Tool
annotation, which simplifies the creation of MCP servers. For more information, please read the Spring AI Reference documentation on MCP.
We look forward to feedback on GitHub and are very grateful for the support of the Anthropic team.