MCP server providing Java development capabilities through Eclipse JDT.LS.
- Python 3.10+
- Java 21+ (
brew install openjdk@21) - Eclipse JDT.LS (
brew install jdtls)
cd /path/to/jons-mcp-java
uv syncAdd the MCP server to Claude Code:
claude mcp add jons-mcp-java -- uv run --project /path/to/jons-mcp-java jons-mcp-javaReplace /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-javaIf 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| Tool | Description |
|---|---|
definition |
Go to symbol definition |
references |
Find all references to a symbol |
implementation |
Find implementations of interfaces/abstract methods |
type_definition |
Go to type definition |
document_symbols |
List all symbols in a file |
workspace_symbols |
Search for symbols across the workspace |
diagnostics |
Get errors and warnings |
hover |
Get Javadoc and type information |
| Variable | Default | Description |
|---|---|---|
JONS_MCP_JAVA_WORKSPACE |
Current directory | Root workspace for Java projects |
JDTLS_HOME |
Auto-detect | JDT.LS installation directory |
JAVA_HOME |
Auto-detect | Java 21+ installation |
- 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