MCPSERV.CLUB
idachev

Java Decompiler MCP Server

MCP Server

Decompile Java bytecode into readable source via MCP

Active(75)
11stars
1views
Updated 15 days ago

About

A Model Context Protocol server that decompiles Java .class files, packages, or JAR contents into human‑readable source code using a JavaScript port of CFR. It provides MCP‑compatible tools for AI assistants and developers to retrieve source from compiled artifacts.

Capabilities

Resources
Access data sources
Tools
Execute functions
Prompts
Pre-built templates
Sampling
AI model interactions

Overview

The MCP Java Decompiler Server provides a seamless bridge between AI assistants and the world of compiled Java bytecode. By exposing decompilation as an MCP‑compatible tool, it allows agents such as Claude to retrieve readable source code from files, JAR archives, or package names without leaving the conversational context. This solves a common pain point for developers: understanding and debugging third‑party binaries or legacy code when the original source is unavailable.

At its core, the server implements three straightforward decompilation tools.

  • decompile‑from‑path pulls a single file from the filesystem and returns its decompiled source.
  • decompile‑from‑package resolves a fully qualified class name against an optional classpath, enabling decompilation of standard library classes or any class within a known project layout.
  • decompile‑from‑jar extracts a specified class from an archive, which is especially useful for inspecting dependencies bundled in JARs. All tools rely on a JavaScript port of the popular CFR decompiler, ensuring compatibility with modern language features and a wide range of bytecode styles.

The server’s design prioritizes integration. It speaks JSON‑RPC over standard I/O, meaning any MCP client can launch it as a subprocess and communicate via the same protocol used for other tools. Temporary files are managed automatically, so developers don’t need to worry about cleanup or permission issues. Error handling is explicit: if a class cannot be parsed, the client receives a clear message rather than a cryptic stack trace.

Real‑world scenarios that benefit from this MCP server include:

  • Security analysis – quickly inspect obfuscated binaries to identify potential vulnerabilities.
  • Reverse engineering – understand how a library implements a feature when source is missing.
  • Code migration – verify that decompiled output matches expected behavior before rewriting modules in a new language.
  • Educational debugging – students can see how high‑level constructs are represented in bytecode.

By turning decompilation into a first‑class MCP tool, the server empowers AI workflows to ask questions like “What does this class do?” or “Show me the source for ” and receive accurate, readable code instantly. This tight coupling between AI assistants and low‑level tooling eliminates manual steps, reduces context switching, and accelerates the entire development lifecycle.