Java MCP server for compiler-accurate semantic analysis, navigation, refactoring, and metrics using Eclipse JDT.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Javalens MCP.
search_symbolsSearch types, methods, fields by glob pattern
go_to_definitionNavigate to symbol definition
find_referencesFind all usages of a symbol
find_implementationsFind interface/class implementations
get_type_hierarchyGet inheritance chain
get_document_symbolsGet all symbols in a file
An MCP server providing 75 semantic analysis tools for Java, built directly on Eclipse JDT for compiler-accurate code understanding.
JavaLens exists because AI systems need compiler-accurate insights that reading source files cannot provide. When an AI uses grep or Read to find usages of a method, it cannot distinguish:
This leads to incorrect refactorings, missed usages, and incomplete understanding of code behavior.
JavaLens provides compiler-accurate code analysis through Eclipse JDTβthe same engine that powers Eclipse IDE. Unlike text search, JDT understands:
@Data accessors and the like resolve, so code using them is not flagged as undefinedExample: Finding all places where UserService.save() is called:
| Approach | Result |
|---|---|
grep "save(" | Returns 47 matches including orderService.save(), saveButton, comments |
find_references | Returns exactly 12 calls to UserService.save() |
β οΈ Important for AI developers and users
AI models may exhibit trained bias toward native tools (Grep, Read, LSP) over MCP server tools, even when semantic analysis provides better results. This happens because:
To get the best results:
Add guidance to your project instructions or system prompt (e.g., CLAUDE.md for Claude Code):
JavaLens is an MCP server that gives AI assistants deep understanding of Java codebases. It provides semantic analysis, navigation, refactoring, and code intelligence tools that go beyond simple text search.
Language Server Protocol was designed for IDE autocomplete and basic navigationβnot for AI agent workflows that require deep semantic analysis.
| Capability | Native LSP | JavaLens |
|---|---|---|
Find all @Annotation usages | β | β |
Find all new Type() instantiations | β | β |
| Find all casts to a type | β | β |
| Distinguish field reads from writes | β | β |
| Detect circular package dependencies | β | β |
| Calculate cyclomatic complexity | β | β |
| Find unused private methods | β | β |
| Detect possible null pointer bugs | β | β |
| Project-wide dead-code reachability from entry points | β | β |
| Find the tests that exercise a symbol, transitively | β | β |
JavaLens wraps Eclipse JDT Core directly via OSGi, providing:
JAVA_HOME) β required for both install paths.npx install path below. Skip if you use the direct-download path.JavaLens is an analytical server, not a compiler. It uses Eclipse JDT 2025-12 to parse and understand Java source code from version 1.1 through 25. Java 21 is required only as the server runtime.
This is the simplest path if you already have Java 21 and don't have Node.js. Download from Releases:
| Platform | File |
|---|---|
| All platforms | javalens.zip or javalens.tar.gz |
Extract to a location of your choice (e.g., /opt/javalens or C:\javalens). Then point your MCP client at the bundled jar β see Configure MCP Client below.
If you already have Node.js, npx will download and cache the JavaLens distribution (~23 MB) on first run:
Add to your MCP configuration (e.g., .mcp.json for Claude Code):
The -data argument specifies where JavaLens stores its workspace metadata. See How Workspaces Work below.
Set JAVA_PROJECT_PATH to auto-load a project when the server starts:
Note: Project loading happens asynchronously in the background. The MCP server responds immediately while the project loads. Use
health_checkto monitor loading statusβit will show"project.status": "loading"until complete, then"loaded"when ready.
Unlike in-memory code models, Eclipse JDT requires a workspace directory to store:
JavaLens creates its workspace outside your source project to keep your codebase clean:
Why this matters:
.project or .classpath files{base}/{uuid}/load_project creates linked folders pointing to your source| Tool | Description |
|---|---|
search_symbols | Search types, methods, fields by glob pattern |
go_to_definition | Navigate to symbol definition |
find_references | Find all usages of a symbol |
find_implementations | Find interface/class implementations |
get_type_hierarchy | Get inheritance chain |
get_document_symbols | Get all symbols in a file |
get_symbol_info | Get detailed symbol information at position |
get_type_at_position | Get type details at cursor |
get_method_at_position | Get method details at cursor |
get_field_at_position | Get field details at cursor |
These use JDT's unique reference type constantsβnot available through LSP:
| Tool | Description |
|---|---|
find_annotation_usages | Find all @Annotation usages |
find_type_instantiations | Find all new Type() calls |
find_casts | Find all (Type) expr casts |
find_instanceof_checks | Find all x instanceof Type |
find_throws_declarations | Find all throws Exception in signatures |
find_catch_blocks | Find all catch(Exception e) blocks |
find_method_references | Find all Type::method expressions |
find_type_arguments | Find all List<Type> usages |
find_reflection_usage | Find Class.forName(), Method.invoke(), and other reflection calls |
Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/pzalutski-pixel-javalens-mcp)<a href="https://allmcps.com/mcp/pzalutski-pixel-javalens-mcp"><img src="https://allmcps.com/api/badge/pzalutski-pixel-javalens-mcp?style=directory" alt="Javalens MCP on AllMCPs" /></a>