JavaLens MCP server
75 semantic Java analysis tools via Eclipse JDT: navigation, refactoring, code intelligence.
not scanned yet
39 stars
Reviews
Write oneNobody has reviewed JavaLens yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
JavaLens tools
No tool declarations could be read from the package source. They show once the server is installed.
How JavaLens compares
Against every graded MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 82/100
- higher than 63% of 48,273 servers
- GitHub stars
- 39
- more than 93% of 28,534 servers
Release history: 2 versions in the registry since 2026-06-16, latest 2026-10-18, typically one every 125 days.
Install JavaLens in Claude Code, Cursor or VS Code
Runs npx -y javalens-mcp on your machine. Read the scan report first; the gateway never runs local packages.
claude mcp add javalens -- npx -y javalens-mcp
What the publisher says
From the JavaLens repository's README, as published. We do not edit it. Read it on GitHub
JavaLens: AI-First Code Analysis for Java
An MCP server providing 75 semantic analysis tools for Java, built directly on Eclipse JDT for compiler-accurate code understanding.
Built for AI Agents
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:
- A method call from a method with the same name in an unrelated class
- A field read from a field write
- An interface implementation from an unrelated class
- A cast to a type from other references to that type
This leads to incorrect refactorings, missed usages, and incomplete understanding of code behavior.
Compiler-Accurate Analysis
JavaLens provides compiler-accurate code analysis through Eclipse JDT—the same engine that powers Eclipse IDE. Unlike text search, JDT understands:
- Type resolution across inheritance hierarchies
- Method overloading and overriding
- Generic type arguments
- Import resolution and classpath dependencies
- Java source from version 1.1 through Java 25 (markdown Javadoc, module imports, compact source files, flexible constructor bodies)
- Lombok-generated members — a bundled agent makes @Data accessors and the like resolve, so code using them is not flagged as undefined
Example: Finding all places where UserService.save() is called:
AI Training Bias Warning
⚠️ 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:
- Training data contains extensive grep/text-search patterns
- Native tools are "always available" in the model's experience
- The model may not recognize when semantic analysis is superior
To get the best results:
Add guidance to your project instructions or system prompt (e.g., CLAUDE.md for Claude Code):
## Code Analysis Preferences
For Java code analysis, prefer JavaLens MCP tools over text search:
- Use `find_references` instead of grep for finding usages
- Use `find_implementations` instead of text search for implementations
- Use `analyze_type` to understand a class before modifying it
- Use refactoring tools (rename_symbol, extract_method) for safe changes
Semantic analysis from JDT is more accurate than text-based search,
especially for overloaded methods, inheritance, and generic types.What is JavaLens?
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.
Why Not LSP?
Language Server Protocol was designed for IDE autocomplete and basic navigation—not for AI agent workflows that require deep semantic analysis.
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
JavaLens: common questions
- Is JavaLens MCP server safe?
- Mostly: it is graded B (82/100). Read the JavaLens safety report
- How do I install JavaLens?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does JavaLens need an API key?
- No secret keys are declared. It reads 3 settings from the environment.
- Is JavaLens maintained?
- The last commit was 139 days ago (2026-06-16). The latest release is v1.5.3.
- What can I use instead of JavaLens?
- Servers from other publishers that do the same job: Sem MCP server.
- How does JavaLens compare with other MCP servers?
- safety score 82/100 (higher than 63% of 48,273 servers); github stars 39 (more than 93% of 28,534 servers). Full comparison.
Alternatives to JavaLens
Same job from other publishers: the closest match first, then the best rated.
- SemEntity-level code intelligence: semantic diff, impact analysis, blame, and context for AI agentsnot reviewedWidely usedB