Mirror of https://github.com/modelcontextprotocol/java-sdk — The official Java SDK for Model Context Protocol servers and clients. Maintained in collaboration with Spring AI
- Java 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
- Add proper initialization state tracking using AtomicBoolean and Sinks - Implement timeout handling for requests requiring initialization - Ensure all client methods verify initialization state before proceeding - Fix rootsListChangedNotification to check initialization state - Improve error messages for uninitialized client operations - improve JavaDoc - Add tests to verify proper error handling for uninitialized clients - Replace hardcoded timeout constants with configurable getTimeoutDuration() method - Remove automatic initialization in setUp methods to allow explicit testing Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com> |
||
| .github | ||
| .mvn/wrapper | ||
| mcp | ||
| mcp-bom | ||
| mcp-spring | ||
| mcp-test | ||
| .gitattributes | ||
| .gitignore | ||
| LICENSE | ||
| mvnw | ||
| mvnw.cmd | ||
| pom.xml | ||
| README.md | ||
MCP 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:
- Fork the repository
- Create a feature branch
- Submit a Pull Request
Team
- Christian Tzolov
- Dariusz Jędrzejczyk
Links
License
This project is licensed under the MIT License.