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 💡
mcp-security-audit
A powerful MCP (Model Context Protocol) Server that audits npm package dependencies for security vulnerabilities. Built with remote npm registry integration for real-time security checks.
sonarqube
A Model Context Protocol (MCP) server that integrates with SonarQube Server or Cloud to provide code quality and security analysis, including direct analysis of code snippets.
mcgravity
Fast TUI that orchestrates AI coding tools (Claude Code, Codex, Gemini) in a plan→execute→review loop. Breaks work into atomic tasks for easier verification and course-correction.
mckinsey/vizro
A MCP server that helps create Vizro dashboards and charts with LLMs.
alertmcp
Provides desktop notification functionality for AI client tools like Claude and Cursor.
fastapi-mcp
Expose your FastAPI endpoints as Model Context Protocol (MCP) tools, with authentication.