{
  "markdown": "[![Java](https://img.shields.io/badge/Java-17%2B-ED8B00?style=flat-square&logo=openjdk&logoColor=white)]()\n[![Node.js](https://img.shields.io/badge/Node.js-20%2B-339933?style=flat-square&logo=node.js&logoColor=white)]()\n[![npm version](https://img.shields.io/npm/v/dejared-mcp?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/dejared-mcp)\n[![npm downloads](https://img.shields.io/npm/dt/dejared-mcp?style=flat-square&color=cb3837&label=downloads)](https://www.npmjs.com/package/dejared-mcp)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue?style=flat-square)](LICENSE)\n\n# dejared-mcp: Java decompiler MCP server\n\ndejared-mcp is a Java decompiler and JAR analyzer that speaks the Model Context\nProtocol. It lets an AI coding agent (Claude Code, Codex, Cursor, VS Code)\nopen a `.jar`, `.war`, `.ear`, or `.aar`, list what is inside, search its\nbytecode, and decompile any class back to Java source using CFR, Vineflower,\nor Procyon.\n\n[![Claude Code](https://img.shields.io/badge/Claude_Code-plugin-D97757?style=for-the-badge&logo=claude&logoColor=white)](#claude-code)\n[![Codex](https://img.shields.io/badge/Codex-plugin-000000?style=for-the-badge&logo=openai&logoColor=white)](#codex)\n[![Install in VS Code](https://img.shields.io/badge/Install_in-VS_Code-0098FF?style=for-the-badge&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect/mcp/install?name=dejared&config=%7B%22type%22%3A%22stdio%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22dejared-mcp%22%5D%7D)\n[![Add to Cursor](https://img.shields.io/badge/Add_to-Cursor-000000?style=for-the-badge&logo=cursor&logoColor=white)](https://cursor.com/install-mcp?name=dejared&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImRlamFyZWQtbWNwIl19)\n\n## Table of Contents\n\n- [Overview](#overview)\n- [Prerequisites](#prerequisites)\n- [Quick Start](#quick-start)\n- [Install as a plugin (recommended)](#install-as-a-plugin-recommended)\n- [Install as an MCP server](#install-as-an-mcp-server)\n- [Features](#features)\n- [Decompiler Engines](#decompiler-engines)\n- [Custom Java Path](#custom-java-path)\n- [Server Configuration](#server-configuration)\n- [How It Works](#how-it-works)\n- [FAQ and Troubleshooting](#faq-and-troubleshooting)\n- [Contributing](#contributing)\n- [Third-Party Licenses](#third-party-licenses)\n- [License](#license)\n\n## Overview\n\ndejared-mcp is a Java-based MCP server distributed as an npm package.\nIt provides nine tools organized into three categories: discovery, hunting,\nand deep analysis. AI assistants use these tools to navigate JAR file\nstructures, search for classes and string literals in bytecode, and\ndecompile `.class` files back to readable Java source code.\n\nReach for it whenever a dependency ships without sources: reading what a\nthird-party library actually does, recovering an `application.yml` or\n`MANIFEST.MF` embedded in a JAR, following a stack trace into a library you\nhave no source for, or inspecting an obfuscated plugin or mod. It replaces\nhand-running `jar tf`, `unzip`, `javap`, or a desktop decompiler.\n\nAny ZIP-based Java archive works: `.jar`, `.war`, `.ear`, `.aar`, and\nSpring Boot fat-jars.\n\nThe npm package acts as a thin wrapper that downloads and caches the\nserver JAR on first run, then spawns it via `java -jar` using stdio\ntransport.\n\n## Prerequisites\n\n- **Node.js** 20 or later\n- **Java** 17 or later (JRE is sufficient)\n\n## Quick Start\n\nThe best install is the plugin. One command pair gives your agent both halves:\nthe **nine MCP tools**, and the **`jar-analysis` skill** that tells it when to\nreach for them instead of shelling out to `jar tf`, `unzip`, or `javap`.\n\n```bash\nclaude plugin marketplace add hqkh4nh/dejared-mcp\nclaude plugin install dejared@dejared-mcp-marketplace\n```\n\nCodex carries the same bundle. See\n[Install as a plugin](#install-as-a-plugin-recommended).\nEvery other client takes the [plain MCP config](#install-as-an-mcp-server).\n\n## Install as a plugin (recommended)\n\nThe MCP server on its own gives an agent nine tools. It does not tell the agent\n*when* to use them, so most agents keep reaching for `jar tf`, `unzip -p`, and\n`javap -p` out of habit and never touch the tools you installed.\n\nA plugin ships both parts together:\n\n| Part | What it does |\n|------|--------------|\n| MCP server | The nine tools listed under [Features](#features) |\n| `jar-analysis` skill | Routes JAR questions to those tools, picks the cheap tool before the expensive one, and knows which decompiler to retry with |\n\nTwo tools support that bundle today. Everything else is\n[MCP-only](#install-as-an-mcp-server).\n\n### Claude Code\n\n```bash\nclaude plugin marketplace add hqkh4nh/dejared-mcp\nclaude plugin install dejared@dejared-mcp-marketplace\n```\n\nInside a session, the same commands work as `/plugin marketplace add ...` and\n`/plugin install ...`. If the install summary says `Run /reload-plugins to\nactivate`, run it.\n\n### Codex\n\n```bash\ncodex plugin marketplace add hqkh4nh/dejared-mcp\ncodex plugin add dejared@dejared-mcp-marketplace\n```\n\nStart a new session afterwards so the bundled skill and server load. Check with\n`codex mcp list`. `dejared` should be listed as `enabled`.\n\n## Install as an MCP server\n\nFor clients without a plugin system. You get the tools, but not the skill that\nsteers the agent toward them.\n\nMost clients accept this standard config:\n\n```json\n{\n  \"mcpServers\": {\n    \"dejared\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"dejared-mcp\"]\n    }\n  }\n}\n```\n\n### From the command line\n\nIf your tool has a CLI, one line is enough:\n\n```bash\nclaude mcp add dejared -- npx -y dejared-mcp     # Claude Code\ncodex mcp add dejared -- npx -y dejared-mcp      # Codex\namp mcp add dejared -- npx -y dejared-mcp        # Amp\ngemini mcp add dejared npx -y dejared-mcp        # Gemini CLI\n```\n\n### Where the config file lives\n\nDrop the standard config into the file for your tool:\n\n| Tool | Location |\n|------|----------|\n| Claude Desktop | `%APPDATA%\\Claude\\claude_desktop_config.json` (Windows) · `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) |\n| Claude Code | `.mcp.json` in the project root |\n| Cursor | `.cursor/mcp.json` (project) · `~/.cursor/mcp.json` (global) |\n| Windsurf | MCP servers panel in settings, or `mcpServers` in your settings file |\n| Cline | MCP settings file, via the extension's MCP Servers panel |\n| Antigravity Editor | `~/.gemini/antigravity/mcp_config.json` |\n| Kiro | `.kiro/settings/mcp.json` |\n| Copilot CLI | `~/.copilot/mcp-config.json`, or run `/mcp add` |\n| Gemini CLI | `~/.gemini/settings.json` (global) · `.gemini/settings.json` (project) |\n| Goose | Advanced settings → Extensions → Add custom extension, type `STDIO` |\n| JetBrains IDEs | Settings → Tools → AI Assistant → Model Context Protocol (MCP) |\n| Qodo Gen | Chat panel → Connect more tools → + Add new MCP |\n\nA few setups need more than the standard config. Expand those below.\n\n<details>\n<summary><strong>Codex</strong>: TOML instead of JSON</summary>\n\n```bash\ncodex mcp add dejared -- npx -y dejared-mcp\ncodex mcp list\n```\n\nThe `--` matters: everything after it is the server's launch command.\n\nOr edit `~/.codex/config.toml` (global) or `.codex/config.toml` (project):\n\n```toml\n[mcp_servers.dejared]\ncommand = \"npx\"\nargs = [\"-y\", \"dejared-mcp\"]\n\n# Only if Java is not on your PATH\n[mcp_servers.dejared.env]\nDEJARED_JAVA_PATH = \"/path/to/java\"\n```\n\n</details>\n\n<details>\n<summary><strong>VS Code (GitHub Copilot)</strong>: uses <code>servers</code>, not <code>mcpServers</code></summary>\n\nCreate or edit `.vscode/mcp.json`:\n\n```json\n{\n  \"servers\": {\n    \"dejared\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"dejared-mcp\"]\n    }\n  }\n}\n```\n\nAfter saving, click **Start** above the server entry, then use Agent mode in Copilot Chat.\n\n</details>\n\n<details>\n<summary><strong>opencode</strong>: command is an array</summary>\n\nEdit `~/.config/opencode/opencode.json`:\n\n```json\n{\n  \"$schema\": \"https://opencode.ai/config.json\",\n  \"mcp\": {\n    \"dejared\": {\n      \"type\": \"local\",\n      \"command\": [\"npx\", \"-y\", \"dejared-mcp\"],\n      \"enabled\": true\n    }\n  }\n}\n```\n\n</details>\n\n<details>\n<summary><strong>Pure Java (no Node.js required)</strong></summary>\n\nIf you prefer to run the server JAR directly without Node.js:\n\n1. Download the latest JAR from [GitHub Releases](https://github.com/hqkh4nh/dejared-mcp/releases).\n\n2. Run it:\n   ```bash\n   java -jar dejared-mcp-<version>.jar\n   ```\n\n3. Configure your MCP client to use the JAR directly instead of `npx`:\n\n   ```json\n   {\n     \"mcpServers\": {\n       \"dejared\": {\n         \"command\": \"java\",\n         \"args\": [\"-jar\", \"/path/to/dejared-mcp-<version>.jar\"]\n       }\n     }\n   }\n   ```\n\n</details>\n\n## Features\n\n### Discovery\n\nBrowse and read JAR contents.\n\n| Tool | Description |\n|------|-------------|\n| `dejared_list_packages` | List all packages with class counts |\n| `dejared_list_classes` | List classes in a specific package |\n| `dejared_list_resources` | List non-class resource files |\n| `dejared_read_resource` | Read text resources (YAML, XML, properties, JSON, and others) |\n\n### Hunting\n\nSearch inside JAR files.\n\n| Tool | Description |\n|------|-------------|\n| `dejared_search_class` | Search classes by name |\n| `dejared_search_string` | Search string literals in bytecode (URLs, SQL, error messages) |\n\n### Deep Analysis\n\nInspect metadata and decompile classes.\n\n| Tool | Description |\n|------|-------------|\n| `dejared_get_metadata` | Extract class metadata via ASM (fast, no decompilation) |\n| `dejared_dump_package_metadata` | Batch metadata extraction for entire packages |\n| `dejared_decompile_class` | Decompile `.class` files to Java source code |\n\n## Decompiler Engines\n\ndejared-mcp supports three decompiler engines. The engine can be\nspecified per request via the `dejared_decompile_class` tool.\n\n| Engine | Description |\n|--------|-------------|\n| **CFR** (default) | Reliable general-purpose decompiler |\n| **Vineflower** | Modern fork of FernFlower, handles newer Java features well |\n| **Procyon** | Alternative engine, can handle some edge cases better |\n\n## Custom Java Path\n\nIf 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:\n\n```json\n{\n  \"mcpServers\": {\n    \"dejared\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"dejared-mcp\"],\n      \"env\": {\n        \"DEJARED_JAVA_PATH\": \"/path/to/java\"\n      }\n    }\n  }\n}\n```\n\n## Server Configuration\n\n| Property | Default | Description |\n|----------|---------|-------------|\n| `dejared.cache.max-size` | `500` | Max entries in the decompilation LRU cache |\n| `dejared.security.max-resource-size` | `5242880` | Max resource file size (bytes) |\n| `dejared.security.decompile-timeout-seconds` | `30` | Timeout per decompilation |\n\n## How It Works\n\nThe npm package is a thin Node.js wrapper. On first run it:\n\n1. Checks the platform cache directory for a cached JAR matching the current version.\n   - **Linux**: `$XDG_CACHE_HOME/dejared-mcp` (defaults to `~/.cache/dejared-mcp`)\n   - **macOS**: `~/Library/Caches/dejared-mcp`\n   - **Windows**: `%LOCALAPPDATA%\\dejared-mcp`\n2. Downloads the JAR from GitHub Releases if not cached.\n3. Spawns `java -jar` with stdio inherited for MCP transport.\n\nThe server communicates over stdio using the Model Context Protocol.\n\n## FAQ and Troubleshooting\n\n**Q: Java is installed but the server cannot find it.**\n\nSet the `DEJARED_JAVA_PATH` environment variable in your MCP\nconfiguration. See [Custom Java Path](#custom-java-path).\n\n**Q: The server fails to start with a permission error.**\n\nEnsure that the cached JAR file is readable. The cache location\ndepends on your platform. See [How It Works](#how-it-works) for\nthe cache directory paths.\n\n**Q: Decompilation times out or returns an error.**\n\nSome classes are difficult to decompile. Try a different engine\nby specifying `vineflower` or `procyon` in the `dejared_decompile_class`\ntool. The default timeout is 30 seconds and can be adjusted via\n`dejared.security.decompile-timeout-seconds`.\n\n**Q: Which Java version do I need?**\n\nJava 17 or later. A JRE is sufficient; you do not need a full JDK.\n\n**Q: Can I run the server without Node.js?**\n\nYes. Download the JAR from GitHub Releases and run it directly\nwith `java -jar`. See the \"Pure Java\" section under\n[Install as an MCP server](#install-as-an-mcp-server).\n\n## Contributing\n\nContributions are welcome. Please follow these guidelines:\n\n1. Fork the repository and create a feature branch from `master`.\n2. Ensure your changes compile and pass existing tests.\n3. Write clear commit messages describing the purpose of each change.\n4. Open a pull request against `master` with a description of what\n   the change does and why.\n\nEvery manifest listed under [Project Structure](#project-structure) carries a\n`version` field, and CI fails the build if any of them drifts from\n`package.json`. Bump them together.\n\n### Project Structure\n\n```\ndejared-mcp/\n├── bin/                    # Node.js CLI entry point\n├── lib/                    # Node.js wrapper (JAR download and process management)\n├── java-mcp/               # Java MCP server (Spring Boot, Gradle)\n│   └── src/\n├── skills/                 # Agent skills, shared by every plugin manifest below\n├── .mcp.json               # MCP server definition, shared the same way\n├── .claude-plugin/         # Claude Code plugin + marketplace manifests\n├── .codex-plugin/          # Codex plugin manifest\n├── .agents/plugins/        # Codex marketplace manifest\n├── package.json            # npm package manifest\n└── server.json             # MCP Registry manifest\n```\n\n### Building from Source\n\n```bash\ncd java-mcp\n./gradlew build\n```\n\n### Reporting Issues\n\nOpen an issue on [GitHub Issues](https://github.com/hqkh4nh/dejared-mcp/issues)\nwith steps to reproduce the problem, your Java version, and your\nNode.js version.\n\n## Third-Party Licenses\n\nThis project uses the following open-source libraries:\n\n| Library | License |\n|---------|---------|\n| [Spring Boot](https://spring.io/projects/spring-boot) | Apache 2.0 |\n| [Spring AI](https://spring.io/projects/spring-ai) | Apache 2.0 |\n| [ASM](https://asm.ow2.io/) | BSD 3-Clause |\n| [CFR](https://github.com/leibnitz27/cfr) | MIT |\n| [Vineflower](https://github.com/Vineflower/vineflower) | Apache 2.0 |\n| [Procyon](https://github.com/mstrobel/procyon) | Apache 2.0 |\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n",
  "bytes": 14424,
  "sha": "1e486cf0166a9aee93938ab331a1c3057556bc98eb84871738225dd7e3f270db",
  "repo_slug": "huynhkhanh1402/dejared-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_huynhkhanh1402_dejared_1f380e4b/readme"
}