About
A lightweight, annotation‑driven Java SDK that lets developers define MCP resources, prompts and tools in pure Java without Spring. It launches a full‑featured MCP server (STDIO, SSE or streamable HTTP) in one line of code.
Capabilities

The MCP Declarative Java SDK transforms the way developers expose Model Context Protocol (MCP) services from a Java application. Instead of wrestling with low‑level JSON schema definitions, native SDK APIs, or Spring bootstrapping, this tool lets you define MCP resources, prompts, and tools with simple Java annotations. The framework automatically scans your codebase, generates the necessary MCP descriptors, and launches a fully‑functional MCP server in a single line of code. This dramatically reduces boilerplate, speeds up prototyping, and keeps the focus on business logic rather than protocol plumbing.
What problem does it solve? Many teams struggle to integrate AI assistants into existing Java ecosystems because MCP servers typically require explicit configuration of endpoints, schemas, and serialization logic. The declarative SDK abstracts these concerns: a developer writes a method annotated with , , or , and the framework handles schema generation, endpoint registration, and runtime validation. This lowers the barrier to entry for developers who are comfortable with Java but not with the intricacies of MCP, enabling rapid iteration and deployment of AI‑enabled services.
Key features include:
- Zero Spring dependency – the server can run in any Java environment without pulling in heavy frameworks.
- Instant server launch – a single annotation and a call to start an MCP server in one line.
- Multi‑language support – built‑in i18n allows prompts, resources, and tools to be defined in multiple locales without extra code.
- Configurable via YAML – the same configuration format used by Spring AI is accepted, making migration and integration straightforward.
- Multiple transport modes – the SDK can serve via STDIO, HTTP Server‑Sent Events (SSE), or a streamable HTTP interface, giving flexibility to match the client’s needs.
Real‑world scenarios where this shines include:
- Data retrieval services – expose system metrics or database queries as MCP resources that an assistant can call.
- File and document processing – define prompts that read or transform files, enabling assistants to perform on‑the‑fly document analysis.
- Custom toolchains – bundle multiple tools (e.g., code generation, API calling) into a single MCP server that an assistant can orchestrate.
- Rapid prototyping – iterate on prompt wording or resource logic without redeploying a full Spring application.
Integration with AI workflows is seamless: once the server is running, any Claude or other MCP‑compatible assistant can discover its capabilities via the standard MCP discovery mechanism. The declarative SDK ensures that resources, prompts, and tools are correctly registered with minimal manual configuration, allowing assistants to invoke them as if they were native language features. This tight coupling between Java logic and AI interaction models empowers developers to build sophisticated, context‑aware applications with minimal overhead.
Related Servers
n8n
Self‑hosted, code‑first workflow automation platform
FastMCP
TypeScript framework for rapid MCP server development
Activepieces
Open-source AI automation platform for building and deploying extensible workflows
MaxKB
Enterprise‑grade AI agent platform with RAG and workflow orchestration.
Filestash
Web‑based file manager for any storage backend
MCP for Beginners
Learn Model Context Protocol with hands‑on examples
Weekly Views
Server Health
Information
Explore More Servers
MCP Server Nmap
Fast, automated network port scanning for debugging
Trivy MCP Server
Secure your codebase with AI-powered vulnerability scanning
SEO Tools MCP Server
Bridge LLMs to DataForSEO APIs via Model Context Protocol
Serper MCP Server
Google Search via Serper for LLMs
Freepik Flux AI MCP Server
Generate images from text using Freepik's Flux AI
Developer MCP Server
Unified editor, shell, and capture for developers