About java-sdk
The official Java SDK for integrating Java applications with the Model Context Protocol, maintained in collaboration with Spring AI. It supports both client and server development and synchronous or asynchronous communication.
Key features
- 01Java SDK for MCP integration
- 02Client and server development
- 03Synchronous communication
- 04Asynchronous communication
- 05Spring AI integration
Use cases
- 01Building Java MCP clients
- 02Implementing MCP servers in Java
- 03Adding MCP support to Spring AI applications
MCP support
The SDK provides Java integration for building MCP clients and servers. Spring AI extends it with Spring Boot client and server starters.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEMCP Java SDK
A set of projects that provide Java SDK integration for the Model Context Protocol. This SDK enables Java applications to interact with AI models and tools through a standardized interface, supporting both synchronous and asynchronous communication patterns.
📚 Reference Documentation
MCP Java SDK documentation
For comprehensive guides and SDK API documentation, visit the MCP Java SDK Reference Documentation.
Spring AI MCP documentation
Spring AI MCP extends the MCP Java SDK with Spring Boot integration, providing both client and server starters. Bootstrap your AI applications with MCP support using Spring Initializer.
Development
Building from Source
./mvnw clean install -DskipTests
Running Tests
To run the tests you have to pre-install Docker and npx.
./mvnw test
Contributing
Contributions are welcome! Please follow the Contributing Guidelines.
Team
- Christian Tzolov
- Dariusz Jędrzejczyk
Links
License
This project is licensed under the MIT License.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.