LSP4J-MCP
by stephanj·★ 23·Score 42
Java MCP server wrapping JDTLS to provide Java IDE features like symbol search and reference finding to AI assistants.
Overview
LSP4J-MCP is a Java-based MCP server that bridges the gap between AI assistants and Java development environments by wrapping Eclipse JDT Language Server using LSP4J. It exposes key IDE features like symbol search, reference finding, definition lookup, and document analysis through the MCP protocol, enabling AI assistants to understand and navigate Java codebases. The server architecture connects Claude Code to JDTLS via LSP4J, allowing for rich interaction with Java projects.
Try asking AI
After installing, here are 7 things you can ask your AI assistant:
When to choose this
Choose this when you need AI assistants to understand and work with Java codebases using familiar IDE-like functionality without requiring complex setup.
When NOT to choose this
Don't choose this if you're working with non-Java languages or need advanced refactoring features not covered by basic LSP operations.
Tools this server exposes
5 tools extracted from the READMEfind_symbolsSearch for Java symbols (classes, methods, fields) by name
find_referencesFind all references to a symbol at a given file location
find_definitionGo to the definition of a symbol
document_symbolsGet all symbols defined in a Java file
find_interfaces_with_methodFind all interfaces containing a method with a given name
Comparable tools
Installation
Installation
Prerequisites
- Java 21+
- Maven 3.8+
- JDTLS installed (e.g., via Homebrew:
brew install jdtls)
Build
mvn clean packageThis creates a shaded JAR at target/lsp4j-mcp-1.0.0-SNAPSHOT.jar.
Claude Desktop Configuration
Add to your .claude_desktop_config.json:
{
"mcpServers": {
"java-lsp": {
"command": "java",
"args": [
"-jar",
"/path/to/LSP4J-MCP/target/lsp4j-mcp-1.0.0-SNAPSHOT.jar",
"/path/to/your/java/project",
"jdtls"
],
"env": {
"LOG_FILE": "/tmp/lsp4j-mcp.log"
}
}
}
}FAQ
- What Java IDE features does this MCP server provide?
- The server provides symbol search, reference finding, definition lookup, document symbols, and interface method discovery - essentially key Java IDE navigation features.
- Can I use this with other AI assistants besides Claude?
- The README specifically mentions Claude, but since it implements the standard MCP protocol, it should work with any MCP-compatible AI assistant that supports tool calling.
- Does it work with non-Maven Java projects?
- The README doesn't explicitly specify, but since it connects to JDTLS which is IDE-agnostic, it should work with any standard Java project structure.
Compare LSP4J-MCP with
Last updated · Auto-generated from public README + GitHub signals.