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
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Christian Tzolov 4eff00c8da
feat(mcp): relax MCP Schema JSON deserialization constraints (#37)
* feat(mcp):  relax MCP Schema JSON deserialization constraints

- Add @JsonIgnoreProperties(ignoreUnknown = true) annotation to all record
classes in McpSchema to make JSON deserialization more robust by ignoring
unknown properties.
- Make the JsonSchema record public

Resolves #36

This improves compatibility with third-party implementations like Cursor that are not MCP Schema compliant.

Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
2025-03-10 12:36:54 +01:00
.github Update pom and GH actions 2025-02-14 12:40:27 +01:00
.mvn/wrapper initial 2024-12-06 16:41:17 +01:00
mcp feat(mcp): relax MCP Schema JSON deserialization constraints (#37) 2025-03-10 12:36:54 +01:00
mcp-bom Next development version 0.8.0-SNAPSHOT 2025-02-14 13:39:20 +01:00
mcp-spring Fix some typos 2025-02-25 12:33:25 +01:00
mcp-test refactor(client): improve validation and remove server methods (#14) 2025-02-27 10:00:04 +01:00
.gitattributes initial 2024-12-06 16:41:17 +01:00
.gitignore Rename modules, update .gitignore 2024-12-10 18:46:49 -05:00
LICENSE Update license text and GH actions 2025-01-28 14:36:31 +01:00
mvnw initial 2024-12-06 16:41:17 +01:00
mvnw.cmd initial 2024-12-06 16:41:17 +01:00
pom.xml refactor(mcp): remove redundant type field from Content implementations (#27) 2025-03-03 13:57:41 +01:00
README.md Update README with Maven wrapper commands and test prerequisites (#23) 2025-02-27 10:13:25 +01:00

MCP Java SDK

Build Status

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:

  1. Fork the repository
  2. Create a feature branch
  3. Submit a Pull Request

Team

  • Christian Tzolov
  • Dariusz Jędrzejczyk

License

This project is licensed under the MIT License.