dejared-mcp 1.0.1 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,13 +11,13 @@
11
11
  {
12
12
  "name": "dejared",
13
13
  "source": "./",
14
- "description": "Explore, analyze, and decompile Java JAR files with structured workflows.",
15
- "version": "1.0.1",
14
+ "description": "Java decompiler and JAR analyzer. Decompile classes, search bytecode, and read resources embedded in JAR, WAR, EAR, and AAR archives.",
15
+ "version": "1.2.0",
16
16
  "author": {
17
17
  "name": "hqkh4nh"
18
18
  },
19
19
  "license": "MIT",
20
- "keywords": ["java", "jar", "decompiler", "bytecode", "reverse-engineering", "mcp"],
20
+ "keywords": ["java", "java-decompiler", "jar", "war", "aar", "decompiler", "decompile", "bytecode", "class-file", "cfr", "vineflower", "procyon", "reverse-engineering", "mcp"],
21
21
  "category": "development"
22
22
  }
23
23
  ]
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "dejared",
3
- "description": "Explore, analyze, and decompile Java JAR files with structured workflows.",
4
- "version": "1.0.1",
3
+ "description": "Java decompiler and JAR analyzer. Decompile classes, search bytecode, and read resources embedded in JAR, WAR, EAR, and AAR archives.",
4
+ "version": "1.2.0",
5
5
  "author": {
6
6
  "name": "hqkh4nh"
7
7
  },
8
8
  "repository": "https://github.com/hqkh4nh/dejared-mcp",
9
9
  "license": "MIT",
