Skip to content

Welcome to mcp-declarative-java-sdk

mcp-declarative-java-sdk is an annotation-driven MCP (Model Context Protocol) Java SDK, which is based on the native MCP Java SDK from official team. It provides an easier way to define MCP resources, prompts, and tools using Java annotations if you don't want to use the heavyweight Spring AI Framework.

Why was it born?

MCP helps you build agents and complex workflows on top of LLMs. However, the official Java SDK is harder to use because its underlying implementation is more focused on the protocol's core layer. Creating your MCP server requires writing more repetitive low-level code unless you use the Spring AI Framework. But sometimes, we may simply need a lightweight development solution, that's why this project was born.

What it can bring?

🚫 No Spring Framework Required.

⚡ Instant MCP Java server in 1 LOC.

🎉 No need to write more SDK low-level code.

👏 Get rid of complex and lengthy JSON schema definitions.

🎯 Just focus on your core logic (resources/prompts/tools).

🔌 Configuration file compatible with the Spring AI Framework.

🌍 Built-in multi-languages support for MCP server (resources/prompts/tools).