Boost Java Microservice Debugging with Easy Code Reader MCP Server

The article explains how Easy Code Reader MCP Server integrates with Joycode and large language models to automatically retrieve and analyze Java source code across multiple projects or JAR files, improving code‑agent accuracy and developer productivity.

JD Tech Talk
JD Tech Talk
JD Tech Talk
Boost Java Microservice Debugging with Easy Code Reader MCP Server

Overview

Easy Code Reader is an MCP (Model Context Protocol) server written in Python that enables AI code agents to retrieve Java source code across multiple projects or Maven JAR dependencies based on call‑chain analysis. It provides four core tools— list_all_project, list_project_files, read_project_code, and read_jar_source —to locate, list, and read source files or decompile JARs, allowing large language models such as Claude or ChatGPT to understand implementation details without manual code copying.

Key Use Cases

Cross‑project call analysis : Clone related micro‑service repositories locally, then use the tools to locate RPC implementations (e.g., submitOrderPaaS) and fetch their source for AI explanation.

Reading JAR sources : read_jar_source extracts code from Maven artifacts, preferring -sources.jar and falling back to decompilation (CFR for Java 8‑20, Fernflower for Java 21+).

Cross‑project code reuse : Retrieve modules from different services to understand shared logic and accelerate implementation.

Typical Prompt Example

You are a Java expert. I need the implementation of YbServiceSubmitOrderRpcImpl.submitOrderPaaS. Use Easy Code Reader MCP to locate the file and explain the logic.

Environment Requirements

uv (Python package manager)

Python 3.10+

JDK 8+

Installation & Integration

Run the server directly with

uvx easy-code-reader --maven-repo /path/to/repo --project-dir /path/to/projects

.

Or install locally: uv tool install easy-code-reader and configure the MCP client JSON with the same --maven-repo and --project-dir arguments.

Core MCP Tools

list_all_project

: Lists all project folders under the configured directory. Optional filters: project_name_pattern for fuzzy matching. list_project_files: Lists files in a specified project. Supports sub_path (focus mode) and file_name_pattern for fuzzy filename filtering. read_project_code: Retrieves full source of a given file or class. Accepts Java class names or relative paths; automatically searches common source locations. read_jar_source: Retrieves source from a Maven dependency. Parameters: group_id, artifact_id, version, class_name, optional prefer_sources. Uses -sources.jar when available; otherwise decompiles the JAR.

Recommended Workflow

Execute list_all_project to verify the target project exists.

Use list_project_files (optionally with file_name_pattern) to locate relevant source files.

Call read_project_code or read_jar_source to fetch the actual code for analysis.

Implementation Details

The server automatically scans typical source and resource directories, supports multi‑module Maven/Gradle projects, caches decompiled JARs, and handles SNAPSHOT versions by detecting timestamped JARs, updating the cache, and cleaning old entries.

References

GitHub repository: https://github.com/easy-code-reader

MCP programming guide (Model Context Protocol)

Related projects: https://github.com/maven-decoder-mcp, https://github.com/fernflower

JavaAI-assisted developmentMCPcode retrieval
JD Tech Talk
Written by

JD Tech Talk

Official JD Tech public account delivering best practices and technology innovation.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.