MCP Catalogs
HomeLSP4J-MCP screenshot

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.

developer-toolsai-llm
3
Forks
1
Open issues
4 mo ago
Last commit
2d ago
Indexed

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:

you:AI assistants analyzing Java code structure and finding classes or methods
you:Refactoring assistance by finding all references to specific code elements
you:Code navigation to definitions and implementations of interfaces or methods
you:Understanding large Java codebases by exploring relationships between symbols
you:What Java IDE features does this MCP server provide?
you:Can I use this with other AI assistants besides Claude?
you:Does it work with non-Maven Java projects?

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 README
  • find_symbols

    Search for Java symbols (classes, methods, fields) by name

  • find_references

    Find all references to a symbol at a given file location

  • find_definition

    Go to the definition of a symbol

  • document_symbols

    Get all symbols defined in a Java file

  • find_interfaces_with_method

    Find all interfaces containing a method with a given name

Comparable tools

jdtls-mcpjava-lsp-mcpide-mcp

Installation

Installation

Prerequisites

  • Java 21+
  • Maven 3.8+
  • JDTLS installed (e.g., via Homebrew: brew install jdtls)

Build

mvn clean package

This 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

GitHub →

Last updated · Auto-generated from public README + GitHub signals.