MCP Catalogs
Home

mcp-annotated-java-sdk

by thought2code·29·Score 44

Annotation-driven MCP Java SDK for simplified MCP server development with zero boilerplate.

developer-toolsai-llmother
11
Forks
3
Open issues
this month
Last commit
2d ago
Indexed

Overview

This is a lightweight annotation-based framework for MCP server development in Java. It allows developers to define, develop, and integrate MCP Resources, Prompts, and Tools with minimal code without requiring the Spring Framework. The SDK reduces development time from 50-100 lines to just 5-10 lines of code by eliminating the need for manual JSON schema definitions and complex setup. It supports multiple server modes (STDIO, SSE, STREAMABLE), offers multilingual support, and maintains full type safety through Java's type system.

Try asking AI

After installing, here are 5 things you can ask your AI assistant:

you:Developing MCP servers for Java-based AI applications with minimal setup
you:Creating type-safe MCP tools, resources, and prompts without JSON schemas
you:Building multilingual MCP servers with built-in i18n support
you:Do I need Spring Framework?
you:What MCP components are supported?

When to choose this

Java developers who want to build MCP servers with minimal boilerplate code without using Spring Framework.

When NOT to choose this

Projects requiring complex authentication mechanisms or those needing to integrate with existing Spring-based architectures.

Tools this server exposes

1 tool extracted from the README
  • addpublic int add(int a, int b)

    Calculate the sum of two numbers

Note: The README provides a clear example of an MCP tool definition with annotations. The 'add' tool is explicitly documented with its implementation, signature, and parameters.

Comparable tools

java-sdkspring-ai-mcp

Installation

Installation

Maven

<dependency>
    <groupId>io.github.thought2code</groupId>
    <artifactId>mcp-annotated-java-sdk</artifactId>
    <version>0.14.0</version>
</dependency>

Gradle

implementation 'io.github.thought2code:mcp-annotated-java-sdk:0.14.0'

Configuration

Create mcp-server.yml in your classpath:

enabled: true
mode: STREAMABLE
name: my-mcp-server
version: 1.0.0
type: SYNC
instructions: You are a helpful AI assistant
request-timeout: 20000
capabilities:
  resource: true
  prompt: true
  tool: true
change-notification:
  resource: true
  prompt: true
  tool: true

Claude Desktop Configuration

To use this MCP server with Claude Desktop, add to your claude_desktop_config.json:

{
  "mcpServers": {
    "my-java-mcp": {
      "command": "java",
      "args": ["-jar", "path/to/your/mcp-server.jar"]
    }
  }
}

FAQ

Do I need Spring Framework?
No! This SDK is completely independent of Spring Framework. However, the configuration file format is compatible with Spring AI if you want.
What MCP components are supported?
This SDK supports MCP Resources (expose data to LLM), Tools (execute actions), and Prompts (reusable templates). All can be defined using annotations.

Compare mcp-annotated-java-sdk with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.