10
- "keywords": ["java", "jar", "decompiler", "bytecode", "reverse-engineering", "mcp"],
10
+ "keywords": ["java", "java-decompiler", "jar", "war", "aar", "decompiler", "decompile", "bytecode", "class-file", "cfr", "vineflower", "procyon", "reverse-engineering", "mcp"],
11
11
  "mcpServers": {
12
12
  "dejared": {
13
13
  "command": "npx",
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "dejared",
3
+ "version": "1.2.0",
4
+ "description": "Java decompiler and JAR analyzer. Decompile classes, search bytecode, and read resources embedded in JAR, WAR, EAR, and AAR archives.",
5
+ "author": {
6
+ "name": "hqkh4nh"
7
+ },
8
+ "homepage": "https://github.com/hqkh4nh/dejared-mcp",
9
+ "repository": "https://github.com/hqkh4nh/dejared-mcp",
10
+ "license": "MIT",
11
+ "keywords": ["java", "java-decompiler", "jar", "war", "aar", "decompiler", "decompile", "bytecode", "class-file", "cfr", "vineflower", "procyon", "reverse-engineering", "mcp"],
12
+ "skills": "./skills/",
13
+ "mcpServers": "./.mcp.json",
14
+ "interface": {
15
+ "displayName": "DeJared",
16
+ "shortDescription": "Decompile and search Java archives",
17
+ "longDescription": "Nine tools for navigating JAR, WAR, EAR, AAR, and Spring Boot fat-jars: list packages and resources, search classes and bytecode string literals, read embedded configs, extract class metadata via ASM, and decompile with CFR, Vineflower, or Procyon.",
18
+ "category": "Developer Tools"
19
+ }
20
+ }
package/README.md CHANGED
@@ -1,23 +1,31 @@
1
- [![npm version](https://img.shields.io/npm/v/dejared-mcp?style=flat-square)](https://www.npmjs.com/package/dejared-mcp)
2
- [![License: MIT](https://img.shields.io/badge/License-MIT-blue?style=flat-square)](LICENSE)
3
- [![Node.js](https://img.shields.io/badge/Node.js-18%2B-339933?style=flat-square&logo=node.js&logoColor=white)]()
4
1
  [![Java](https://img.shields.io/badge/Java-17%2B-ED8B00?style=flat-square&logo=openjdk&logoColor=white)]()
2
+ [![Node.js](https://img.shields.io/badge/Node.js-20%2B-339933?style=flat-square&logo=node.js&logoColor=white)]()
3
+ [![npm version](https://img.shields.io/npm/v/dejared-mcp?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/dejared-mcp)
4
+ [![npm downloads](https://img.shields.io/npm/dt/dejared-mcp?style=flat-square&color=cb3837&label=downloads)](https://www.npmjs.com/package/dejared-mcp)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue?style=flat-square)](LICENSE)
5
6
 
6
- # dejared-mcp
7
+ # dejared-mcp: Java decompiler MCP server
7
8
 
8
- A Model Context Protocol (MCP) server for exploring, analyzing, and decompiling Java JAR files.
9
- Designed for AI-powered development tools, dejared-mcp connects your IDE or CLI assistant
10
- to inspect package structures, search bytecode, and decompile classes
11
- using CFR, Vineflower, or Procyon.
9
+ dejared-mcp is a Java decompiler and JAR analyzer that speaks the Model Context
10
+ Protocol. It lets an AI coding agent (Claude Code, Codex, Cursor, VS Code)
11
+ open a `.jar`, `.war`, `.ear`, or `.aar`, list what is inside, search its
12
+ bytecode, and decompile any class back to Java source using CFR, Vineflower,
13
+ or Procyon.
14
+
15
+ [![Claude Code](https://img.shields.io/badge/Claude_Code-plugin-D97757?style=for-the-badge&logo=claude&logoColor=white)](#claude-code)
16
+ [![Codex](https://img.shields.io/badge/Codex-plugin-000000?style=for-the-badge&logo=openai&logoColor=white)](#codex)
17
+ [![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)
18
+ [![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)
12
19
 
13
20
  ## Table of Contents
14
21
 
15
22
  - [Overview](#overview)
16
23
  - [Prerequisites](#prerequisites)
17
24
  - [Quick Start](#quick-start)
25
+ - [Install as a plugin (recommended)](#install-as-a-plugin-recommended)
26
+ - [Install as an MCP server](#install-as-an-mcp-server)
18
27
  - [Features](#features)
19
28
  - [Decompiler Engines](#decompiler-engines)
20
- - [Installation and Configuration](#installation-and-configuration)
21
29
  - [Custom Java Path](#custom-java-path)
22
30
  - [Server Configuration](#server-configuration)
23
31
  - [How It Works](#how-it-works)
@@ -34,118 +42,82 @@ and deep analysis. AI assistants use these tools to navigate JAR file
34
42
  structures, search for classes and string literals in bytecode, and
35
43
  decompile `.class` files back to readable Java source code.
36
44
 
45
+ Reach for it whenever a dependency ships without sources: reading what a
46
+ third-party library actually does, recovering an `application.yml` or
47
+ `MANIFEST.MF` embedded in a JAR, following a stack trace into a library you
48
+ have no source for, or inspecting an obfuscated plugin or mod. It replaces
49
+ hand-running `jar tf`, `unzip`, `javap`, or a desktop decompiler.
50
+
51
+ Any ZIP-based Java archive works: `.jar`, `.war`, `.ear`, `.aar`, and
52
+ Spring Boot fat-jars.
53
+
37
54
  The npm package acts as a thin wrapper that downloads and caches the
38
55
  server JAR on first run, then spawns it via `java -jar` using stdio
39
56
  transport.
40
57
 
41
58
  ## Prerequisites
42
59
 
43
- - **Node.js** 18 or later
60
+ - **Node.js** 20 or later
44
61
  - **Java** 17 or later (JRE is sufficient)
45
62
 
46
63
  ## Quick Start
47
64
 
48
- Add the following to your MCP client configuration:
65
+ The best install is the plugin. One command pair gives your agent both halves:
66
+ the **nine MCP tools**, and the **`jar-analysis` skill** that tells it when to
67
+ reach for them instead of shelling out to `jar tf`, `unzip`, or `javap`.
49
68
 
50
- ```json
51
- {
52
- "mcpServers": {
53
- "dejared": {
54
- "command": "npx",
55
- "args": ["-y", "dejared-mcp"]
56
- }
57
- }
58
- }
69
+ ```bash
70
+ claude plugin marketplace add hqkh4nh/dejared-mcp
71
+ claude plugin install dejared@dejared-mcp-marketplace
59
72
  ```
60
73
 
61
- See [Installation and Configuration](#installation-and-configuration)
62
- for tool-specific instructions.
74
+ Codex carries the same bundle. See
75
+ [Install as a plugin](#install-as-a-plugin-recommended).
76
+ Every other client takes the [plain MCP config](#install-as-an-mcp-server).
63
77
 
64
- ## Features
78
+ ## Install as a plugin (recommended)
65
79
 
66
- ### Discovery
67
-
68
- Browse and read JAR contents.
80
+ The MCP server on its own gives an agent nine tools. It does not tell the agent
81
+ *when* to use them, so most agents keep reaching for `jar tf`, `unzip -p`, and
82
+ `javap -p` out of habit and never touch the tools you installed.
69
83
 
70
- | Tool | Description |
71
- |------|-------------|
72
- | `dejared_list_packages` | List all packages with class counts |
73
- | `dejared_list_classes` | List classes in a specific package |
74
- | `dejared_list_resources` | List non-class resource files |
75
- | `dejared_read_resource` | Read text resources (YAML, XML, properties, JSON, and others) |
84
+ A plugin ships both parts together:
76
85
 
77
- ### Hunting
78
-
79
- Search inside JAR files.
80
-
81
- | Tool | Description |
82
- |------|-------------|
83
- | `dejared_search_class` | Search classes by name |
84
- | `dejared_search_string` | Search string literals in bytecode (URLs, SQL, error messages) |
85
-
86
- ### Deep Analysis
87
-
88
- Inspect metadata and decompile classes.
89
-
90
- | Tool | Description |
91
- |------|-------------|
92
- | `dejared_get_metadata` | Extract class metadata via ASM (fast, no decompilation) |
93
- | `dejared_dump_package_metadata` | Batch metadata extraction for entire packages |
94
- | `dejared_decompile_class` | Decompile `.class` files to Java source code |
95
-
96
- ## Decompiler Engines
97
-
98
- dejared-mcp supports three decompiler engines. The engine can be
99
- specified per request via the `dejared_decompile_class` tool.
100
-
101
- | Engine | Description |
102
- |--------|-------------|
103
- | **CFR** (default) | Reliable general-purpose decompiler |
104
- | **Vineflower** | Modern fork of FernFlower, handles newer Java features well |
105
- | **Procyon** | Alternative engine, can handle some edge cases better |
86
+ | Part | What it does |
87
+ |------|--------------|
88
+ | MCP server | The nine tools listed under [Features](#features) |
89
+ | `jar-analysis` skill | Routes JAR questions to those tools, picks the cheap tool before the expensive one, and knows which decompiler to retry with |
106
90
 
107
- ## Installation and Configuration
91
+ Two tools support that bundle today. Everything else is
92
+ [MCP-only](#install-as-an-mcp-server).
108
93
 
109
- The standard configuration below works with most MCP-compatible tools.
110
- Expand the relevant section for tool-specific instructions.
94
+ ### Claude Code
111
95
 
112
- ```json
113
- {
114
- "mcpServers": {
115
- "dejared": {
116
- "command": "npx",
117
- "args": ["-y", "dejared-mcp"]
118
- }
119
- }
120
- }
96
+ ```bash
97
+ claude plugin marketplace add hqkh4nh/dejared-mcp
98
+ claude plugin install dejared@dejared-mcp-marketplace
121
99
  ```
122
100
 
123
- <details>
124
- <summary><strong>Amp</strong></summary>
125
-
126
- Add via the Amp VS Code extension settings screen or by updating your `settings.json` file:
101
+ Inside a session, the same commands work as `/plugin marketplace add ...` and
102
+ `/plugin install ...`. If the install summary says `Run /reload-plugins to
103
+ activate`, run it.
127
104
 
128
- ```json
129
- "amp.mcpServers": {
130
- "dejared": {
131
- "command": "npx",
132
- "args": ["-y", "dejared-mcp"]
133
- }
134
- }
135
- ```
136
-
137
- **Amp CLI:**
105
+ ### Codex
138
106
 
139
107
  ```bash
140
- amp mcp add dejared -- npx -y dejared-mcp
108
+ codex plugin marketplace add hqkh4nh/dejared-mcp
109
+ codex plugin add dejared@dejared-mcp-marketplace
141
110
  ```
142
111
 
143
- </details>
112
+ Start a new session afterwards so the bundled skill and server load. Check with
113
+ `codex mcp list`. `dejared` should be listed as `enabled`.
144
114
 
145
- <details>
146
- <summary><strong>Antigravity Editor</strong></summary>
115
+ ## Install as an MCP server
147
116
 
148
- Edit `~/.gemini/antigravity/mcp_config.json`:
117
+ For clients without a plugin system. You get the tools, but not the skill that
118
+ steers the agent toward them.
119
+
120
+ Most clients accept this standard config:
149
121
 
150
122
  ```json
151
123
  {
@@ -158,145 +130,84 @@ Edit `~/.gemini/antigravity/mcp_config.json`:
158
130
  }
159
131
  ```
160
132
 
161
- Or install through the MCP Store if available.
133
+ ### From the command line
162
134
 
163
- </details>
164
-
165
- <details>
166
- <summary><strong>Claude Code</strong></summary>
135
+ If your tool has a CLI, one line is enough:
167
136
 
168
137
  ```bash
169
- claude mcp add dejared -- npx -y dejared-mcp
138
+ claude mcp add dejared -- npx -y dejared-mcp # Claude Code
139
+ codex mcp add dejared -- npx -y dejared-mcp # Codex
140
+ amp mcp add dejared -- npx -y dejared-mcp # Amp
141
+ gemini mcp add dejared npx -y dejared-mcp # Gemini CLI
170
142
  ```
171
143
 
172
- Or add it to your project's `.mcp.json` using the standard config above.
173
-
174
- **Plugin (Marketplace)** installs both the MCP server and the `/jar-analysis` skill:
175
-
176
- ```bash
177
- claude plugin marketplace add hqkh4nh/dejared-mcp
178
- claude plugin install dejared@dejared-mcp-marketplace
179
- ```
180
-
181
- </details>
182
-
183
- <details>
184
- <summary><strong>Claude Desktop</strong></summary>
185
-
186
- Edit the Claude Desktop config file:
187
-
188
- - **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
189
- - **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
144
+ ### Where the config file lives
190
145
 
191
- Add the standard config above and restart Claude Desktop.
146
+ Drop the standard config into the file for your tool:
192
147
 
193
- </details>
194
-
195
- <details>
196
- <summary><strong>Cline</strong></summary>
148
+ | Tool | Location |
149
+ |------|----------|
150
+ | Claude Desktop | `%APPDATA%\Claude\claude_desktop_config.json` (Windows) · `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) |
151
+ | Claude Code | `.mcp.json` in the project root |
152
+ | Cursor | `.cursor/mcp.json` (project) · `~/.cursor/mcp.json` (global) |
153
+ | Windsurf | MCP servers panel in settings, or `mcpServers` in your settings file |
154
+ | Cline | MCP settings file, via the extension's MCP Servers panel |
155
+ | Antigravity Editor | `~/.gemini/antigravity/mcp_config.json` |
156
+ | Kiro | `.kiro/settings/mcp.json` |
157
+ | Copilot CLI | `~/.copilot/mcp-config.json`, or run `/mcp add` |
158
+ | Gemini CLI | `~/.gemini/settings.json` (global) · `.gemini/settings.json` (project) |
159
+ | Goose | Advanced settings → Extensions → Add custom extension, type `STDIO` |
160
+ | JetBrains IDEs | Settings → Tools → AI Assistant → Model Context Protocol (MCP) |
161
+ | Qodo Gen | Chat panel → Connect more tools → + Add new MCP |
197
162
 
198
- Add the standard config above to your MCP settings file.
199
-
200
- </details>
163
+ A few setups need more than the standard config. Expand those below.
201
164
 
202
165
  <details>
203
- <summary><strong>Codex</strong></summary>
166
+ <summary><strong>Codex</strong>: TOML instead of JSON</summary>
204
167
 
205
168
  ```bash
206
- codex mcp add dejared npx "-y dejared-mcp"
169
+ codex mcp add dejared -- npx -y dejared-mcp
170
+ codex mcp list
207
171
  ```
208
172
 
209
- Or edit `~/.codex/config.toml`:
173
+ The `--` matters: everything after it is the server's launch command.
174
+
175
+ Or edit `~/.codex/config.toml` (global) or `.codex/config.toml` (project):
210
176
 
211
177
  ```toml
212
178
  [mcp_servers.dejared]
213
179
  command = "npx"
214
180
  args = ["-y", "dejared-mcp"]
181
+
182
+ # Only if Java is not on your PATH
183
+ [mcp_servers.dejared.env]
184
+ DEJARED_JAVA_PATH = "/path/to/java"
215
185
  ```
216
186
 
217
187
  </details>
218
188
 
219
189
  <details>
220
- <summary><strong>Copilot CLI</strong></summary>
190
+ <summary><strong>VS Code (GitHub Copilot)</strong>: uses <code>servers</code>, not <code>mcpServers</code></summary>
221
191
 
222
- Interactive:
223
-
224
- ```
225
- /mcp add
226
- ```
227
-
228
- Then fill in:
229
- - **Server Name**: `dejared`
230
- - **Server Type**: `STDIO`
231
- - **Command**: `npx -y dejared-mcp`
232
-
233
- Or edit `~/.copilot/mcp-config.json`:
192
+ Create or edit `.vscode/mcp.json`:
234
193
 
235
194
  ```json
236
195
  {
237
- "mcpServers": {
196
+ "servers": {
238
197
  "dejared": {
239
- "type": "local",
240
198
  "command": "npx",
241
- "args": ["-y", "dejared-mcp"],
242
- "tools": ["*"]
199
+ "args": ["-y", "dejared-mcp"]
243
200
  }
244
201
  }
245
202
  }
246
203
  ```
247
204
 
248
- </details>
249
-
250
- <details>
251
- <summary><strong>Cursor</strong></summary>
252
-
253
- Create or edit `.cursor/mcp.json` in your project root (project-level) or `~/.cursor/mcp.json` (global) using the standard config above.
205
+ After saving, click **Start** above the server entry, then use Agent mode in Copilot Chat.
254
206
 
255
207
  </details>
256
208
 
257
209
  <details>
258
- <summary><strong>Gemini CLI</strong></summary>
259
-
260
- ```bash
261
- gemini mcp add dejared npx -y dejared-mcp
262
- ```
263
-
264
- Or edit `~/.gemini/settings.json` (global) or `.gemini/settings.json` (project) using the standard config above.
265
-
266
- Use `/mcp` in a Gemini CLI session to verify the server is connected.
267
-
268
- </details>
269
-
270
- <details>
271
- <summary><strong>Goose</strong></summary>
272
-
273
- Go to **Advanced settings** > **Extensions** > **Add custom extension**. Name to your liking, use type `STDIO`, and set the command to `npx -y dejared-mcp`.
274
-
275
- </details>
276
-
277
- <details>
278
- <summary><strong>JetBrains IDEs</strong></summary>
279
-
280
- Go to **Settings** > **Tools** > **AI Assistant** > **Model Context Protocol (MCP)**.
281
-
282
- Click **+ Add** and configure:
283
-
284
- - **Name**: `dejared`
285
- - **Transport**: `Stdio`
286
- - **Command**: `npx`
287
- - **Arguments**: `-y dejared-mcp`
288
-
289
- </details>
290
-
291
- <details>
292
- <summary><strong>Kiro</strong></summary>
293
-
294
- Create or edit `.kiro/settings/mcp.json` using the standard config above.
295
-
296
- </details>
297
-
298
- <details>
299
- <summary><strong>opencode</strong></summary>
210
+ <summary><strong>opencode</strong>: command is an array</summary>
300
211
 
301
212
  Edit `~/.config/opencode/opencode.json`:
302
213
 
@@ -315,40 +226,6 @@ Edit `~/.config/opencode/opencode.json`:
315
226
 
316
227
  </details>
317
228
 
318
- <details>
319
- <summary><strong>Qodo Gen</strong></summary>
320
-
321
- Open [Qodo Gen](https://docs.qodo.ai/qodo-documentation/qodo-gen) chat panel in VS Code or IntelliJ > Connect more tools > + Add new MCP > Paste the standard config above > Save.
322
-
323
- </details>
324
-
325
- <details>
326
- <summary><strong>VS Code (GitHub Copilot)</strong></summary>
327
-
328
- Create or edit `.vscode/mcp.json` in your project root:
329
-
330
- ```json
331
- {
332
- "servers": {
333
- "dejared": {
334
- "command": "npx",
335
- "args": ["-y", "dejared-mcp"]
336
- }
337
- }
338
- }
339
- ```
340
-
341
- After saving, click the **Start** button that appears in the MCP config file, then use Agent mode in Copilot Chat.
342
-
343
- </details>
344
-
345
- <details>
346
- <summary><strong>Windsurf</strong></summary>
347
-
348
- Open Windsurf settings, navigate to MCP servers, and add a new server using the `command` type with `npx -y dejared-mcp`. Or add the standard config under `mcpServers` in your settings.
349
-
350
- </details>
351
-
352
229
  <details>
353
230
  <summary><strong>Pure Java (no Node.js required)</strong></summary>
354
231
 
@@ -358,7 +235,7 @@ If you prefer to run the server JAR directly without Node.js:
358
235
 
359
236
  2. Run it:
360
237
  ```bash
361
- java -jar dejared-mcp-0.2.0.jar
238
+ java -jar dejared-mcp-<version>.jar
362
239
  ```
363
240
 
364
241
  3. Configure your MCP client to use the JAR directly instead of `npx`:
@@ -368,7 +245,7 @@ If you prefer to run the server JAR directly without Node.js:
368
245
  "mcpServers": {
369
246
  "dejared": {
370
247
  "command": "java",
371
- "args": ["-jar", "/path/to/dejared-mcp-0.2.0.jar"]
248
+ "args": ["-jar", "/path/to/dejared-mcp-<version>.jar"]
372
249
  }
373
250
  }
374
251
  }
@@ -376,6 +253,49 @@ If you prefer to run the server JAR directly without Node.js:
376
253
 
377
254
  </details>
378
255
 
256
+ ## Features
257
+
258
+ ### Discovery
259
+
260
+ Browse and read JAR contents.
261
+
262
+ | Tool | Description |
263
+ |------|-------------|
264
+ | `dejared_list_packages` | List all packages with class counts |
265
+ | `dejared_list_classes` | List classes in a specific package |
266
+ | `dejared_list_resources` | List non-class resource files |
267
+ | `dejared_read_resource` | Read text resources (YAML, XML, properties, JSON, and others) |
268
+
269
+ ### Hunting
270
+
271
+ Search inside JAR files.
272
+
273
+ | Tool | Description |
274
+ |------|-------------|
275
+ | `dejared_search_class` | Search classes by name |
276
+ | `dejared_search_string` | Search string literals in bytecode (URLs, SQL, error messages) |
277
+
278
+ ### Deep Analysis
279
+
280
+ Inspect metadata and decompile classes.
281
+
282
+ | Tool | Description |
283
+ |------|-------------|
284
+ | `dejared_get_metadata` | Extract class metadata via ASM (fast, no decompilation) |
285
+ | `dejared_dump_package_metadata` | Batch metadata extraction for entire packages |
286
+ | `dejared_decompile_class` | Decompile `.class` files to Java source code |
287
+
288
+ ## Decompiler Engines
289
+
290
+ dejared-mcp supports three decompiler engines. The engine can be
291
+ specified per request via the `dejared_decompile_class` tool.
292
+
293
+ | Engine | Description |
294
+ |--------|-------------|
295
+ | **CFR** (default) | Reliable general-purpose decompiler |
296
+ | **Vineflower** | Modern fork of FernFlower, handles newer Java features well |
297
+ | **Procyon** | Alternative engine, can handle some edge cases better |
298
+
379
299
  ## Custom Java Path
380
300
 
381
301
  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:
@@ -443,7 +363,7 @@ Java 17 or later. A JRE is sufficient; you do not need a full JDK.
443
363
 
444
364
  Yes. Download the JAR from GitHub Releases and run it directly
445
365
  with `java -jar`. See the "Pure Java" section under
446
- [Installation and Configuration](#installation-and-configuration).
366
+ [Install as an MCP server](#install-as-an-mcp-server).
447
367
 
448
368
  ## Contributing
449
369
 
@@ -455,17 +375,25 @@ Contributions are welcome. Please follow these guidelines:
455
375
  4. Open a pull request against `master` with a description of what
456
376
  the change does and why.
457
377
 
378
+ Every manifest listed under [Project Structure](#project-structure) carries a
379
+ `version` field, and CI fails the build if any of them drifts from
380
+ `package.json`. Bump them together.
381
+
458
382
  ### Project Structure
459
383
 
460
384
  ```
461
385
  dejared-mcp/
462
- ├── bin/ # Node.js CLI entry point
463
- ├── lib/ # Node.js wrapper (JAR download and process management)
464
- ├── java-mcp/ # Java MCP server (Spring Boot, Gradle)
386
+ ├── bin/ # Node.js CLI entry point
387
+ ├── lib/ # Node.js wrapper (JAR download and process management)
388
+ ├── java-mcp/ # Java MCP server (Spring Boot, Gradle)
465
389
  │ └── src/
466
- ├── skills/ # Claude Code plugin skills
467
- ├── package.json # npm package manifest
468
- └── server.json # MCP Registry manifest
390
+ ├── skills/ # Agent skills, shared by every plugin manifest below
391
+ ├── .mcp.json # MCP server definition, shared the same way
392
+ ├── .claude-plugin/ # Claude Code plugin + marketplace manifests
393
+ ├── .codex-plugin/ # Codex plugin manifest
394
+ ├── .agents/plugins/ # Codex marketplace manifest
395
+ ├── package.json # npm package manifest
396
+ └── server.json # MCP Registry manifest
469
397
  ```
470
398
 
471
399
  ### Building from Source
package/lib/jar-runner.js CHANGED
@@ -65,7 +65,7 @@ function resolveJava() {
65
65
  execFileSync("java", ["-version"], { stdio: "ignore" });
66
66
  return "java";
67
67
  } catch {
68
- log("Java not found. Set DEJARED_JAVA_PATH or install Java 21+.");
68
+ log("Java not found. Set DEJARED_JAVA_PATH or install Java 17+.");
69
69
  process.exit(1);
70
70
  }
71
71
  }
@@ -133,7 +133,7 @@ async function ensureJar() {
133
133
  }
134
134
  }
135
135
 
136
- /** Entry point – resolves Java, ensures the JAR is cached, then spawns it. */
136
+ /** Entry point: resolves Java, ensures the JAR is cached, then spawns it. */
137
137
  async function run() {
138
138
  const javaPath = resolveJava();
139
139
  await ensureJar();
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "dejared-mcp",
3
- "version": "1.0.1",
3
+ "version": "1.2.0",
4
4
  "mcpName": "io.github.hqkh4nh/dejared",
5
- "description": "Explore, analyze, and decompile Java JAR files via MCP",
5
+ "description": "Java decompiler MCP server for AI coding agents. Explore, search, and decompile JAR, WAR, EAR, and AAR bytecode with CFR, Vineflower, or Procyon.",
6
6
  "bin": {
7
7
  "dejared-mcp": "bin/dejared-mcp.js"
8
8
  },
@@ -11,6 +11,7 @@
11
11
  "lib/",
12
12
  "skills/",
13
13
  ".claude-plugin/",
14
+ ".codex-plugin/",
14
15
  ".mcp.json",
15
16
  "README.md",
16
17
  "LICENSE"
@@ -23,13 +24,25 @@
23
24
  },
24
25
  "keywords": [
25
26
  "mcp",
27
+ "mcp-server",
28
+ "model-context-protocol",
26
29
  "java",
27
- "jar",
30
+ "java-decompiler",
28
31
  "decompiler",
32
+ "decompile",
33
+ "jar",
34
+ "war",
35
+ "aar",
36
+ "class-file",
29
37
  "bytecode",
30
- "reverse-engineering"
38
+ "cfr",
39
+ "vineflower",
40
+ "procyon",
41
+ "reverse-engineering",
42
+ "claude-code",
43
+ "codex"
31
44
  ],
32
45
  "engines": {
33
- "node": ">=18"
46
+ "node": ">=20"
34
47
  }
35
48
  }
@@ -12,7 +12,7 @@ description: >
12
12
  `~/.m2/repository`, `~/.gradle/caches`, `build/libs/`, `target/`,
13
13
  `lib/`, and `libs/`. Prefer the dejared MCP tools over `jar tf`,
14
14
  `jar xf`, `unzip`, `javap -p`, `javap -c`, `javap -v`, or running a
15
- decompiler manually — even if the user doesn't explicitly ask for
15
+ decompiler manually, even if the user doesn't explicitly ask for
16
16
  "the dejared tools" or "decompilation".
17
17
  ---
18
18
 
@@ -20,7 +20,7 @@ description: >
20
20
 
21
21
  ## When This Skill Applies
22
22
 
23
- Reach for these tools — never the shell — whenever the task touches the **inside** of a Java artifact:
23
+ Reach for these tools, never the shell, whenever the task touches the **inside** of a Java artifact:
24
24
 
25
25
  | You would reach for... | Use this instead |
26
26
  |----------------------------------------------|--------------------------------------------------------|
@@ -52,8 +52,8 @@ Applies to `.jar`, `.war`, `.ear`, `.aar` and any artifact under `~/.m2/reposito
52
52
  ## Shared Rules
53
53
 
54
54
  - All tool calls require the **absolute path** to the JAR file.
55
- - Prefer these MCP tools over shelling out to jar/javap/unzip/strings or asking the user to decompile manually — structured output is faster and safer for the agent to consume.
56
- - Check metadata before decompiling — it often provides enough information without the cost of full decompilation.
55
+ - Prefer these MCP tools over shelling out to jar/javap/unzip/strings or asking the user to decompile manually. Structured output is faster and safer for the agent to consume.
56
+ - Check metadata before decompiling: it often provides enough information without the cost of full decompilation.
57
57
  - Default decompiler: CFR. If output is broken, try `vineflower` or `procyon`.
58
58
  - Report results in structured format.
59
59
 
@@ -61,21 +61,21 @@ Applies to `.jar`, `.war`, `.ear`, `.aar` and any artifact under `~/.m2/reposito
61
61
 
62
62
  ## Quick Use Cases
63
63
 
64
- **Quick Lookup** — find a class by name (`dejared_search_class`) or find a string in bytecode (`dejared_search_string`). One call, done.
64
+ **Quick Lookup**: find a class by name (`dejared_search_class`) or find a string in bytecode (`dejared_search_string`). One call, done.
65
65
 
66
- **Read Config** — `dejared_list_resources` to see what's in the JAR, then `dejared_read_resource` to read it (application.yml, pom.xml, logback.xml, etc.).
66
+ **Read Config**: `dejared_list_resources` to see what's in the JAR, then `dejared_read_resource` to read it (application.yml, pom.xml, logback.xml, etc.).
67
67
 
68
- **Get Signatures** — `dejared_get_metadata` for a single class, or `dejared_dump_package_metadata` for an entire package (accepts a list). Returns class hierarchy, annotations, fields, and method signatures without decompiling.
68
+ **Get Signatures**: `dejared_get_metadata` for a single class, or `dejared_dump_package_metadata` for an entire package (accepts a list). Returns class hierarchy, annotations, fields, and method signatures without decompiling.
69
69
 
70
70
  ---
71
71
 
72
72
  ## Workflows
73
73
 
74
- **Explore** — top-down JAR mapping:
74
+ **Explore**: top-down JAR mapping:
75
75
  `dejared_list_packages` → `dejared_list_classes` (use `recursive=true`) → `dejared_list_resources` → `dejared_read_resource` for configs → `dejared_dump_package_metadata` (batch all important packages in one call) → selective `dejared_decompile_class` only where method body logic is needed. If CFR output has issues, retry with `vineflower` or `procyon`.
76
76
 
77
- **Hunt** — search-driven investigation:
77
+ **Hunt**: search-driven investigation:
78
78
  Pick search tool (`dejared_search_class` or `dejared_search_string`) → triage results → `dejared_get_metadata` on promising matches → `dejared_decompile_class` only if needed.
79
79
 
80
- **Deep Analysis** — single class investigation:
80
+ **Deep Analysis**: single class investigation:
81
81
  `dejared_get_metadata` first → `dejared_decompile_class` (CFR default) → cross-reference with `dejared_search_class` or `dejared_dump_package_metadata` if needed. If CFR output has issues (broken lambdas, `goto` statements, missing method bodies), retry with `vineflower` (best for modern Java features like records, sealed classes, pattern matching) or `procyon` (handles some obfuscated/edge-case bytecode better).