Javalens MCP logo

Javalens MCP

by pzalutski-pixel

Compiler-accurate Java navigation, reference search, diagnostics, code metrics, and bug detection through Eclipse JDT.

Install Javalens MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "pzalutski-pixel-javalens-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "javalens-mcp"
      ],
      "env": {
        "JAVA_HOME": "YOUR_VALUE_HERE",
        "JAVA_PROJECT_PATH": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

pzalutski-pixel/javalens-mcp MCP server exposes semantic Java analysis through Eclipse JDT, covering navigation, references, hierarchy, diagnostics, and code-quality checks. It builds JDT indexes and resolves inheritance, overloads, generics, imports, classpaths, and Lombok-generated members instead of relying on text matching. Use it when an agent needs precise Java codebase analysis, such as finding affected tests, distinguishing field writes, or tracing callers.

Use cases

  • Find callers and references before changing a Java method
  • Trace implementations and inheritance relationships
  • Identify tests affected by a symbol change
  • Detect unused code and possible Java bugs
  • Validate syntax and inspect compilation diagnostics

Key features

  • Eclipse JDT semantic Java analysis
  • Compiler-accurate navigation and reference search
  • Call hierarchy and affected-test analysis
  • Fine-grained usage queries
  • Diagnostics and syntax validation
  • Dead-code and possible-bug detection

Tools75

What Javalens MCP lets your agent do. Expand a tool for its parameters.

Self-reported~1.2k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

16/19 checks healthy over the last 112d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 12d ago via OSV.dev · javalens-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars50Stargazers on the source repository.
npm downloads1kPackage downloads in the last 30 days.
Last commit1mo agoMost recent push to the default branch.
Tools exposed75Callable tools this server registers over MCP.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

How Javalens MCP works

What pzalutski-pixel/javalens-mcp MCP server does

pzalutski-pixel/javalens-mcp MCP server gives AI agents semantic access to Java projects through Eclipse JDT. Its analysis is based on resolved Java structure rather than matching strings in source files, so queries can distinguish overloaded methods, inherited members, type arguments, field reads, and field writes.

The server covers code navigation, symbol inspection, fine-grained reference searches, call relationships, diagnostics, and selected static-analysis checks. It can locate definitions and implementations, inspect types and methods at a source position, identify annotation or cast usage, find test methods, and report possible null risks, empty catch blocks, and resource leaks.

How it works

Eclipse JDT creates an indexed workspace for each MCP session. The workspace stores search indexes, compilation state, and metadata outside the source tree; the project is linked rather than copied. This keeps the Java project free of Eclipse-generated files and allows separate sessions to analyze the same source independently.

JDT resolves inheritance, method overloading and overriding, generic types, imports, and classpath dependencies. The implementation supports Java source versions from 1.1 through 25 while requiring Java 21 or later to run the server. A bundled Lombok agent helps JDT resolve generated members such as accessors from @Data.

Queries include both broad navigation and targeted reference categories. For example, an agent can search for all instantiations of a type, instanceof checks, throws declarations, catch blocks, method references, reflection calls, or writes to a field. Call-hierarchy tools report incoming callers and outgoing calls, while affected-test analysis identifies tests that exercise a symbol directly or transitively.

Setup and configuration

pzalutski-pixel/javalens-mcp MCP server requires Java 21 or newer on PATH or available through JAVA_HOME. Node.js 18 or newer is needed only for the npm and npx installation route. A release archive can be downloaded and run with Java directly, or npx -y javalens-mcp can download and cache the distribution.

The direct configuration starts the bundled JAR with Java and supplies a workspace location through the -data argument. The npm configuration uses npx and can set JAVA_PROJECT_PATH to load a project automatically at startup. Project loading occurs in the background, so clients may connect before indexing has finished. The workspace directory should be treated as server-managed metadata rather than a replacement for the project’s own build outputs.

Tools and capabilities

The available tools include:

  • Symbol search, definition lookup, document symbols, hover information, and type or method inspection.
  • Reference and structure queries for implementations, inheritance, annotations, casts, instantiations, instanceof, throws clauses, catches, method references, type arguments, and reflection.
  • Incoming and outgoing call hierarchy, field-write detection, test discovery, affected-test discovery, unused private-code detection, and unreachable-code analysis.
  • Compilation diagnostics and fast syntax validation.
  • Possible-bug detection for null risks, empty catches, and resource leaks.

Limitations and notes

pzalutski-pixel/javalens-mcp MCP server is an analysis server, not a compiler. It parses and understands Java source, but the material does not describe it as a replacement for the project’s build or test system. Results depend on the project being loaded and indexed, including the relevant source, dependencies, and classpath information.

The server uses a separate workspace and creates session-specific metadata. Concurrent sessions therefore do not share one analysis state. Automatic project loading is asynchronous, so an agent should wait until indexing has completed before relying on repository-wide results.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Javalens MCP

pzalutski-pixel/javalens-mcp is an MCP server that connects AI agents to Java projects through Eclipse JDT. Its main tools search symbols, navigate definitions, find references and implementations, inspect call hierarchies, report diagnostics, validate syntax, discover affected tests, and detect unused code or possible bugs.

Install it by downloading the release archive and running its JAR with Java 21 or later, or by using `npx -y javalens-mcp` with Node.js 18 or later. Configure the MCP client with the Java command and JAR path, or with the npm command.

It requires Java 21 or later to run. The server can analyze Java source from version 1.1 through 25, but the runtime requirement is separate from the source language version.

Set `JAVA_PROJECT_PATH` to the project directory to have it load automatically at startup. Loading runs in the background, and the server stores indexes and workspace metadata in the directory passed through the `-data` argument.

It describes standard MCP configuration using a Java or `npx` stdio command and explicitly shows Claude Code as an example client.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewJavalens MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/pzalutski-pixel-javalens-mcp?style=directory)](https://allmcps.com/mcp/pzalutski-pixel-javalens-mcp)
HTML Embed
<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>