Loading languages...
JA

java-mcp

@kenken64

No description provided.

java
mcp
server

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.

# mcpServer Config

{
  "mcpServers": {
    "java-mcp": {
      "command": "java",
      "args": [
        "-jar",
        "/home/kenneth/Projects/java-mcp-server/target/java-mcp-server-1.0-SNAPSHOT-with-dependencies.jar"
      ]
    }
  }
}

# stdio

java -jar /home/kenneth/Projects/java-mcp-server/target/java-mcp-server-1.0-SNAPSHOT-with-dependencies.jar
Transport:
stdio
Language:
Java
Created: 4/28/2025
Updated: 4/28/2025