MCP Catalogs
Home

mcp-java-sdk-examples

by thought2code·32·Score 38

A collection of MCP server examples demonstrating different Java SDK implementations.

developer-toolsfile-systemother
8
Forks
1
Open issues
7 mo ago
Last commit
2d ago
Indexed

Overview

This repository provides practical examples of MCP servers implemented using various Java SDKs. It includes implementations using the Declarative MCP Java SDK, the Official MCP Java SDK, and Spring AI MCP SDK. The examples demonstrate how to expose resources, tools, and prompts through the Model Context Protocol in Java applications. The collection primarily focuses on filesystem operations as a representative example.

Try asking AI

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

you:Developers learning how to implement MCP servers using Java SDKs
you:Organizations standardizing LLM integrations with Java applications
you:Testing and prototyping file system operations through MCP
you:Which Java versions are supported?
you:How do I add my own MCP server example?

When to choose this

Choose this if you're working with Java applications and need practical examples of implementing MCP servers with different SDK approaches.

When NOT to choose this

Not ideal if you need documentation beyond examples or if you're working with non-Java environments.

Comparable tools

mcp-declarative-java-sdkofficial-java-sdkspring-ai-mcptypescript-mcp-sdkpython-mcp-sdk

Installation

Installation

This is a collection of examples, not a server itself. Each example has its own setup requirements. For the filesystem example:

  1. Clone the repository
  2. Navigate to the example directory: cd mcp-server-filesystem
  3. Build the project: mvn package
  4. Run the server: java -jar target/mcp-server-filesystem-*.jar

Claude Desktop Configuration

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "mcp-java-sdk-examples": {
      "command": "java",
      "args": ["-jar", "/path/to/mcp-server-filesystem/target/mcp-server-filesystem-*.jar"]
    }
  }
}

FAQ

Which Java versions are supported?
Java 17 or later, as required by the MCP Java SDK.
How do I add my own MCP server example?
The repository encourages contributions of additional examples using different Java SDKs.

Compare mcp-java-sdk-examples with

GitHub →

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