jons-mcp-java

jonmmease/jons-mcp-java

3.2

If you are the rightful owner of jons-mcp-java and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

MCP server providing Java development capabilities through Eclipse JDT.LS.

Tools
8
Resources
0
Prompts
0

jons-mcp-java

MCP server providing Java development capabilities through Eclipse JDT.LS.

Requirements

  • Python 3.10+
  • Java 21+ (brew install openjdk@21)
  • Eclipse JDT.LS (brew install jdtls)

Installation

cd /path/to/jons-mcp-java
uv sync

Usage with Claude Code

Add the MCP server to Claude Code:

claude mcp add jons-mcp-java -- uv run --project /path/to/jons-mcp-java jons-mcp-java

Replace /path/to/jons-mcp-java with the actual path to this repository.

To set the workspace root (defaults to current directory):

claude mcp add jons-mcp-java -e JONS_MCP_JAVA_WORKSPACE=/path/to/workspace -- uv run --project /path/to/jons-mcp-java jons-mcp-java

If your project uses a specific Java version (e.g., via devbox), set JAVA_HOME:

claude mcp add jons-mcp-java \
  -e JAVA_HOME=/opt/homebrew/opt/openjdk@21/libexec/openjdk.jdk/Contents/Home \
  -e JONS_MCP_JAVA_WORKSPACE=/path/to/workspace \
  -- uv run --project /path/to/jons-mcp-java jons-mcp-java

Available Tools

ToolDescription
definitionGo to symbol definition
referencesFind all references to a symbol
implementationFind implementations of interfaces/abstract methods
type_definitionGo to type definition
document_symbolsList all symbols in a file
workspace_symbolsSearch for symbols across the workspace
diagnosticsGet errors and warnings
hoverGet Javadoc and type information

Environment Variables

VariableDefaultDescription
JONS_MCP_JAVA_WORKSPACECurrent directoryRoot workspace for Java projects
JDTLS_HOMEAuto-detectJDT.LS installation directory
JAVA_HOMEAuto-detectJava 21+ installation

Features

  • Multi-project support: Automatically discovers Gradle projects in mono-repos
  • Lazy initialization: JDT.LS instances start on-demand per project
  • LRU eviction: Manages memory by limiting active instances (default: 3)
  • Concurrent protection: Handles parallel requests safely