
jarp-mcp
โ 5from tersePrompts
Java Archive Reader Protocol MCP server - Give AI agents X-ray vision into compiled Java code by decompiling JAR/WAR/EAR files and Maven/Gradle dependencies
JARP-MCP
โก Get Started in 10 Seconds
Add this to your AI editor's MCP configuration:
{
"mcpServers": {
"jarp-mcp": {
"command": "npx",
"args": ["-y", "jarp-mcp"]
}
}
}That's it. No installation. No configuration. CFR decompiler bundled.
What this enables: Your AI agent (Claude, Cursor, Windsurf, Cline, etc.) can now:
- Decompile any Java class from your dependencies
- Analyze class structure, methods, and fields
- Read actual source code instead of guessing
Restart your AI editor and try: "Show me the source code for JpaRepository"
The Problem
AI agents like Claude, GPT-4, and Cursor cannot read compiled Java code. When working with Spring Boot, Maven, or any Java project:
"Show me how JpaRepository.saveAll() works" โ Agent hallucinates the method signature
"What parameters does this internal library function take?" โ Agent guesses wrong
"Why does this dependency throw this exception?" โ Agent cannot see the source
Developers spend 5-10 minutes per class manually decompiling with JD-GUI, copying source, and pasting into chat.
The Solution
JARP-MCP gives AI agents instant access to decompiled Java source code from your Maven & Gradle dependencies.
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ LLM Agent โ โโโโถ โ JARP-MCP โ โโโโถ โ Maven/Gradle โ
โ (Claude/ โ โ (MCP Server) โ โ + .m2 Repo โ
โ Cursor) โ โ โ โ โ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโ
โ CFR 0.152 โ
โ Decompiler โ
โโโโโโโโโโโโโโโโImpact
| Metric | Before | After |
|---|---|---|
| Time to inspect a class | 5-10 min | <2 seconds |
| Accuracy of AI responses | ~60% (guessing) | 100% (actual source) |
| Manual steps | 4+ | 0 |
MCP Tools
| Tool | What It Does |
|---|---|
scan_dependencies | Scans your Maven/Gradle project, builds class โ JAR index |
decompile_class | Returns full Java source code for any class |
analyze_class | Analyzes class structure, methods, fields, inheritance |
Example Usage
// In your AI assistant chat:
"Scan my Spring Boot project and decompile JpaRepository"The agent uses JARP-MCP to:
- Scan all dependencies in
pom.xml - Find the JAR containing
JpaRepository - Decompile it using CFR
- Return the actual source code
Result: Accurate answers based on real code, not guesses.
Tech Stack
JARP-MCP
โโโ Language: TypeScript 5.7
โโโ Runtime: Node.js 16+
โโโ Protocol: Model Context Protocol (MCP)
โโโ Decompiler: CFR 0.152 (bundled)
โโโ Build: tsc
โโโ Package: npm (zero-setup with npx)
โโโ License: Apache-2.0Key Implementation Details
- Zero external dependencies โ CFR decompiler bundled (2.2MB JAR)
- Smart path resolution โ Works with
npx,npm install -g, local dev - Maven & Gradle support โ Parses
pom.xmlandbuild.gradle - Intelligent caching โ First decompile ~2s, subsequent <100ms
- Auto-indexing โ Builds class index on-demand if missing
Performance
| Operation | First Run | Cached |
|---|---|---|
| Scan 100 JARs | ~30s | N/A |
| Decompile class | ~2s | <100ms |
| Analyze structure | ~2s | <100ms |
Real-world: Spring Boot project with 156 dependencies, 12,458 classes
- Initial scan: 45 seconds
- Each class: ~1.5s first time, instant thereafter
Links
- npm: https://www.npmjs.com/package/jarp-mcp
- GitHub: https://github.com/tersePrompts/jarp-mcp
- MCP Protocol: https://modelcontextprotocol.io
Works with any MCP client over STDIO โ Claude, Cursor, Windsurf, Cline, Postman, and more.
npx jarp-mcpInstallation
Zero-Setup (Recommended)
npx jarp-mcpNo installation required. Everything is bundled.
Global Install
npm install -g jarp-mcp
jarp-mcp startFrom Source
git clone https://github.com/tersePrompts/jarp-mcp.git
cd jarp-mcp
npm install
npm run buildMCP Configuration
Quick Setup โ Works with any MCP-compatible AI editor:
{
"mcpServers": {
"jarp-mcp": {
"command": "npx",
"args": ["-y", "jarp-mcp"]
}
}
}Platform-Specific Setup
Claude Code (CLI)
Create .claude/mcp-config.json in your Java project root:
{
"mcpServers": {
"jarp-mcp": {
"command": "npx",
"args": ["-y", "jarp-mcp"]
}
}
}Claude Desktop
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"jarp-mcp": {
"command": "npx",
"args": ["-y", "jarp-mcp"]
}
}
}Cursor IDE
Settings โ MCP Servers โ Add Server:
{
"mcpServers": {
"jarp-mcp": {
"command": "npx",
"args": ["-y", "jarp-mcp"]
}
}
}Or in .cursorrules:
{
"mcpServers": {
"jarp-mcp": {
"command": "npx",
"args": ["-y", "jarp-mcp"]
}
}
}Postman (with MCP Support)
- Open Postman โ Settings โ MCP Servers
- Add new server:
{
"name": "jarp-mcp",
"command": "npx",
"args": ["-y", "jarp-mcp"]
}Windsurf IDE
In .windsurfrules or project settings:
{
"mcpServers": {
"jarp-mcp": {
"command": "npx",
"args": ["-y", "jarp-mcp"]
}
}
}Cline (VSCode Extension)
In .clinerules or project settings:
{
"mcpServers": {
"jarp-mcp": {
"command": "npx",
"args": ["-y", "jarp-mcp"]
}
}
}No common issues documented yet. If you hit a problem, the repository's GitHub Issues page is the best place to look.
Licensed under Apache-2.0โ you can use, modify, and redistribute it under that license's terms.
View the full license file on GitHub โ