This project provides a basic Model Context Protocol (MCP) server implemented in Java. It allows clients, such as Claude Desktop, to interact with a Java-based backend via the MCP specification.
What it does
It serves as a foundational MCP server, demonstrating how to build an MCP server in Java. It's designed to be integrated into an MCP client's configuration to provide custom context or functionality.
How to use
Build the project
To build the server, you need Maven installed. Navigate to the project directory and run:
mvn clean package
This will create an executable JAR file, typically in the target/ directory.
Configure an MCP client (e.g., Claude Desktop)
Once built, you can configure your MCP client to use this server. An example configuration for Claude Desktop is provided below. You will need to adjust the JAR file path to match your local setup.
{
"mcpServers": {
"java-mcp": {
"command": "java",
"args": [
"-jar",
"/path/to/your/java-mcp-server-1.0-SNAPSHOT-with-dependencies.jar"
]
}
}
}
Replace /path/to/your/java-mcp-server-1.0-SNAPSHOT-with-dependencies.jar with the actual path to the JAR file generated by the build process.
Recommend MCP Servers 💡
@janreges/ai-distiller-mcp
AI Distiller is ultra‑fast, open‑source tool for intelligently extracting only the essential public APIs, types, and structure from large codebases. Compresses 90–98% of code into AI‑friendly context, integrates via CLI or MCP, supports 12+ languages, and AI prompt workflows for cleaner, cost‑effective AI development.
aaomidi/mcp-bazel
An MCP server that exposes Bazel tools for build, test, and dependency analysis.
proxymock
An MCP server built into proxymock that enables Agent-based LLM tools to interact with proxymock for recording API/Database calls, generating tests, and creating service mocks.
everything
An MCP server designed to test all features of the MCP protocol, serving as a client testing utility.
git-mob-mcp-server
An MCP server that extends the git-mob CLI app, enabling automatic management and appending of co-authored-by trailers to git commit messages for pair and mob programming sessions.
git-committer-mcp-server
A Git changes analyzer that generates commit messages and commits all for free.