https://github.com/modelcontextprotocol/java-sdk
The official Java SDK for Model Context Protocol servers and clients. Maintained in collaboration with Spring AI
https://github.com/modelcontextprotocol/java-sdk
Last synced: 8 months ago
JSON representation
The official Java SDK for Model Context Protocol servers and clients. Maintained in collaboration with Spring AI
- Host: GitHub
- URL: https://github.com/modelcontextprotocol/java-sdk
- Owner: modelcontextprotocol
- License: mit
- Created: 2025-01-20T17:52:58.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-04-14T10:08:37.000Z (9 months ago)
- Last Synced: 2025-04-15T00:44:52.727Z (9 months ago)
- Language: Java
- Homepage: https://modelcontextprotocol.io/sdk/java/mcp-overview
- Size: 4.39 MB
- Stars: 1,012
- Watchers: 22
- Forks: 223
- Open Issues: 62
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-mcp-servers - MCP Server Java SDK - Official Java SDK for implementing custom MCP Servers, providing all necessary interfaces and annotations such as @Tool for registering server-side tools with MCP hosts. ([Read more](/details/mcp-server-java-sdk.md)) `java` `sdk` `mcp` `ai-integration` (Development Tools MCP Servers)
- awesome-dotnet-mcp - Java - Official Java SDK (SDKs / Offcial)
- fucking-awesome-java - MCP Java SDK - Enables applications to interact with AI models and tools through a standardized interface (i.e. Model Context Protocol), supporting both synchronous and asynchronous communication patterns. (Projects / Artificial Intelligence)
- awesome-java - MCP Java SDK
- AiTreasureBox - modelcontextprotocol/java-sdk - 11-03_2818_0](https://img.shields.io/github/stars/modelcontextprotocol/java-sdk.svg)|The official Java SDK for Model Context Protocol servers and clients. Maintained in collaboration with Spring AI| (Repos)
- awesome-java - MCP Java SDK - Enables applications to interact with AI models and tools through a standardized interface (i.e. Model Context Protocol), supporting both synchronous and asynchronous communication patterns. (Projects / Artificial Intelligence)
- awesome-mcp-servers - **Java MCP SDK**
- awesome-mcp - modelcontextprotocol/java-sdk - The MCP Java SDK is the official Java SDK enabling Java applications to interact with AI models and tools through the Model Context Protocol, supporting both synchronous and asynchronous communication and integrating with Spring AI for enhanced functionality. (MCP Frameworks and libraries / Java)
README
# MCP Java SDK
[](https://github.com/modelcontextprotocol/java-sdk/actions/workflows/publish-snapshot.yml)
A set of projects that provide Java SDK integration for the [Model Context Protocol](https://modelcontextprotocol.org/docs/concepts/architecture).
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](https://modelcontextprotocol.io/sdk/java/mcp-overview).
#### Spring AI MCP documentation
[Spring AI MCP](https://docs.spring.io/spring-ai/reference/api/mcp/mcp-overview.html) extends the MCP Java SDK with Spring Boot integration, providing both [client](https://docs.spring.io/spring-ai/reference/api/mcp/mcp-client-boot-starter-docs.html) and [server](https://docs.spring.io/spring-ai/reference/api/mcp/mcp-server-boot-starter-docs.html) starters. Bootstrap your AI applications with MCP support using [Spring Initializer](https://start.spring.io).
## Development
### Building from Source
```bash
./mvnw clean install -DskipTests
```
### Running Tests
To run the tests you have to pre-install `Docker` and `npx`.
```bash
./mvnw test
```
## Contributing
Contributions are welcome! Please:
1. Fork the repository
2. Create a feature branch
3. Submit a Pull Request
## Team
- Christian Tzolov
- Dariusz Jędrzejczyk
## Links
- [GitHub Repository](https://github.com/modelcontextprotocol/java-sdk)
- [Issue Tracker](https://github.com/modelcontextprotocol/java-sdk/issues)
- [CI/CD](https://github.com/modelcontextprotocol/java-sdk/actions)
## License
This project is licensed under the [MIT License](LICENSE).