MCP Java Decompiler Server - a specialized server that allows AI agents to decompile and analyze Java bytecode.
I use this MCP when working with Claude Code to instruct it to decompile classes whose source code is not available, so it can analyze and use them in the context of the current task I’ve given it.
What is MCP Java Decompiler Server?
MCP Java Decompiler Server is a Node.js-based tool that provides AI agents with the ability to
decompile Java .class
files, extract classes from JAR files, and analyze Java bytecode
programmatically. It uses the JavaScript port of the CFR decompiler to convert compiled Java
bytecode back into readable source code.
Key Features
Multiple Decompilation Methods
The server supports three different ways to decompile Java code:
- File Path Decompilation: Directly decompile
.class
files from the filesystem. - Package Name Extraction: Extract and decompile classes by their fully qualified names.
- JAR File Analysis: Decompile specific classes from JAR archives.
Technical Capabilities
- Wide Java Support: Compatible with all Java versions.
- No Java Runtime Required: Runs purely on Node.js 16+ without needing a Java installation.
- MCP-Compatible API: Full integration with MCP-compatible AI tools.
Installation and Setup
The server offers multiple installation options suitable for different use cases:
Installing in AI Agents
Claude code:
claude mcp add javadc -s project -- npx -y @idachev/mcp-javadc
Standard MCP JSON configuration:
{
"javadc": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@idachev/mcp-javadc"],
"env": {}
}
}
Why This Matters
This tool bridges a significant gap between AI agents and Java development workflows. When working with compiled Java applications or third-party libraries, AI agents often encounter classes without available source code. The server extracts and decompiles these classes, returning readable source code that enables AI agents to understand and analyze the implementation.
Integration with AI Workflows
MCP Java Decompiler Server integrates seamlessly with MCP-compatible AI tools, allowing them to:
- Analyze JAR dependencies in Maven/Gradle projects.
- Understand compiled code structure.
- Provide insights into third-party library implementations.
Get Started
MCP Java Decompiler Server is available on GitHub under the ISC license. Whether you’re working with legacy Java code, analyzing dependencies, or building AI-powered development tools, this server provides the bridge you need between AI assistants and Java bytecode.
Try it out with your favorite MCP-compatible AI tool and see how it can enhance your Java development workflow!