dejared-mcp
Health Uyari
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 5 GitHub stars
Code Basarisiz
- fs.rmSync — Destructive file system operation in lib/jar-runner.js
- os.homedir — User home directory access in lib/jar-runner.js
- process.env — Environment variable access in lib/jar-runner.js
- fs module — File system access in lib/jar-runner.js
Permissions Gecti
- Permissions — No dangerous permissions requested
Bu listing icin henuz AI raporu yok.
A MCP server for exploring, analyzing, and decompiling Java JAR files
dejared-mcp
A Model Context Protocol (MCP) server for exploring, analyzing, and decompiling Java JAR files.
Designed for AI-powered development tools, dejared-mcp connects your IDE or CLI assistant
to inspect package structures, search bytecode, and decompile classes
using CFR, Vineflower, or Procyon.
Table of Contents
- Overview
- Prerequisites
- Quick Start
- Features
- Decompiler Engines
- Installation and Configuration
- Custom Java Path
- Server Configuration
- How It Works
- FAQ and Troubleshooting
- Contributing
- Third-Party Licenses
- License
Overview
dejared-mcp is a Java-based MCP server distributed as an npm package.
It provides nine tools organized into three categories: discovery, hunting,
and deep analysis. AI assistants use these tools to navigate JAR file
structures, search for classes and string literals in bytecode, and
decompile .class files back to readable Java source code.
Any ZIP-based Java archive works: .jar, .war, .ear, .aar, and
Spring Boot fat-jars.
The npm package acts as a thin wrapper that downloads and caches the
server JAR on first run, then spawns it via java -jar using stdio
transport.
Prerequisites
- Node.js 20 or later
- Java 17 or later (JRE is sufficient)
Quick Start
Add the following to your MCP client configuration:
{
"mcpServers": {
"dejared": {
"command": "npx",
"args": ["-y", "dejared-mcp"]
}
}
}
See Installation and Configuration
for tool-specific instructions.
Features
Discovery
Browse and read JAR contents.
| Tool | Description |
|---|---|
dejared_list_packages |
List all packages with class counts |
dejared_list_classes |
List classes in a specific package |
dejared_list_resources |
List non-class resource files |
dejared_read_resource |
Read text resources (YAML, XML, properties, JSON, and others) |
Hunting
Search inside JAR files.
| Tool | Description |
|---|---|
dejared_search_class |
Search classes by name |
dejared_search_string |
Search string literals in bytecode (URLs, SQL, error messages) |
Deep Analysis
Inspect metadata and decompile classes.
| Tool | Description |
|---|---|
dejared_get_metadata |
Extract class metadata via ASM (fast, no decompilation) |
dejared_dump_package_metadata |
Batch metadata extraction for entire packages |
dejared_decompile_class |
Decompile .class files to Java source code |
Decompiler Engines
dejared-mcp supports three decompiler engines. The engine can be
specified per request via the dejared_decompile_class tool.
| Engine | Description |
|---|---|
| CFR (default) | Reliable general-purpose decompiler |
| Vineflower | Modern fork of FernFlower, handles newer Java features well |
| Procyon | Alternative engine, can handle some edge cases better |
Installation and Configuration
Most clients accept this standard config:
{
"mcpServers": {
"dejared": {
"command": "npx",
"args": ["-y", "dejared-mcp"]
}
}
}
If your tool has a CLI, one line is enough:
claude mcp add dejared -- npx -y dejared-mcp # Claude Code
codex mcp add dejared -- npx -y dejared-mcp # Codex
amp mcp add dejared -- npx -y dejared-mcp # Amp
gemini mcp add dejared npx -y dejared-mcp # Gemini CLI
Where the config file lives
Drop the standard config into the file for your tool:
| Tool | Location |
|---|---|
| Claude Desktop | %APPDATA%\Claude\claude_desktop_config.json (Windows) · ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) |
| Claude Code | .mcp.json in the project root |
| Cursor | .cursor/mcp.json (project) · ~/.cursor/mcp.json (global) |
| Windsurf | MCP servers panel in settings, or mcpServers in your settings file |
| Cline | MCP settings file, via the extension's MCP Servers panel |
| Antigravity Editor | ~/.gemini/antigravity/mcp_config.json |
| Kiro | .kiro/settings/mcp.json |
| Copilot CLI | ~/.copilot/mcp-config.json, or run /mcp add |
| Gemini CLI | ~/.gemini/settings.json (global) · .gemini/settings.json (project) |
| Goose | Advanced settings → Extensions → Add custom extension, type STDIO |
| JetBrains IDEs | Settings → Tools → AI Assistant → Model Context Protocol (MCP) |
| Qodo Gen | Chat panel → Connect more tools → + Add new MCP |
A few setups need more than the standard config — expand those below.
Codex — TOML instead of JSONcodex mcp add dejared -- npx -y dejared-mcp
codex mcp list
The -- matters: everything after it is the server's launch command.
Or edit ~/.codex/config.toml (global) or .codex/config.toml (project):
[mcp_servers.dejared]
command = "npx"
args = ["-y", "dejared-mcp"]
# Only if Java is not on your PATH
[mcp_servers.dejared.env]
DEJARED_JAVA_PATH = "/path/to/java"
VS Code (GitHub Copilot) — uses servers, not mcpServers
Create or edit .vscode/mcp.json:
{
"servers": {
"dejared": {
"command": "npx",
"args": ["-y", "dejared-mcp"]
}
}
}
After saving, click Start above the server entry, then use Agent mode in Copilot Chat.
opencode — command is an arrayEdit ~/.config/opencode/opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"dejared": {
"type": "local",
"command": ["npx", "-y", "dejared-mcp"],
"enabled": true
}
}
}
Claude Code plugin — also installs the /jar-analysis skill
claude plugin marketplace add hqkh4nh/dejared-mcp
claude plugin install dejared@dejared-mcp-marketplace
Pure Java (no Node.js required)
If you prefer to run the server JAR directly without Node.js:
Download the latest JAR from GitHub Releases.
Run it:
java -jar dejared-mcp-<version>.jarConfigure your MCP client to use the JAR directly instead of
npx:{ "mcpServers": { "dejared": { "command": "java", "args": ["-jar", "/path/to/dejared-mcp-<version>.jar"] } } }
Custom Java Path
If Java is not in your system PATH, set the DEJARED_JAVA_PATH environment variable in your MCP config. This applies to all npx-based configurations:
{
"mcpServers": {
"dejared": {
"command": "npx",
"args": ["-y", "dejared-mcp"],
"env": {
"DEJARED_JAVA_PATH": "/path/to/java"
}
}
}
}
Server Configuration
| Property | Default | Description |
|---|---|---|
dejared.cache.max-size |
500 |
Max entries in the decompilation LRU cache |
dejared.security.max-resource-size |
5242880 |
Max resource file size (bytes) |
dejared.security.decompile-timeout-seconds |
30 |
Timeout per decompilation |
How It Works
The npm package is a thin Node.js wrapper. On first run it:
- Checks the platform cache directory for a cached JAR matching the current version.
- Linux:
$XDG_CACHE_HOME/dejared-mcp(defaults to~/.cache/dejared-mcp) - macOS:
~/Library/Caches/dejared-mcp - Windows:
%LOCALAPPDATA%\dejared-mcp
- Linux:
- Downloads the JAR from GitHub Releases if not cached.
- Spawns
java -jarwith stdio inherited for MCP transport.
The server communicates over stdio using the Model Context Protocol.
FAQ and Troubleshooting
Q: Java is installed but the server cannot find it.
Set the DEJARED_JAVA_PATH environment variable in your MCP
configuration. See Custom Java Path.
Q: The server fails to start with a permission error.
Ensure that the cached JAR file is readable. The cache location
depends on your platform. See How It Works for
the cache directory paths.
Q: Decompilation times out or returns an error.
Some classes are difficult to decompile. Try a different engine
by specifying vineflower or procyon in the dejared_decompile_class
tool. The default timeout is 30 seconds and can be adjusted viadejared.security.decompile-timeout-seconds.
Q: Which Java version do I need?
Java 17 or later. A JRE is sufficient; you do not need a full JDK.
Q: Can I run the server without Node.js?
Yes. Download the JAR from GitHub Releases and run it directly
with java -jar. See the "Pure Java" section under
Installation and Configuration.
Contributing
Contributions are welcome. Please follow these guidelines:
- Fork the repository and create a feature branch from
master. - Ensure your changes compile and pass existing tests.
- Write clear commit messages describing the purpose of each change.
- Open a pull request against
masterwith a description of what
the change does and why.
Project Structure
dejared-mcp/
├── bin/ # Node.js CLI entry point
├── lib/ # Node.js wrapper (JAR download and process management)
├── java-mcp/ # Java MCP server (Spring Boot, Gradle)
│ └── src/
├── skills/ # Claude Code plugin skills
├── package.json # npm package manifest
└── server.json # MCP Registry manifest
Building from Source
cd java-mcp
./gradlew build
Reporting Issues
Open an issue on GitHub Issues
with steps to reproduce the problem, your Java version, and your
Node.js version.
Third-Party Licenses
This project uses the following open-source libraries:
| Library | License |
|---|---|
| Spring Boot | Apache 2.0 |
| Spring AI | Apache 2.0 |
| ASM | BSD 3-Clause |
| CFR | MIT |
| Vineflower | Apache 2.0 |
| Procyon | Apache 2.0 |
License
This project is licensed under the MIT License.
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi