Complete AI Training

MCP server · Developer tools

JavaLens MCP server

by pzalutski-pixel

Lets your AI read and understand Java code accurately, so it can find real usages, refactor safely, and spot problems.

Flow diagram: you ask your AI “Where is UserService.save used?”, on your own computer the JavaLens MCP server works with your Java project, and you get back list of file paths and line numbers.

JavaLens is a helper for your AI that understands Java code the way a compiler does, not just by searching text. It is handy if you work with Java projects and want your AI to answer questions about classes, methods, and changes without guessing. You do not need to be a Java expert to use it, but it helps if your project is written in Java.

What is an MCP server? The 30-second version

On its own, your AI can only chat and read files you paste or point it to. An MCP server is a small helper program that gives your AI a new skill or a connection to a tool. JavaLens is that helper for Java code: it plugs into your AI and lets it look up symbols, find references, and suggest safe changes in your Java project. When you ask a question, your AI calls JavaLens behind the scenes and gets back accurate answers.

What this MCP server does

You ask your AI something about your Java project, like where a method is used or what a class contains. Your AI sends that request to JavaLens. JavaLens uses Eclipse JDT, the same engine behind the Eclipse IDE, to read and understand your code precisely. It then sends back a clean list, a summary, or suggested edits. Your AI shows you the result in the chat, and you can decide what to do next.

Flow diagram: you ask your AI “Where is UserService.save used?”, on your own computer the JavaLens MCP server works with your Java project, and you get back list of file paths and line numbers. Click to zoom

What you can do with it

  • Find every real usage of a method or field, not just text matches
  • See the full inheritance chain of a class or interface
  • Find all places where a type is created, cast, or checked with instanceof
  • Detect unused private methods and unreachable code
  • Get complexity numbers and dependency graphs for your project
  • Suggest safe refactorings like renaming a symbol or extracting a method
  • List the tests that would be affected if you change a symbol

Try asking your AI

  • “Find all calls to UserService.save in this project”
  • “Show me the class hierarchy for OrderProcessor”
  • “Which tests would break if I rename this method?”
  • “List all classes that implement the PaymentGateway interface”

What it gives back to you

You get answers in the chat: lists of file paths and line numbers, short summaries of a class or method, complexity numbers, or suggested code edits. For refactorings, JavaLens gives you text edits you can review and apply yourself, not automatic changes. Everything is shown as plain text you can read and copy.

Before you start

What you need

  • Java 21 or later installed on your computer
  • Node.js 18 or newer only if you install via npm
  • The path to your Java project folder
  • An MCP client like Claude Code or another tool that supports MCP servers

Good to know

JavaLens suggests code changes as text edits, so you should always review them before applying, and it reads your project files, so make sure you are okay with that.

Install it with your AI

Add JavaLens MCP server to your AI, no technical skills needed

You don't install anything by hand. You copy one prompt, paste it into an AI that can work on your computer, and it checks, installs and connects the server for you, asking you when it needs something.

Sign in to get the install prompt

Members get a ready-made prompt that lets the Claude desktop app check JavaLens MCP server, install it and connect it for them, step by step. You don't need any technical skills: you copy, paste and answer a few questions. Your connected AI can also find and install any of the 4,066 MCP servers here for you.

Sign in Become a member

Who it's for

Java developers, code reviewers, and anyone who works with Java code and wants their AI to give accurate answers about it.