tersePrompts/jarp-mcp logo

tersePrompts/jarp-mcp

Free

Java Archive Reader Protocol - 为 AI 代理提供对 Maven 依赖中反编译 Java 代码的即时访问,如同为 AI 装上"X 光透视眼"。

FreeFree tier
Type
Open Source

About tersePrompts/jarp-mcp

JARP-MCP (Java Archive Reader Protocol) is an MCP server that gives AI agents X-ray vision into compiled Java code. It decompiles any class from Maven or Gradle dependencies in seconds, eliminating the need for manual decompilation and guesswork. The tool bundles the CFR 0.152 decompiler, supports zero-setup execution via npx, and integrates with AI editors like Claude, Cursor, Windsurf, and Cline. It provides three MCP tools: scan_dependencies (scans project dependencies and builds a class-to-JAR index), decompile_class (returns full Java source for any class), and analyze_class (analyzes class structure, methods, fields, inheritance). Designed to solve the problem of AI agents hallucinating method signatures and parameters for compiled Java code, JARP-MCP improves answer accuracy from ~60% to 100% and reduces inspection time from 5-10 minutes to 2 seconds.

Key Features

Decompiles any Java class from Maven/Gradle dependencies using bundled CFR 0.152 decompiler
Provides three MCP tools: scan_dependencies, decompile_class, and analyze_class
Zero-setup execution via npx (no installation or configuration required)
Intelligent caching: first decompile ~2 seconds, subsequent calls ~100ms
Smart path resolution for npx, npm install -g, and local development
Works with popular AI editors: Claude, Cursor, Windsurf, Cline
Supports both Maven (pom.xml) and Gradle (build.gradle) projects
Auto-indexing: builds class index on-demand if missing

Pros & Cons

Pros
  • Instant decompilation (2 seconds) eliminates manual JD-GUI workflow
  • 100% accurate source code vs ~60% guessing by AI agents
  • Zero setup – runs directly via npx with no configuration files
  • Works with multiple AI editor ecosystems (Claude, Cursor, Windsurf, Cline)
  • Completely free and open source under Apache-2.0 license
Cons
  • Only supports Java projects using Maven or Gradle build systems
  • Requires Node.js 16+ and network access to download the npx package on first run
  • Cannot decompile obfuscated or proprietary JARs that CFR cannot handle
  • Analysis limited to local dependency JARs; no support for remote repositories

Best For

AI agents inspecting compiled Java classes from dependencies without hallucinationDebugging internal library methods and exception sourcesAnalyzing class structure, inheritance, and method signatures in Spring Boot or any Maven/Gradle projectProviding accurate source code context for code generation and review

FAQ

How does JARP-MCP work?
JARP-MCP operates as an MCP server. The LLM agent sends a request (e.g., 'decompile JpaRepository'), the server scans the project's Maven/Gradle dependencies, finds the JAR, decompiles the requested class using bundled CFR 0.152, and returns the full Java source code.
What tools does JARP-MCP provide?
It provides three MCP tools: scan_dependencies (scans project and builds class-to-JAR index), decompile_class (returns full Java source for a class), and analyze_class (returns class structure including methods, fields, and inheritance).
How do I install JARP-MCP?
No installation is required. Add the MCP configuration to your AI editor using 'command': 'npx', 'args': ['-y', 'jarp-mcp']. The tool runs directly from npm. Alternatively, you can install globally with 'npm install -g jarp-mcp'.
Which AI editors are supported?
JARP-MCP works with any MCP-compatible AI editor, including Claude Desktop, Cursor, Windsurf, Cline, and others.