Java Decompiler MCP Server

Decompile Java bytecode to readable source code in your AI-driven workflows with the Java Decompiler MCP Server, compatible with FlowHunt and other MCP clients.

Java Decompiler MCP Server

What does “Java Decompiler” MCP Server do?

The Java Decompiler MCP Server (mcp-javadc) is a Model Context Protocol (MCP) server designed to decompile Java class files. It enables AI assistants and MCP-compatible development tools to convert Java bytecode (.class files or classes within JARs) into human-readable Java source code. This server streamlines workflows by allowing automated decompilation via API, supporting tasks such as examining third-party libraries, reverse-engineering legacy code, or analyzing compiled Java packages without requiring the original source code. It offers integration through stdio transport and temporary file management, and is compatible with various MCP clients, making it a versatile tool for developers and AI agents working with Java bytecode.

List of Prompts

No prompt templates were mentioned in the README or repository files.

List of Resources

No explicit MCP resources are mentioned in the documentation or files.

List of Tools

  • decompile-from-path
    Decompiles a Java .class file from a specified file path.
    Parameter: classFilePath (absolute path to the .class file)

  • decompile-from-package
    Decompiles a Java class using its package name (e.g., java.util.ArrayList).
    Parameter: (not detailed in README)

  • decompile-from-jar
    Decompiles a Java class from within a JAR file.
    Parameter: (not detailed in README)

Use Cases of this MCP Server

  • Decompiling Standalone Class Files
    Quickly convert compiled .class files to readable Java source code for debugging, auditing, or learning purposes.

  • Reverse Engineering Third-party Libraries
    Analyze classes within JAR files or by package name to understand behavior and structure when source code is unavailable.

  • Integration with AI Development Tools
    Allow AI agents or assistants to automatically decompile Java code as part of broader code analysis or migration workflows.

  • Automated Codebase Exploration
    Use as a backend for tools that require on-demand decompilation to assist in navigating and understanding large codebases.

How to set it up

Windsurf

  1. Ensure Node.js 16+ and npm are installed.
  2. Add @idachev/mcp-javadc@latest as an MCP server in your Windsurf config.
  3. Edit your configuration file to include the server:
    {
      "mcpServers": {
        "javaDecompiler": {
          "command": "npx",
          "args": ["-y", "@idachev/mcp-javadc"]
        }
      }
    }
    
  4. Save changes and restart Windsurf.
  5. Verify the setup by running a sample decompilation.

Securing API Keys:
If you need to set environment variables (e.g., CLASSPATH):

{
  "mcpServers": {
    "javaDecompiler": {
      "command": "npx",
      "args": ["-y", "@idachev/mcp-javadc"],
      "env": {
        "CLASSPATH": "/path/to/java/classes"
      }
    }
  }
}

Claude

  1. Install Node.js 16+ and npm.
  2. Use the Claude CLI to add the server:
    claude mcp add javadc -s project -- npx -y @idachev/mcp-javadc
    
  3. Update your MCP client configuration as needed.
  4. Save changes and restart Claude.
  5. Test by invoking a decompilation request.

Cursor

  1. Ensure Node.js 16+ and npm are installed.
  2. Add the following to your Cursor MCP server configuration:
    {
      "mcpServers": {
        "javaDecompiler": {
          "command": "npx",
          "args": ["-y", "@idachev/mcp-javadc"]
        }
      }
    }
    
  3. Save the configuration and restart Cursor.
  4. Run a test decompilation.

Cline

  1. Prerequisites: Node.js 16+ and npm.
  2. Edit your Cline MCP server configuration:
    {
      "mcpServers": {
        "javaDecompiler": {
          "command": "npx",
          "args": ["-y", "@idachev/mcp-javadc"]
        }
      }
    }
    
  3. Save and restart Cline.
  4. Run a decompilation to verify setup.

Note:
Always set sensitive values (like CLASSPATH or API keys) using the env field in your configuration for security.
Example:

{
  "mcpServers": {
    "javaDecompiler": {
      "command": "npx",
      "args": ["-y", "@idachev/mcp-javadc"],
      "env": {
        "CLASSPATH": "/path/to/java/classes"
      }
    }
  }
}

How to use this MCP inside flows

Using MCP in FlowHunt

To integrate MCP servers into your FlowHunt workflow, start by adding the MCP component to your flow and connecting it to your AI agent:

FlowHunt MCP flow

Click on the MCP component to open the configuration panel. In the system MCP configuration section, insert your MCP server details using this JSON format:

{
  "javaDecompiler": {
    "transport": "streamable_http",
    "url": "https://yourmcpserver.example/pathtothemcp/url"
  }
}

Once configured, the AI agent is now able to use this MCP as a tool with access to all its functions and capabilities. Remember to change "javaDecompiler" to whatever the actual name of your MCP server is and replace the URL with your own MCP server URL.


Overview

SectionAvailabilityDetails/Notes
OverviewJava decompiler server for MCP
List of PromptsNo prompt templates found
List of ResourcesNo explicit MCP resources listed
List of Toolsdecompile-from-path, decompile-from-package, decompile-from-jar
Securing API KeysVia env in configuration
Roots SupportNot mentioned
Sampling Support (less important in evaluation)Not mentioned

Based on the tables, this MCP server is focused and functional for Java decompilation, but lacks advanced MCP features such as prompt templates, resources, roots, or sampling. It provides a clear, practical toolset and secure configuration, but does not cover broader MCP extensibility or integration primitives.

Our opinion

MCP-javadc is well-documented and serves a specific, valuable purpose. However, its utility is limited by the absence of standardized prompts, resources, and advanced MCP features like roots and sampling. For developers needing Java decompilation in an MCP workflow, it is practical and effective, but it does not showcase MCP’s full potential. Score: 5/10

MCP Score

Has a LICENSE✅ (ISC)
Has at least one tool
Number of Forks0
Number of Stars2

Frequently asked questions

What does the Java Decompiler MCP Server do?

It decompiles Java class files and classes within JARs into human-readable Java source code, enabling code analysis, learning, and reverse engineering—especially when the original source is unavailable.

How do I secure environment variables like CLASSPATH or API keys?

Use the 'env' field in your MCP server configuration to securely set environment variables, such as CLASSPATH, to control class lookup and access sensitive data securely.

What tools are available with this MCP server?

Available tools include decompile-from-path (by file path), decompile-from-package (by package name), and decompile-from-jar (from JAR files).

Can I use this server with FlowHunt and other MCP-compatible tools?

Yes, the Java Decompiler MCP Server integrates with FlowHunt, Windsurf, Claude, Cursor, and Cline for automated code decompilation in AI-driven workflows.

What is the main use case for this server?

Automating the decompilation of Java bytecode for debugging, auditing, reverse engineering, and supporting AI code analysis pipelines where source code is not available.

Try Java Decompiler MCP in FlowHunt

Automate Java class and JAR decompilation for analysis, debugging, and reverse engineering. Integrate with FlowHunt for seamless AI workflows.

Learn more