dejared-mcp 1.0.0 → 1.1.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.
- package/.claude-plugin/marketplace.json +4 -4
- package/.claude-plugin/plugin.json +3 -3
- package/README.md +57 -176
- package/lib/jar-runner.js +2 -2
- package/package.json +5 -5
- package/skills/jar-analysis/SKILL.md +31 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dejared-mcp-marketplace",
|
|
3
3
|
"owner": {
|
|
4
|
-
"name": "
|
|
5
|
-
"email": "
|
|
4
|
+
"name": "hqkh4nh",
|
|
5
|
+
"email": "khanh@duck.com"
|
|
6
6
|
},
|
|
7
7
|
"metadata": {
|
|
8
8
|
"description": "MCP server and Claude Code plugin for exploring, analyzing, and decompiling Java JAR files"
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
"name": "dejared",
|
|
13
13
|
"source": "./",
|
|
14
14
|
"description": "Explore, analyze, and decompile Java JAR files with structured workflows.",
|
|
15
|
-
"version": "1.
|
|
15
|
+
"version": "1.1.0",
|
|
16
16
|
"author": {
|
|
17
|
-
"name": "
|
|
17
|
+
"name": "hqkh4nh"
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"keywords": ["java", "jar", "decompiler", "bytecode", "reverse-engineering", "mcp"],
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dejared",
|
|
3
3
|
"description": "Explore, analyze, and decompile Java JAR files with structured workflows.",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.1.0",
|
|
5
5
|
"author": {
|
|
6
|
-
"name": "
|
|
6
|
+
"name": "hqkh4nh"
|
|
7
7
|
},
|
|
8
|
-
"repository": "https://github.com/
|
|
8
|
+
"repository": "https://github.com/hqkh4nh/dejared-mcp",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"keywords": ["java", "jar", "decompiler", "bytecode", "reverse-engineering", "mcp"],
|
|
11
11
|
"mcpServers": {
|
package/README.md
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
[](https://www.npmjs.com/package/dejared-mcp)
|
|
2
|
-
[](LICENSE)
|
|
3
|
-
[]()
|
|
4
1
|
[]()
|
|
2
|
+
[]()
|
|
3
|
+
[](https://www.npmjs.com/package/dejared-mcp)
|
|
4
|
+
[](https://www.npmjs.com/package/dejared-mcp)
|
|
5
|
+
[](LICENSE)
|
|
5
6
|
|
|
6
7
|
# dejared-mcp
|
|
7
8
|
|
|
@@ -10,6 +11,9 @@ Designed for AI-powered development tools, dejared-mcp connects your IDE or CLI
|
|
|
10
11
|
to inspect package structures, search bytecode, and decompile classes
|
|
11
12
|
using CFR, Vineflower, or Procyon.
|
|
12
13
|
|
|
14
|
+
[](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)
|
|
15
|
+
[](cursor://anysphere.cursor-deeplink/mcp/install?name=dejared&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImRlamFyZWQtbWNwIl19)
|
|
16
|
+
|
|
13
17
|
## Table of Contents
|
|
14
18
|
|
|
15
19
|
- [Overview](#overview)
|
|
@@ -34,13 +38,16 @@ and deep analysis. AI assistants use these tools to navigate JAR file
|
|
|
34
38
|
structures, search for classes and string literals in bytecode, and
|
|
35
39
|
decompile `.class` files back to readable Java source code.
|
|
36
40
|
|
|
41
|
+
Any ZIP-based Java archive works: `.jar`, `.war`, `.ear`, `.aar`, and
|
|
42
|
+
Spring Boot fat-jars.
|
|
43
|
+
|
|
37
44
|
The npm package acts as a thin wrapper that downloads and caches the
|
|
38
45
|
server JAR on first run, then spawns it via `java -jar` using stdio
|
|
39
46
|
transport.
|
|
40
47
|
|
|
41
48
|
## Prerequisites
|
|
42
49
|
|
|
43
|
-
- **Node.js**
|
|
50
|
+
- **Node.js** 20 or later
|
|
44
51
|
- **Java** 17 or later (JRE is sufficient)
|
|
45
52
|
|
|
46
53
|
## Quick Start
|
|
@@ -106,8 +113,7 @@ specified per request via the `dejared_decompile_class` tool.
|
|
|
106
113
|
|
|
107
114
|
## Installation and Configuration
|
|
108
115
|
|
|
109
|
-
|
|
110
|
-
Expand the relevant section for tool-specific instructions.
|
|
116
|
+
Most clients accept this standard config:
|
|
111
117
|
|
|
112
118
|
```json
|
|
113
119
|
{
|
|
@@ -120,183 +126,82 @@ Expand the relevant section for tool-specific instructions.
|
|
|
120
126
|
}
|
|
121
127
|
```
|
|
122
128
|
|
|
123
|
-
|
|
124
|
-
<summary><strong>Amp</strong></summary>
|
|
125
|
-
|
|
126
|
-
Add via the Amp VS Code extension settings screen or by updating your `settings.json` file:
|
|
127
|
-
|
|
128
|
-
```json
|
|
129
|
-
"amp.mcpServers": {
|
|
130
|
-
"dejared": {
|
|
131
|
-
"command": "npx",
|
|
132
|
-
"args": ["-y", "dejared-mcp"]
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
**Amp CLI:**
|
|
129
|
+
If your tool has a CLI, one line is enough:
|
|
138
130
|
|
|
139
131
|
```bash
|
|
140
|
-
|
|
132
|
+
claude mcp add dejared -- npx -y dejared-mcp # Claude Code
|
|
133
|
+
codex mcp add dejared -- npx -y dejared-mcp # Codex
|
|
134
|
+
amp mcp add dejared -- npx -y dejared-mcp # Amp
|
|
135
|
+
gemini mcp add dejared npx -y dejared-mcp # Gemini CLI
|
|
141
136
|
```
|
|
142
137
|
|
|
143
|
-
|
|
138
|
+
### Where the config file lives
|
|
144
139
|
|
|
145
|
-
|
|
146
|
-
<summary><strong>Antigravity Editor</strong></summary>
|
|
140
|
+
Drop the standard config into the file for your tool:
|
|
147
141
|
|
|
148
|
-
|
|
142
|
+
| Tool | Location |
|
|
143
|
+
|------|----------|
|
|
144
|
+
| Claude Desktop | `%APPDATA%\Claude\claude_desktop_config.json` (Windows) · `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) |
|
|
145
|
+
| Claude Code | `.mcp.json` in the project root |
|
|
146
|
+
| Cursor | `.cursor/mcp.json` (project) · `~/.cursor/mcp.json` (global) |
|
|
147
|
+
| Windsurf | MCP servers panel in settings, or `mcpServers` in your settings file |
|
|
148
|
+
| Cline | MCP settings file, via the extension's MCP Servers panel |
|
|
149
|
+
| Antigravity Editor | `~/.gemini/antigravity/mcp_config.json` |
|
|
150
|
+
| Kiro | `.kiro/settings/mcp.json` |
|
|
151
|
+
| Copilot CLI | `~/.copilot/mcp-config.json`, or run `/mcp add` |
|
|
152
|
+
| Gemini CLI | `~/.gemini/settings.json` (global) · `.gemini/settings.json` (project) |
|
|
153
|
+
| Goose | Advanced settings → Extensions → Add custom extension, type `STDIO` |
|
|
154
|
+
| JetBrains IDEs | Settings → Tools → AI Assistant → Model Context Protocol (MCP) |
|
|
155
|
+
| Qodo Gen | Chat panel → Connect more tools → + Add new MCP |
|
|
149
156
|
|
|
150
|
-
|
|
151
|
-
{
|
|
152
|
-
"mcpServers": {
|
|
153
|
-
"dejared": {
|
|
154
|
-
"command": "npx",
|
|
155
|
-
"args": ["-y", "dejared-mcp"]
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
Or install through the MCP Store if available.
|
|
162
|
-
|
|
163
|
-
</details>
|
|
157
|
+
A few setups need more than the standard config — expand those below.
|
|
164
158
|
|
|
165
159
|
<details>
|
|
166
|
-
<summary><strong>
|
|
167
|
-
|
|
168
|
-
```bash
|
|
169
|
-
claude mcp add dejared -- npx -y dejared-mcp
|
|
170
|
-
```
|
|
171
|
-
|
|
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:
|
|
160
|
+
<summary><strong>Codex</strong> — TOML instead of JSON</summary>
|
|
175
161
|
|
|
176
162
|
```bash
|
|
177
|
-
|
|
178
|
-
|
|
163
|
+
codex mcp add dejared -- npx -y dejared-mcp
|
|
164
|
+
codex mcp list
|
|
179
165
|
```
|
|
180
166
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
<details>
|
|
184
|
-
<summary><strong>Claude Desktop</strong></summary>
|
|
185
|
-
|
|
186
|
-
Edit the Claude Desktop config file:
|
|
167
|
+
The `--` matters: everything after it is the server's launch command.
|
|
187
168
|
|
|
188
|
-
|
|
189
|
-
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
190
|
-
|
|
191
|
-
Add the standard config above and restart Claude Desktop.
|
|
192
|
-
|
|
193
|
-
</details>
|
|
194
|
-
|
|
195
|
-
<details>
|
|
196
|
-
<summary><strong>Cline</strong></summary>
|
|
197
|
-
|
|
198
|
-
Add the standard config above to your MCP settings file.
|
|
199
|
-
|
|
200
|
-
</details>
|
|
201
|
-
|
|
202
|
-
<details>
|
|
203
|
-
<summary><strong>Codex</strong></summary>
|
|
204
|
-
|
|
205
|
-
```bash
|
|
206
|
-
codex mcp add dejared npx "-y dejared-mcp"
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
Or edit `~/.codex/config.toml`:
|
|
169
|
+
Or edit `~/.codex/config.toml` (global) or `.codex/config.toml` (project):
|
|
210
170
|
|
|
211
171
|
```toml
|
|
212
172
|
[mcp_servers.dejared]
|
|
213
173
|
command = "npx"
|
|
214
174
|
args = ["-y", "dejared-mcp"]
|
|
175
|
+
|
|
176
|
+
# Only if Java is not on your PATH
|
|
177
|
+
[mcp_servers.dejared.env]
|
|
178
|
+
DEJARED_JAVA_PATH = "/path/to/java"
|
|
215
179
|
```
|
|
216
180
|
|
|
217
181
|
</details>
|
|
218
182
|
|
|
219
183
|
<details>
|
|
220
|
-
<summary><strong>Copilot
|
|
221
|
-
|
|
222
|
-
Interactive:
|
|
184
|
+
<summary><strong>VS Code (GitHub Copilot)</strong> — uses <code>servers</code>, not <code>mcpServers</code></summary>
|
|
223
185
|
|
|
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`:
|
|
186
|
+
Create or edit `.vscode/mcp.json`:
|
|
234
187
|
|
|
235
188
|
```json
|
|
236
189
|
{
|
|
237
|
-
"
|
|
190
|
+
"servers": {
|
|
238
191
|
"dejared": {
|
|
239
|
-
"type": "local",
|
|
240
192
|
"command": "npx",
|
|
241
|
-
"args": ["-y", "dejared-mcp"]
|
|
242
|
-
"tools": ["*"]
|
|
193
|
+
"args": ["-y", "dejared-mcp"]
|
|
243
194
|
}
|
|
244
195
|
}
|
|
245
196
|
}
|
|
246
197
|
```
|
|
247
198
|
|
|
248
|
-
|
|
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.
|
|
254
|
-
|
|
255
|
-
</details>
|
|
256
|
-
|
|
257
|
-
<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`
|
|
199
|
+
After saving, click **Start** above the server entry, then use Agent mode in Copilot Chat.
|
|
288
200
|
|
|
289
201
|
</details>
|
|
290
202
|
|
|
291
203
|
<details>
|
|
292
|
-
<summary><strong>
|
|
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>
|
|
204
|
+
<summary><strong>opencode</strong> — command is an array</summary>
|
|
300
205
|
|
|
301
206
|
Edit `~/.config/opencode/opencode.json`:
|
|
302
207
|
|
|
@@ -316,37 +221,13 @@ Edit `~/.config/opencode/opencode.json`:
|
|
|
316
221
|
</details>
|
|
317
222
|
|
|
318
223
|
<details>
|
|
319
|
-
<summary><strong>
|
|
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:
|
|
224
|
+
<summary><strong>Claude Code plugin</strong> — also installs the <code>/jar-analysis</code> skill</summary>
|
|
329
225
|
|
|
330
|
-
```
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
"dejared": {
|
|
334
|
-
"command": "npx",
|
|
335
|
-
"args": ["-y", "dejared-mcp"]
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
}
|
|
226
|
+
```bash
|
|
227
|
+
claude plugin marketplace add hqkh4nh/dejared-mcp
|
|
228
|
+
claude plugin install dejared@dejared-mcp-marketplace
|
|
339
229
|
```
|
|
340
230
|
|
|
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
231
|
</details>
|
|
351
232
|
|
|
352
233
|
<details>
|
|
@@ -354,11 +235,11 @@ Open Windsurf settings, navigate to MCP servers, and add a new server using the
|
|
|
354
235
|
|
|
355
236
|
If you prefer to run the server JAR directly without Node.js:
|
|
356
237
|
|
|
357
|
-
1. Download the latest JAR from [GitHub Releases](https://github.com/
|
|
238
|
+
1. Download the latest JAR from [GitHub Releases](https://github.com/hqkh4nh/dejared-mcp/releases).
|
|
358
239
|
|
|
359
240
|
2. Run it:
|
|
360
241
|
```bash
|
|
361
|
-
java -jar dejared-mcp
|
|
242
|
+
java -jar dejared-mcp-<version>.jar
|
|
362
243
|
```
|
|
363
244
|
|
|
364
245
|
3. Configure your MCP client to use the JAR directly instead of `npx`:
|
|
@@ -368,7 +249,7 @@ If you prefer to run the server JAR directly without Node.js:
|
|
|
368
249
|
"mcpServers": {
|
|
369
250
|
"dejared": {
|
|
370
251
|
"command": "java",
|
|
371
|
-
"args": ["-jar", "/path/to/dejared-mcp
|
|
252
|
+
"args": ["-jar", "/path/to/dejared-mcp-<version>.jar"]
|
|
372
253
|
}
|
|
373
254
|
}
|
|
374
255
|
}
|
|
@@ -477,7 +358,7 @@ cd java-mcp
|
|
|
477
358
|
|
|
478
359
|
### Reporting Issues
|
|
479
360
|
|
|
480
|
-
Open an issue on [GitHub Issues](https://github.com/
|
|
361
|
+
Open an issue on [GitHub Issues](https://github.com/hqkh4nh/dejared-mcp/issues)
|
|
481
362
|
with steps to reproduce the problem, your Java version, and your
|
|
482
363
|
Node.js version.
|
|
483
364
|
|
package/lib/jar-runner.js
CHANGED
|
@@ -42,7 +42,7 @@ function getCacheDir() {
|
|
|
42
42
|
|
|
43
43
|
const CACHE_DIR = getCacheDir();
|
|
44
44
|
const JAR_PATH = path.join(CACHE_DIR, JAR_NAME);
|
|
45
|
-
const DOWNLOAD_URL = `https://github.com/
|
|
45
|
+
const DOWNLOAD_URL = `https://github.com/hqkh4nh/dejared-mcp/releases/download/v${JAR_VERSION}/${JAR_NAME}`;
|
|
46
46
|
|
|
47
47
|
function log(msg) {
|
|
48
48
|
process.stderr.write(`[dejared-mcp] ${msg}\n`);
|
|
@@ -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
|
|
68
|
+
log("Java not found. Set DEJARED_JAVA_PATH or install Java 17+.");
|
|
69
69
|
process.exit(1);
|
|
70
70
|
}
|
|
71
71
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dejared-mcp",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"mcpName": "io.github.
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"mcpName": "io.github.hqkh4nh/dejared",
|
|
5
5
|
"description": "Explore, analyze, and decompile Java JAR files via MCP",
|
|
6
6
|
"bin": {
|
|
7
7
|
"dejared-mcp": "bin/dejared-mcp.js"
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"LICENSE"
|
|
17
17
|
],
|
|
18
18
|
"license": "MIT",
|
|
19
|
-
"author": "
|
|
19
|
+
"author": "hqkh4nh",
|
|
20
20
|
"repository": {
|
|
21
21
|
"type": "git",
|
|
22
|
-
"url": "https://github.com/
|
|
22
|
+
"url": "https://github.com/hqkh4nh/dejared-mcp"
|
|
23
23
|
},
|
|
24
24
|
"keywords": [
|
|
25
25
|
"mcp",
|
|
@@ -30,6 +30,6 @@
|
|
|
30
30
|
"reverse-engineering"
|
|
31
31
|
],
|
|
32
32
|
"engines": {
|
|
33
|
-
"node": ">=
|
|
33
|
+
"node": ">=20"
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -1,13 +1,40 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: jar-analysis
|
|
3
3
|
description: >
|
|
4
|
-
Explore, search, and decompile Java JAR
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
Explore, search, read, and decompile Java JAR, WAR, EAR, AAR, and
|
|
5
|
+
Spring Boot fat-jar files via the dejared MCP server. Use this skill
|
|
6
|
+
whenever the user references a `.jar` file path, asks what a
|
|
7
|
+
third-party Java library does, wants to read a config embedded in a
|
|
8
|
+
JAR (application.yml, spring.factories, MANIFEST.MF), needs class
|
|
9
|
+
metadata (superclass, annotations, method signatures), is chasing a
|
|
10
|
+
stack trace into a dependency without source, or is reverse-engineering
|
|
11
|
+
a plugin/mod/obfuscated artifact. Applies to artifacts in
|
|
12
|
+
`~/.m2/repository`, `~/.gradle/caches`, `build/libs/`, `target/`,
|
|
13
|
+
`lib/`, and `libs/`. Prefer the dejared MCP tools over `jar tf`,
|
|
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
|
|
16
|
+
"the dejared tools" or "decompilation".
|
|
7
17
|
---
|
|
8
18
|
|
|
9
19
|
# JAR Analysis
|
|
10
20
|
|
|
21
|
+
## When This Skill Applies
|
|
22
|
+
|
|
23
|
+
Reach for these tools — never the shell — whenever the task touches the **inside** of a Java artifact:
|
|
24
|
+
|
|
25
|
+
| You would reach for... | Use this instead |
|
|
26
|
+
|----------------------------------------------|--------------------------------------------------------|
|
|
27
|
+
| `jar tf some.jar` | `dejared_list_packages` / `dejared_list_classes` |
|
|
28
|
+
| `jar tf some.jar \| grep -v .class` | `dejared_list_resources` |
|
|
29
|
+
| `unzip -p some.jar application.yml` | `dejared_read_resource` |
|
|
30
|
+
| `jar tf some.jar \| grep -i FooBar` | `dejared_search_class` |
|
|
31
|
+
| `strings some.jar \| grep http` | `dejared_search_string` |
|
|
32
|
+
| `javap -p com.foo.Bar` | `dejared_get_metadata` |
|
|
33
|
+
| `javap -p` across a package | `dejared_dump_package_metadata` |
|
|
34
|
+
| Running CFR / Vineflower / Procyon manually | `dejared_decompile_class` |
|
|
35
|
+
|
|
36
|
+
Applies to `.jar`, `.war`, `.ear`, `.aar` and any artifact under `~/.m2/repository`, `~/.gradle/caches`, `build/libs/`, `target/`, `lib/`, or `libs/`. All calls need an **absolute path** to the archive.
|
|
37
|
+
|
|
11
38
|
## Available Tools
|
|
12
39
|
|
|
13
40
|
| Tool | Cost | Purpose |
|
|
@@ -25,6 +52,7 @@ description: >
|
|
|
25
52
|
## Shared Rules
|
|
26
53
|
|
|
27
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.
|
|
28
56
|
- Check metadata before decompiling — it often provides enough information without the cost of full decompilation.
|
|
29
57
|
- Default decompiler: CFR. If output is broken, try `vineflower` or `procyon`.
|
|
30
58
|
- Report results in structured format.
|