@creeperhost/modlens-mcp 1.6.0 → 1.6.4

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.
Files changed (135) hide show
  1. package/README.md +950 -938
  2. package/dist/cli.js +267 -267
  3. package/dist/db-backend.d.ts +14 -1
  4. package/dist/db-backend.d.ts.map +1 -1
  5. package/dist/db-backend.js +13 -0
  6. package/dist/db-backend.js.map +1 -1
  7. package/dist/generated/sqlite/internal/class.d.ts.map +1 -1
  8. package/dist/generated/sqlite/internal/class.js +5 -4
  9. package/dist/generated/sqlite/internal/class.js.map +1 -1
  10. package/dist/launcher.js +4 -1
  11. package/dist/launcher.js.map +1 -1
  12. package/dist/platform.d.ts.map +1 -1
  13. package/dist/platform.js +6 -2
  14. package/dist/platform.js.map +1 -1
  15. package/dist/repositories/embeddings-sqlite.js +21 -21
  16. package/dist/repositories/embeddings.js +28 -28
  17. package/dist/repositories/mod.d.ts +7 -0
  18. package/dist/repositories/mod.d.ts.map +1 -1
  19. package/dist/repositories/mod.js +56 -15
  20. package/dist/repositories/mod.js.map +1 -1
  21. package/dist/search-adapter.js +51 -51
  22. package/dist/security.d.ts +9 -0
  23. package/dist/security.d.ts.map +1 -1
  24. package/dist/security.js +19 -0
  25. package/dist/security.js.map +1 -1
  26. package/dist/server.js +1248 -1217
  27. package/dist/server.js.map +1 -1
  28. package/dist/tools/compat-check.js +9 -9
  29. package/dist/tools/docs.d.ts.map +1 -1
  30. package/dist/tools/docs.js +4 -3
  31. package/dist/tools/docs.js.map +1 -1
  32. package/dist/tools/embed-registry.js +9 -9
  33. package/dist/tools/graphify.js +14 -14
  34. package/dist/tools/ingest.d.ts.map +1 -1
  35. package/dist/tools/ingest.js +4 -3
  36. package/dist/tools/ingest.js.map +1 -1
  37. package/dist/tools/kubejs.d.ts.map +1 -1
  38. package/dist/tools/kubejs.js +2 -0
  39. package/dist/tools/kubejs.js.map +1 -1
  40. package/dist/tools/mappings.d.ts.map +1 -1
  41. package/dist/tools/mappings.js +2 -1
  42. package/dist/tools/mappings.js.map +1 -1
  43. package/dist/tools/mc-fts.js +2 -2
  44. package/dist/tools/mcmeta.js +2 -2
  45. package/dist/tools/mcmeta.js.map +1 -1
  46. package/dist/tools/mixin-scan.d.ts +1 -1
  47. package/dist/tools/mixin-scan.d.ts.map +1 -1
  48. package/dist/tools/mixin-scan.js +29 -35
  49. package/dist/tools/mixin-scan.js.map +1 -1
  50. package/dist/tools/mod-data.js +2 -2
  51. package/dist/tools/mod-data.js.map +1 -1
  52. package/dist/tools/modpacks-ch.js +2 -2
  53. package/dist/tools/modpacks-ch.js.map +1 -1
  54. package/dist/tools/packtools.js +4 -4
  55. package/dist/tools/packtools.js.map +1 -1
  56. package/dist/tools/primers.d.ts.map +1 -1
  57. package/dist/tools/primers.js +4 -3
  58. package/dist/tools/primers.js.map +1 -1
  59. package/dist/tools/reports.d.ts.map +1 -1
  60. package/dist/tools/reports.js +8 -4
  61. package/dist/tools/reports.js.map +1 -1
  62. package/dist/tools/vanilla-data.js +2 -2
  63. package/dist/tools/vanilla-data.js.map +1 -1
  64. package/dist/tools/version-diff.js +3 -3
  65. package/package.json +70 -62
  66. package/prisma/backends/schema.sqlite.prisma +215 -215
  67. package/prisma/schema.prisma +303 -303
  68. package/scripts/backup.mjs +151 -151
  69. package/scripts/check-atm10.mjs +27 -27
  70. package/scripts/check-sync.mjs +13 -13
  71. package/scripts/create-fts-index.mjs +50 -50
  72. package/scripts/enable-pgvector.mjs +90 -90
  73. package/scripts/enable-sqlite-vec.mjs +158 -158
  74. package/scripts/migrate-backend.mjs +188 -188
  75. package/scripts/migrate-embed-provenance.mjs +80 -80
  76. package/scripts/migrate-metadata-source.mjs +62 -62
  77. package/scripts/migrate-mod-source-files.mjs +67 -67
  78. package/scripts/post-update.mjs +77 -77
  79. package/scripts/verify-atm10.mjs +63 -63
  80. package/dist/access-flags.test.d.ts +0 -2
  81. package/dist/access-flags.test.d.ts.map +0 -1
  82. package/dist/access-flags.test.js +0 -189
  83. package/dist/access-flags.test.js.map +0 -1
  84. package/dist/fetch-utils.test.d.ts +0 -2
  85. package/dist/fetch-utils.test.d.ts.map +0 -1
  86. package/dist/fetch-utils.test.js +0 -133
  87. package/dist/fetch-utils.test.js.map +0 -1
  88. package/dist/mappings.test.d.ts +0 -2
  89. package/dist/mappings.test.d.ts.map +0 -1
  90. package/dist/mappings.test.js +0 -161
  91. package/dist/mappings.test.js.map +0 -1
  92. package/dist/processor.test.d.ts +0 -2
  93. package/dist/processor.test.d.ts.map +0 -1
  94. package/dist/processor.test.js +0 -629
  95. package/dist/processor.test.js.map +0 -1
  96. package/dist/search.test.d.ts +0 -2
  97. package/dist/search.test.d.ts.map +0 -1
  98. package/dist/search.test.js +0 -71
  99. package/dist/search.test.js.map +0 -1
  100. package/dist/security.test.d.ts +0 -2
  101. package/dist/security.test.d.ts.map +0 -1
  102. package/dist/security.test.js +0 -687
  103. package/dist/security.test.js.map +0 -1
  104. package/dist/tools/compat-check.test.d.ts +0 -2
  105. package/dist/tools/compat-check.test.d.ts.map +0 -1
  106. package/dist/tools/compat-check.test.js +0 -179
  107. package/dist/tools/compat-check.test.js.map +0 -1
  108. package/dist/tools/diagnostics.test.d.ts +0 -2
  109. package/dist/tools/diagnostics.test.d.ts.map +0 -1
  110. package/dist/tools/diagnostics.test.js +0 -168
  111. package/dist/tools/diagnostics.test.js.map +0 -1
  112. package/dist/tools/graphify.test.d.ts +0 -2
  113. package/dist/tools/graphify.test.d.ts.map +0 -1
  114. package/dist/tools/graphify.test.js +0 -39
  115. package/dist/tools/graphify.test.js.map +0 -1
  116. package/dist/tools/ingest.test.d.ts +0 -2
  117. package/dist/tools/ingest.test.d.ts.map +0 -1
  118. package/dist/tools/ingest.test.js +0 -340
  119. package/dist/tools/ingest.test.js.map +0 -1
  120. package/dist/tools/mod-tags.test.d.ts +0 -2
  121. package/dist/tools/mod-tags.test.d.ts.map +0 -1
  122. package/dist/tools/mod-tags.test.js +0 -75
  123. package/dist/tools/mod-tags.test.js.map +0 -1
  124. package/dist/tools/packtools.test.d.ts +0 -2
  125. package/dist/tools/packtools.test.d.ts.map +0 -1
  126. package/dist/tools/packtools.test.js +0 -99
  127. package/dist/tools/packtools.test.js.map +0 -1
  128. package/dist/tools/version-diff.test.d.ts +0 -2
  129. package/dist/tools/version-diff.test.d.ts.map +0 -1
  130. package/dist/tools/version-diff.test.js +0 -102
  131. package/dist/tools/version-diff.test.js.map +0 -1
  132. package/dist/validate.test.d.ts +0 -2
  133. package/dist/validate.test.d.ts.map +0 -1
  134. package/dist/validate.test.js +0 -73
  135. package/dist/validate.test.js.map +0 -1
package/README.md CHANGED
@@ -1,938 +1,950 @@
1
- # modlens-mcp
2
-
3
- MCP server and CLI for browsing, decompiling, and analyzing Minecraft mod JARs.
4
-
5
- Store mod metadata, class indexes, mixin targets, AT/AW entries, and decompiled source in a local PostgreSQL database. Query everything via AI (MCP) or command line (CLI).
6
-
7
- ## Installation
8
-
9
- ### Option A — npx (recommended, no clone required)
10
-
11
- ```bash
12
- npx @creeperhost/modlens-mcp
13
- ```
14
-
15
- On first run the setup wizard launches automaticallypick your database profile, configure Ollama (optional), and the wizard writes your MCP client config. Settings are stored in `~/.modlens/.env` and survive updates.
16
-
17
- **Reconfigure anytime:**
18
- ```bash
19
- npx @creeperhost/modlens-mcp --setup
20
- ```
21
-
22
- **Update to the latest version:**
23
- ```bash
24
- npx @creeperhost/modlens-mcp@latest --setup
25
- ```
26
- This re-runs the wizard and pins the new version in your MCP client config. Your database and settings in `~/.modlens/` are untouched.
27
-
28
- ---
29
-
30
- ### Option B git clone (for contributors / advanced users)
31
-
32
- ```bash
33
- git clone https://github.com/CreeperHost/modlens-mcp
34
- cd modlens-mcp
35
- npm install
36
- npm run setup # interactive setup wizard
37
- npm run start # start the server
38
- ```
39
-
40
- ---
41
-
42
- ## Prerequisites
43
-
44
- | Requirement | Notes |
45
- |-------------|-------|
46
- | **Node.js 22+** | Runtime for the MCP server |
47
- | **Docker** | Runs the PostgreSQL container via `docker compose` |
48
- | **JDK 21+** | Required for decompilation (Vineflower) and bytecode analysis (`javap`). Eclipse Adoptium recommended — auto-discovered at `C:/Program Files/Eclipse Adoptium`, `C:/Program Files/Java`, `C:/Program Files/Microsoft`, or via `JAVA_HOME` |
49
- | **Vineflower** | Decompiler JAR — **auto-downloaded** from Maven Central on first use |
50
- | **mcsrc-indexer.jar** | JAR bytecode indexer — **auto-downloaded** from the modlens-mcp GitHub release on first use |
51
-
52
- **Optional environment variables:**
53
-
54
- | Variable | Purpose |
55
- |----------|---------|
56
- | `CURSEFORGE_API_KEY` | CurseForge platform sync (`sync_curseforge` action) |
57
- | `MODRINTH_TOKEN` | Modrinth API increases rate limit for batch operations |
58
- | `JAVA_HOME` | Override Java discovery (falls back to PATH if not set) |
59
-
60
- ---
61
-
62
- ## Docker — PostgreSQL Setup
63
-
64
- The included `docker-compose.yml` starts a PostgreSQL 16 container on port **5433**.
65
-
66
- ```bash
67
- # Start (detached)
68
- docker compose up -d
69
-
70
- # Check it's healthy
71
- docker compose ps
72
-
73
- # Stop (data is preserved in the named volume)
74
- docker compose down
75
-
76
- # Stop and wipe all data
77
- docker compose down -v
78
- ```
79
-
80
- > **⚠ Dev credentials warning:** `docker-compose.yml` uses `modlens:modlens` as the username/password. This is fine for a local dev tool that only binds to `localhost:5433`. If you expose the port externally or run this on a shared machine, change `POSTGRES_USER`, `POSTGRES_PASSWORD`, and `POSTGRES_DB` in `docker-compose.yml` **and** update your `.env` accordingly.
81
-
82
- ---
83
-
84
- ## Setup
85
-
86
- ```bash
87
- git clone https://github.com/CreeperHost/modlens-mcp
88
- cd modlens-mcp
89
- npm install
90
- npm run build
91
-
92
- # Interactive setup wizard handles Docker, Ollama, schema, MCP config:
93
- npm run setup
94
- ```
95
-
96
- The wizard will ask about semantic search (Ollama), start the containers, apply the schema, optionally seed docs/primers, and write your MCP client config. Run it again any time to reconfigure.
97
-
98
- **Manual setup (if you prefer):**
99
-
100
- ```bash
101
- # 1. Start PostgreSQL
102
- docker compose up -d
103
-
104
- # 2. Create .env
105
- echo DATABASE_URL=postgresql://modlens:modlens@localhost:5433/modlens > .env
106
- # Optional — add a CurseForge key for sync_curseforge:
107
- # echo CURSEFORGE_API_KEY=<your key> >> .env
108
- # Optional add a Modrinth token for higher rate limits:
109
- # echo MODRINTH_TOKEN=<your token> >> .env
110
-
111
- # 3. Apply the Prisma schema to the DB
112
- npx prisma db push
113
-
114
- # 4. Build
115
- npm run build
116
- ```
117
-
118
- > **Note:** Both Vineflower and mcsrc-indexer.jar are downloaded automatically to `~/.modlens-cache/tools/` on first use — no manual steps needed.
119
-
120
- ---
121
-
122
- ## Semantic Search (optional)
123
-
124
- Semantic (vector) search lets you find docs, primers, and MC source by meaning rather than keywords — e.g. *"how do I attach data to a block?"* instead of the exact class name.
125
-
126
- **Requirements:** [Ollama](https://ollama.com) installed and running locally.
127
-
128
- ```bash
129
- # 1. Install Ollama and pull the embedding model
130
- ollama pull nomic-embed-text
131
-
132
- # 2. Enable pgvector in your Postgres container and add embedding columns
133
- npm run db:vector
134
-
135
- # 3. Add Ollama config to .env (optional — http://localhost:11434 is the default)
136
- echo OLLAMA_URL=http://localhost:11434 >> .env
137
-
138
- # 4. Embed all existing docs and primers
139
- node dist/cli.js backfill-embeddings
140
-
141
- # Embed a specific MC source version (large — takes a while)
142
- node dist/cli.js backfill-embeddings --type source --version 26.1.2
143
- ```
144
-
145
- After this, the `docs` and `primers` MCP tools will have a `semantic_search` action, and the `mc_source` tool will have `search_semantic` and `index_semantic`. Semantic search is **opt-in** — if `OLLAMA_URL` is not reachable, tools fall back to keyword search automatically.
146
-
147
- > **Note:** The `npm run db:vector` script is safe to re-run. It creates the `pgvector` extension and `embedding` columns using `IF NOT EXISTS` guards.
148
-
149
- ---
150
-
151
- ## MCP Configuration
152
-
153
- The server uses stdio transport it works with any MCP client (VS Code Copilot, Claude Desktop, Claude CLI, Cursor, etc.) as long as Docker is running and `DATABASE_URL` is set.
154
-
155
- ### VS Code Copilot (`mcp.json`)
156
-
157
- ```json
158
- {
159
- "servers": {
160
- "modlens": {
161
- "type": "stdio",
162
- "command": "node",
163
- "args": ["/path/to/modlens-mcp/dist/server.js"],
164
- "env": {
165
- "DATABASE_URL": "postgresql://modlens:modlens@localhost:5433/modlens"
166
- }
167
- }
168
- }
169
- }
170
- ```
171
-
172
- ### Claude Desktop (`claude_desktop_config.json`)
173
-
174
- Location: `%APPDATA%\Claude\claude_desktop_config.json` (Windows) or `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS)
175
-
176
- ```json
177
- {
178
- "mcpServers": {
179
- "modlens": {
180
- "command": "node",
181
- "args": ["/path/to/modlens-mcp/dist/server.js"],
182
- "env": {
183
- "DATABASE_URL": "postgresql://modlens:modlens@localhost:5433/modlens"
184
- }
185
- }
186
- }
187
- }
188
- ```
189
-
190
- ### Claude CLI
191
-
192
- ```bash
193
- claude mcp add modlens node /path/to/modlens-mcp/dist/server.js \
194
- --env DATABASE_URL=postgresql://modlens:modlens@localhost:5433/modlens
195
- ```
196
-
197
- Or manually edit `~/.claude/mcp.json` (same format as VS Code above).
198
-
199
- > **Important:** Replace `/path/to/modlens-mcp` with the actual absolute path where you cloned the repo. On Windows use forward slashes or escaped backslashes, e.g. `C:/Users/you/modlens-mcp/dist/server.js`.
200
-
201
- ---
202
-
203
- ## Updating
204
-
205
- ```bash
206
- npm run update
207
- ```
208
-
209
- This runs `git pull`, reinstalls dependencies, rebuilds, and applies any new DB migrations — all in one command. After it finishes, **restart your MCP client** (reload VS Code window, restart Claude Desktop, etc.) to pick up the new server build.
210
-
211
- > **First-time update (before `npm run update` existed)?** Run the steps manually once:
212
- > ```bash
213
- > git pull && npm install && npm run build && node scripts/post-update.mjs
214
- > ```
215
- > After this you'll have `npm run update` available for all future updates.
216
-
217
- ---
218
-
219
- ### 💡 Token overhead — disable tools you don't need
220
-
221
- ModLens ships **22 tools**. Every tool's name, description, and parameter schema is sent to the model on **every request**, whether you use that tool or not. This adds a fixed overhead of ~3,400 tokens per turn.
222
-
223
- **Recommendation:** disable any tool groups you don't regularly use. Common profiles:
224
-
225
- | If you primarily… | Keep | Disable |
226
- |---|---|---|
227
- | Browse vanilla MC source | `mc_source`, `mc_data`, `mc_files`, `mc_registry`, `mappings` | `platform`, `mixin_scan`, `gradle`, `kubejs`, `pack_tools` |
228
- | Analyze a modpack | `mod`, `mod_mixins`, `mixin_scan`, `reports`, `pack_tools` | `mc_files`, `mappings`, `docs`, `primers`, `gradle` |
229
- | Mod development | `mod`, `mod_bytecode`, `mc_source`, `mappings`, `docs`, `primers` | `pack_tools`, `kubejs`, `platform`, `mixin_scan` |
230
-
231
- **VS Code:** In `mcp.json` you can disable individual tools using the `disabled` list under the server entry:
232
- ```json
233
- {
234
- "servers": {
235
- "modlens": {
236
- "type": "stdio",
237
- "command": "node",
238
- "args": ["/path/to/modlens-mcp/dist/server.js"],
239
- "env": { "DATABASE_URL": "postgresql://modlens:modlens@localhost:5433/modlens" },
240
- "disabled": ["kubejs", "platform", "gradle", "docs", "primers"]
241
- }
242
- }
243
- }
244
- ```
245
-
246
- **Claude Desktop / CLI:** Toggle tools off in the MCP settings UI, or maintain separate config files for different workflows.
247
-
248
- ---
249
-
250
- ## CLI
251
-
252
- All MCP tools are available from the command line:
253
-
254
- ```
255
- node dist/cli.js <command> [args] [--flags]
256
- ```
257
-
258
- Run without arguments (or `--help`) to print the full command list. Every MCP tool action has a CLI equivalent.
259
-
260
- ### Quick Reference
261
-
262
- **Database & Catalog**
263
-
264
- | Command | Description |
265
- |---------|-------------|
266
- | `stats` | DB statistics |
267
- | `list` | List all mods |
268
- | `get <modId>` | Get mod metadata |
269
- | `search <query>` | Search mods |
270
- | `deps <modId>` | List dependencies |
271
- | `dep-graph` | Full dependency graph |
272
- | `version-conflicts` | Duplicate modIds + unsatisfied deps |
273
- | `source-urls [query]` | List GitHub/GitLab source URLs |
274
-
275
- **Ingest**
276
-
277
- | Command | Description |
278
- |---------|-------------|
279
- | `ingest <jarPath>` | Ingest a mod JAR (WSL paths auto-converted) |
280
- | `ingest-neoforge <version>` | Download + ingest NeoForge |
281
- | `ingest-fabric-api <version>` | Download + ingest Fabric API |
282
- | `batch-ingest <dir>` | Ingest all JARs in a directory |
283
- | `batch-decompile` | Decompile all un-decompiled mods |
284
- | `batch-sync` | Bulk sync from Modrinth/CurseForge |
285
- | `reindex` | Index class names for un-indexed mods |
286
-
287
- **Decompile & Source**
288
-
289
- | Command | Description |
290
- |---------|-------------|
291
- | `decompile <dbId>` | Decompile entire mod JAR |
292
- | `decompile-status <dbId>` | Poll decompilation progress |
293
- | `decompile-class <dbId> <class>` | Decompile a single class |
294
- | `source <dbId> [path]` | Browse decompiled source |
295
- | `search-source <query>` | Search decompiled source |
296
- | `get-paths <dbId>` | JAR + decomp paths for native grep |
297
- | `index-fts <dbId>` | Index mod source for BM25 search (no Ollama) |
298
- | `search-indexed <dbId> <query>` | Fast BM25 FTS over mod source |
299
-
300
- **Bytecode Analysis**
301
-
302
- | Command | Description |
303
- |---------|-------------|
304
- | `search-class <dbId> <query>` | Search for a class by name |
305
- | `members <dbId> <class>` | List methods and fields |
306
- | `bytecode <dbId> <class>` | Raw javap bytecode |
307
- | `refs <dbId> <target>` | Find references |
308
- | `inheritance <dbId> <class>` | Inheritance chain |
309
- | `diff <dbIdA> <dbIdB>` | Compare two mod versions |
310
- | `diff-detailed <dbIdA> <dbIdB>` | AST-level diff with breaking-change flags |
311
- | `cross-refs <target>` | Cross-mod references to a target |
312
- | `find-implementors <target>` | Classes implementing an interface |
313
- | `scan-registrations <dbId>` | Registry object registrations |
314
- | `annotated-by <annotation>` | Classes with a given annotation |
315
- | `event-listeners <event>` | Event listener registrations |
316
- | `optional-integrations <dbId>` | Soft dependency integrations |
317
- | `network-payloads <dbId>` | Network packet types |
318
- | `config-schema <dbId>` | Configuration class schemas |
319
-
320
- **Mixin Analysis**
321
-
322
- | Command | Description |
323
- |---------|-------------|
324
- | `mixin-targets <modId>` | MC classes this mod injects into |
325
- | `resolve-mixins <dbId>` | Parse `@Mixin` bytecode → update DB |
326
- | `mixin-conflicts <targetClass>` | Mods injecting into the same class |
327
- | `at-entries <dbId>` | Access Transformer entries |
328
- | `aw-entries <dbId>` | Access Widener entries |
329
- | `targets-in-package <pkg>` | Mods targeting classes in a package |
330
- | `at-conflicts` | AT/AW entries conflicting across mods |
331
- | `batch-resolve-mixins` | Resolve `@Mixin` targets for all mods |
332
-
333
- **Mixin Scan (cross-mod matrix)**
334
-
335
- | Command | Description |
336
- |---------|-------------|
337
- | `mixin-scan list` | List mods with mixins |
338
- | `mixin-scan conflict-matrix` | Full conflict matrix |
339
- | `mixin-scan class-detail <class>` | All mixins targeting one MC class |
340
- | `mixin-scan hotspots` | Most-targeted MC classes |
341
- | `mixin-scan batch-resolve` | Resolve targets for all mixin mods |
342
-
343
- **Platform**
344
-
345
- | Command | Description |
346
- |---------|-------------|
347
- | `sync-modrinth <dbId>` | Look up on Modrinth |
348
- | `sync-curseforge <dbId>` | Look up on CurseForge |
349
- | `check-updates <dbId>` | Check for newer versions |
350
- | `download-source <dbId>` | Download GitHub/GitLab source |
351
-
352
- **Versions**
353
-
354
- | Command | Description |
355
- |---------|-------------|
356
- | `mc-versions` | List Minecraft versions |
357
- | `neoforge-versions` | List NeoForge versions |
358
- | `fabric-api-versions` | List Fabric API versions |
359
-
360
- **Vanilla MC Source**
361
-
362
- | Command | Description |
363
- |---------|-------------|
364
- | `mc-source search-class <ver> <q>` | Find a vanilla class by name |
365
- | `mc-source get-source <ver> <class>` | Read decompiled source |
366
- | `mc-source bytecode <ver> <class>` | Raw javap bytecode |
367
- | `mc-source class-members <ver> <c>` | Methods and fields |
368
- | `mc-source find-refs <ver> <target>` | References to a target |
369
- | `mc-source inheritance <ver> <c>` | Inheritance tree |
370
- | `mc-source diff <verA> <verB>` | High-level class diff |
371
- | `mc-source diff-detailed <A> <B>` | AST-level method/field diff |
372
- | `mc-source decompile <ver>` | Decompile MC JAR |
373
- | `mc-source decompile-status <ver>` | Poll decompilation progress |
374
- | `mc-source search-code <ver> <q>` | Full-text search over vanilla source |
375
- | `mc-source index <ver>` | Index vanilla source for BM25 |
376
- | `mc-source search-indexed <ver> <q>` | BM25 FTS over vanilla source |
377
- | `mc-source search-events <ver>` | Browse event classes |
378
- | `mc-source validate-aw <ver> <file>` | Validate an `.accesswidener` file |
379
- | `mc-source analyze-mixin <ver> <file>` | Analyze a mixin source file |
380
- | `mc-source search-semantic <ver> <q>` | Semantic search (requires Ollama) |
381
- | `mc-source get-paths <ver>` | On-disk jar/decomp/index paths |
382
-
383
- **Mappings**
384
-
385
- | Command | Description |
386
- |---------|-------------|
387
- | `mappings find <sym> <ver> <src> <tgt>` | Translate between namespaces |
388
- | `mappings remap <in> <out> <ver> <mapping>` | Remap a JAR |
389
- | `mappings parchment <class> <mcVer>` | Parchment parameter docs |
390
- | `mappings list-parchment <mcVer>` | Available Parchment versions |
391
- | `mappings parchment-summary <mcVer>` | Parchment coverage stats |
392
-
393
- **Documentation & Primers**
394
-
395
- | Command | Description |
396
- |---------|-------------|
397
- | `docs seed` | Seed built-in docs |
398
- | `docs get <query>` | Look up by title/class |
399
- | `docs search <query>` | Keyword search |
400
- | `docs list` | List all entries |
401
- | `docs delete <id>` | Delete by ID |
402
- | `docs semantic-search <query>` | Semantic search (requires Ollama) |
403
- | `primers seed` | Seed built-in primers |
404
- | `primers get <id>` | Get by ID |
405
- | `primers by-version <from> <to>` | Guides for a version range |
406
- | `primers search <query>` | Keyword search |
407
- | `primers list` | List all primers |
408
- | `primers delete <id>` | Delete by ID |
409
- | `primers semantic-search <query>` | Semantic search (requires Ollama) |
410
-
411
- **MC Registry / Data / Files**
412
-
413
- | Command | Description |
414
- |---------|-------------|
415
- | `mc-registry <action>` | blocks, commands, registries, sounds, item-components, registry-entries, mcmeta-versions |
416
- | `mc-data <action>` | tags, find-tags-for, recipes, get-recipe, biomes, enchantments, lang, model, structures, particles, entity-attributes, and more |
417
- | `mc-files <action>` | get-data, get-asset, list-files, diff, atlas, raw, compare, changelog |
418
-
419
- **Mod JAR & Mod Data**
420
-
421
- | Command | Description |
422
- |---------|-------------|
423
- | `mod-jar <action> <modId>` | list-files, get-file, lang, sounds, atlas, registry-entries, manifest, list-configs, get-config |
424
- | `mod-data <action> <modId>` | list, get, diff, trace-item — with type: recipe, loot_table, advancement, model, biome, data_tag, enchantment, and more |
425
-
426
- **Mod Tags, Gradle, Reports, Pack Tools**
427
-
428
- | Command | Description |
429
- |---------|-------------|
430
- | `mod-tags <action>` | index, index-all, namespaces, contributors, expand, mod-list, find-conflicts, search |
431
- | `gradle <action>` | get-files, search, compare-deps |
432
- | `report <type>` | mixin-conflicts, tag-conflicts, version-conflicts, mod-overview, gradle-deps, pack-compat, dep-graph, sidedness, mod-complexity, pack-changelog |
433
- | `pack-tools <action>` | asset-conflicts, vanilla-overrides, sidedness, pack-sidedness, complexity, pack-changelog, data-conflicts |
434
-
435
- **KubeJS & Modpacks**
436
-
437
- | Command | Description |
438
- |---------|-------------|
439
- | `kubejs index <dir>` | Index a kubejs/ scripts directory |
440
- | `kubejs search <dir> <query>` | Search indexed scripts |
441
- | `modpacks search <query>` | Search modpacks.ch packs |
442
- | `modpacks featured` | Featured packs |
443
- | `modpacks info <packId>` | Pack metadata |
444
- | `modpacks manifest <packId> <verId>` | Pack manifest |
445
- | `modpacks list-versions` | Pack version list |
446
- | `modpacks list-files` | Pack file list |
447
- | `modpacks ftb-mod-info <modId>` | FTB mod info |
448
- | `modpacks find-mod` | Find a mod across packs |
449
-
450
- **Diagnostics**
451
-
452
- | Command | Description |
453
- |---------|-------------|
454
- | `crash-log <logPath>` | Analyze a crash log file |
455
- | `missing-deps` | Find unsatisfied declared dependencies |
456
- | `compat-check <jarPath>` | Pre-flight compatibility check |
457
-
458
- **Semantic Search (requires Ollama)**
459
-
460
- | Command | Description |
461
- |---------|-------------|
462
- | `backfill-embeddings` | Embed docs + primers |
463
- | `backfill-embeddings --type=source --version=<ver>` | Embed MC source |
464
- | `backfill-embeddings --type=mod --db-id=<n>` | Embed mod source |
465
-
466
- ---
467
-
468
- ## MCP Tools Reference
469
-
470
- All tool actions have been consolidated into **24 grouped tools** to stay within MCP client tool-count limits. Each tool takes a required `action` parameter that selects the operation, plus optional params specific to that action.
471
-
472
- ### Tool Index
473
-
474
- | # | Tool | Actions | Description |
475
- |---|------|---------|-------------|
476
- | 1 | `mod` | 22 | Mod DB, decompile, source, FTS/semantic search |
477
- | 2 | `mod_bytecode` | 16 | Mod JAR class/bytecode analysis |
478
- | 3 | `mod_mixins` | 7 | Mixin targets, AT/AW entries, package scan |
479
- | 4 | `platform` | 5 | Modrinth/CurseForge sync |
480
- | 5 | `mc_versions` | 5 | MC + loader version listing/ingest |
481
- | 6 | `mc_source` | 19 | Vanilla MC source, decompile, validate |
482
- | 7 | `mappings` | 5 | Name mappings + Parchment |
483
- | 8 | `docs` | 8 | Documentation CRUD + semantic search |
484
- | 9 | `primers` | 9 | Version migration guides + semantic search |
485
- | 10 | `mc_registry` | 7 | MC registries, blocks, commands, sounds |
486
- | 11 | `mc_data` | 23 | Vanilla data browser (tags, recipes, biomes, …) |
487
- | 12 | `mc_files` | 8 | MC file access via misode/mcmeta |
488
- | 13 | `mod_jar` | 9 | Mod JAR file browser, lang, sounds, configs |
489
- | 14 | `mod_data` | list+get × 22 types | Mod structured data (recipes, loot tables, …) |
490
- | 15 | `mod_tags` | 8 | Cross-mod tag indexing + conflict detection |
491
- | 16 | `mixin_scan` | 5 | Cross-mod mixin conflict analysis |
492
- | 17 | `gradle` | 3 | Gradle build file analysis |
493
- | 18 | `reports` | 10 report types | Markdown report generation |
494
- | 19 | `pack_tools` | 7 | Modpack asset/data conflict analysis |
495
- | 20 | `kubejs` | 2 | KubeJS script indexing + search |
496
- | 21 | `modpacks_ch` | 12 | modpacks.ch / FTB / CurseForge pack browsing |
497
- | 22 | `analyze_crash_log` | | Triage crash logs against mod class index |
498
- | 23 | `find_missing_deps` | | Find mods with missing declared dependencies |
499
- | 24 | `check_mod_compat` | | Pre-flight compatibility check for a candidate JAR |
500
-
501
- ---
502
-
503
- ### 1. `mod` Mod Database, Decompile & Source
504
-
505
- | action | Key params | Description |
506
- |--------|-----------|-------------|
507
- | `ingest` | jarPath, skipSource | Add a JAR to the database. Accepts Windows paths (`C:\mods\foo.jar`) and WSL paths (`/mnt/c/mods/foo.jar`) |
508
- | `list` | loader, mcVersion, hasMixins, decompiled, limit | List mods |
509
- | `get` | modId | Full metadata for a mod |
510
- | `search` | query, loader, mcVersion, limit | Search by name/description |
511
- | `stats` | — | DB statistics |
512
- | `dependencies` | modId, recursive | Dependency list |
513
- | `dep_graph` | mcVersion | Full requires/requiredBy graph |
514
- | `version_conflicts` | — | Detect duplicate modIds + unsatisfied deps |
515
- | `source_urls` | query | GitHub/GitLab URLs from manifests |
516
- | `decompile` | dbId, force | Bulk decompile JAR via Vineflower (background) |
517
- | `decompile_status` | dbId | Poll background decompile job |
518
- | `decompile_class` | dbId, className | Decompile a single class on demand |
519
- | `source` | dbId, path | Browse or read decompiled source tree |
520
- | `search_source` | query, dbId?, isRegex, limit | Text/regex search across decompiled source — omit `dbId` to search **all** decompiled mods (results include `modId` + `modVersion`) |
521
- | `reindex` | dbId? | Re-index class names |
522
- | `batch_ingest` | directory, skipSource, indexClasses, replace | Ingest all JARs in a directory. `replace=true` deletes any existing DB row for the same `modId` before inserting — keeps DB in sync with disk |
523
- | `batch_decompile` | — | Decompile all not-yet-decompiled mods with concurrency control |
524
- | `index_fts` | dbId | Index decompiled mod source into BM25/FTS. Works for all loaders — NeoForge, Fabric, Forge, Quilt. **No Ollama required.** |
525
- | `search_indexed` | dbId, query, limit? | Fast BM25-ranked FTS search over indexed mod source |
526
- | `index_semantic` | dbId, batchSize? | Embed decompiled source into pgvector (batched, resumable — requires Ollama). Also populates FTS index as a side-effect. |
527
- | `search_semantic` | dbId, query, limit? | Semantic source search using Ollama + pgvector (requires Ollama) |
528
- | `get_paths` | dbId | Return `jarPath`, `decompPath` (null if not yet decompiled), and `cacheRoot` so the agent can grep/search files natively |
529
-
530
- ### 2. `mod_bytecode` Mod JAR Class Analysis
531
-
532
- | action | Key params | Description |
533
- |--------|-----------|-------------|
534
- | `search_class` | dbId, query | Find class by name (CamelCase/prefix/substring) |
535
- | `class_members` | dbId, className | Methods/fields with mixin targets, AT/AW strings |
536
- | `bytecode` | dbId, className | Raw `javap` output |
537
- | `find_refs` | dbId, target | All classes referencing a class/method/field |
538
- | `inheritance` | dbId, className | Superclass, interfaces, subclasses |
539
- | `diff` | dbIdA, dbIdB | Added/removed classes between two versions |
540
- | `find_implementors` | target, modId?, limit | Find mod classes extending/implementing a target across DB |
541
-
542
- ### 3. `mod_mixins` — Mixin & Access Transformer Analysis
543
-
544
- | action | Key params | Description |
545
- |--------|-----------|-------------|
546
- | `targets` | modId | MC classes a mod injects into |
547
- | `resolve` | dbId | Parse `@Mixin` bytecode update DB |
548
- | `conflicts` | targetClass | All mods injecting into the same MC class |
549
- | `at_entries` | dbId | NeoForge/Forge AT entries |
550
- | `aw_entries` | dbId | Fabric/Quilt AW entries |
551
-
552
- ### 4. `platform` Modrinth/CurseForge Sync
553
-
554
- | action | Key params | Description |
555
- |--------|-----------|-------------|
556
- | `sync_modrinth` | dbId | SHA-512 lookup → store project ID + source URL |
557
- | `sync_curseforge` | dbId | Murmur2 fingerprint lookup (needs `CURSEFORGE_API_KEY`) |
558
- | `check_updates` | dbId | Check both platforms for newer version |
559
- | `batch_sync` | syncModrinth, syncCurseforge, downloadSources, modIdFilter, limit | Bulk sync all unmatched mods |
560
- | `download_source` | dbId | Download GitHub/GitLab source ZIP |
561
-
562
- ### 5. `mc_versions` Loader Version Management
563
-
564
- | action | Key params | Description |
565
- |--------|-----------|-------------|
566
- | `list_mc` | type=release\|snapshot\|all | MC versions from Mojang Piston Meta |
567
- | `list_neoforge` | mcVersion, limit | NeoForge versions from Maven |
568
- | `list_fabric` | mcVersion, limit | Fabric API versions from Modrinth |
569
- | `ingest_neoforge` | version, skipIndex | Download + ingest a NeoForge JAR |
570
- | `ingest_fabric` | version, skipIndex | Download + ingest a Fabric API JAR |
571
-
572
- ### 6. `mc_source` Vanilla MC Source & Validation
573
-
574
- | action | Key params | Description |
575
- |--------|-----------|-------------|
576
- | `search_class` | version, query | Find class by name |
577
- | `get_source` | version, className, startLine, endLine, maxLines | Read decompiled source |
578
- | `bytecode` | version, className | Raw `javap` output |
579
- | `class_members` | version, className | Methods/fields with mixin target strings |
580
- | `find_refs` | version, target | Classes referencing a target |
581
- | `inheritance` | version, className | Superclass/interfaces/subclasses |
582
- | `diff` | versionA, versionB | Added/removed classes between MC versions |
583
- | `decompile` | version, force | Bulk decompile MC JAR (background) |
584
- | `decompile_status` | version | Poll bulk decompile job |
585
- | `search_code` | version, query, searchType, isRegex, limit | Regex/text search across MC source |
586
- | `index` | version, force | Index decompiled MC into PostgreSQL FTS |
587
- | `search_indexed` | version, query, limit | Fast FTS search |
588
- | `search_events` | version, query?, modloader? | Find Event subclasses in decompiled source |
589
- | `validate_aw` | content, mcVersion | Validate Access Widener against MC JAR |
590
- | `analyze_mixin` | source, mcVersion | Parse + validate a Mixin class |
591
-
592
- ### 7. `mappings` Name Mappings & Parchment
593
-
594
- | action | Key params | Description |
595
- |--------|-----------|-------------|
596
- | `find` | symbol, version, sourceNs, targetNs | Translate between official/intermediary/yarn/mojmap |
597
- | `remap` | inputJar, outputJar, version, toMapping | Remap mod JAR using TinyRemapper |
598
- | `parchment` | className, mcVersion | Community parameter names/javadocs for a class |
599
- | `list_parchment` | mcVersion | Available Parchment builds |
600
- | `parchment_summary` | mcVersion | Parchment coverage summary |
601
-
602
- ### 8. `docs` Documentation Database
603
-
604
- | action | Key params | Description |
605
- |--------|-----------|-------------|
606
- | `ingest` | entries[] | Add/update doc entries |
607
- | `seed` | — | Populate built-in defaults |
608
- | `get` | query | Look up by class name or keyword |
609
- | `search` | query, category, namespace | Full-text search |
610
- | `list` | category, namespace, tag, limit | List all entries |
611
- | `delete` | id | Remove by DB id |
612
-
613
- ### 9. `primers` — Version Migration Guides
614
-
615
- | action | Key params | Description |
616
- |--------|-----------|-------------|
617
- | `ingest` | entries[] | Add migration guide entries |
618
- | `seed` | | Populate built-in NeoForge/Forge/Fabric guides |
619
- | `get` | id | Get primer by DB id |
620
- | `by_version` | fromVersion, toVersion, modloader | All guides covering a version span |
621
- | `search` | query, modloader, fromVersion, toVersion, limit | Full-text search |
622
- | `list` | modloader, limit | List all primers |
623
- | `delete` | id | Remove by DB id |
624
-
625
- ### 10. `mc_registry` — MC Registry & Meta Data
626
-
627
- | action | Key params | Description |
628
- |--------|-----------|-------------|
629
- | `blocks` | version | Block state property definitions |
630
- | `commands` | version | Full Brigadier command tree |
631
- | `registries` | version, registry? | All registry keys, or entries for one registry |
632
- | `sounds` | version | sounds.json all sound events |
633
- | `item_components` | version | Data-driven item component definitions |
634
- | `registry_entries` | registry, version | Full entry list from registries branch |
635
- | `mcmeta_versions` | filter=release\|snapshot\|all | All MC versions tracked by misode/mcmeta |
636
-
637
- ### 11. `mc_data` — Vanilla Data Browser
638
-
639
- | action | Key params | Description |
640
- |--------|-----------|-------------|
641
- | `tags` | version, registry, tagId, namespace | Browse vanilla tags |
642
- | `find_tags_for` | entry, registry, version, namespace | Reverse tag lookup |
643
- | `recipes` | version, type, outputItem | List recipes |
644
- | `get_recipe` | recipeId, version | Recipe JSON |
645
- | `find_recipes_for` | item, version | Reverse recipe lookup by output item |
646
- | `loot_tables` | version, category | List loot tables |
647
- | `get_loot_table` | path, version | Loot table JSON |
648
- | `lang` | version, filter, limit | Search en_us.json |
649
- | `blockstate` | block, version | Blockstate variant/model mapping |
650
- | `model` | modelPath, version, resolveParents | Model JSON with parent chain |
651
- | `model_tree` | modelPath, version | Full model inheritance with merged textures |
652
- | `biomes` | version | List all biomes |
653
- | `get_biome` | biomeId, version | Biome worldgen JSON |
654
- | `damage_types` | version | All damage types with JSON |
655
- | `enchantments` | version | List all enchantments |
656
- | `get_enchantment` | id, version | Enchantment JSON |
657
- | `advancements` | version, category | List advancements |
658
- | `get_advancement` | id, version | Advancement JSON |
659
- | `structures` | version | List worldgen structures |
660
- | `get_structure` | id, version | Structure JSON |
661
- | `particles` | version | List particle types |
662
- | `get_particle` | id, version | Particle description JSON |
663
- | `entity_attributes` | entity, version, modId? | Default attributes for vanilla or modded entity |
664
-
665
- ### 12. `mc_files` MC File Access (misode/mcmeta)
666
-
667
- | action | Key params | Description |
668
- |--------|-----------|-------------|
669
- | `get_data` | filePath, version, jsonOnly | Fetch a data pack file |
670
- | `get_asset` | filePath, version, jsonOnly | Fetch a resource pack file |
671
- | `list_files` | dirPath, version, branch | List files in a directory |
672
- | `diff` | filePath, versionA, versionB, branch | Compare a file between two MC versions |
673
- | `atlas` | version, atlas? | Texture atlas definitions |
674
- | `raw` | ref, filePath | Fetch any file by git ref + path |
675
- | `compare` | versionA, versionB, branch | GitHub compare API between two MC versions |
676
- | `changelog` | version, branch | Files changed in a specific MC version |
677
-
678
- ### 13. `mod_jar` — Mod JAR File & Registry Access
679
-
680
- | action | Key params | Description |
681
- |--------|-----------|-------------|
682
- | `list_files` | modId, prefix? | List JAR contents under an optional path prefix |
683
- | `get_file` | modId, path | Read any file from the JAR |
684
- | `lang` | modId, filter, limit | Translation strings from en_us.json |
685
- | `sounds` | modId, namespace? | sounds.json registered sound events |
686
- | `atlas` | modId, atlas?, namespace? | Texture atlas JSON |
687
- | `registry_entries` | modId, type, filter, limit | Items/blocks/entities via lang key inspection no decompilation needed |
688
-
689
- ### 14. `mod_data` — Mod Structured Data
690
-
691
- `action=list` or `action=get` combined with a `type` parameter:
692
-
693
- | type | list returns | get returns |
694
- |------|-------------|-------------|
695
- | `recipe` | All recipe ids | Recipe JSON |
696
- | `loot_table` | All loot table ids | Loot table JSON |
697
- | `advancement` | All advancement ids | Advancement JSON |
698
- | `blockstate` | All blockstate files | Blockstate JSON |
699
- | `model` | All model files | Model JSON |
700
- | `biome` | All biome ids | Biome JSON |
701
- | `structure` | All structure ids | Structure JSON |
702
- | `data_tag` | All tag files (+ registry param) | Tag entries JSON |
703
- | `particle` | All particle ids | Particle JSON |
704
- | `damage_type` | All damage type ids | Damage type JSON |
705
- | `enchantment` | All enchantment ids | Enchantment JSON |
706
-
707
- Common params: `modId` (required), `namespace` (optional scope), `filter` (list), `id` (get), `modelPath` (get model), `registry` (data_tag only).
708
-
709
- ### 15. `mod_tags` Cross-Mod Tag Analysis
710
-
711
- | action | Key params | Description |
712
- |--------|-----------|-------------|
713
- | `index` | modId | Scan + index tag files for one mod |
714
- | `index_all` | | Scan + index tags for all mods |
715
- | `namespaces` | — | All tag namespaces + registries present |
716
- | `contributors` | tagPath, registry? | Every mod contributing to a tag path |
717
- | `mod_list` | modId, registry? | All tags a specific mod registers |
718
- | `find_conflicts` | registry? | replace:true conflicts across mods |
719
- | `search` | query, registry, limit | Substring search across tag paths |
720
-
721
- ### 16. `mixin_scan` — Cross-Mod Mixin Conflict Analysis
722
-
723
- | action | Key params | Description |
724
- |--------|-----------|-------------|
725
- | `list_mods` | loader, mcVersion | All mixin mods with target class lists |
726
- | `conflict_matrix` | loader, mcVersion, minConflicts | Classes targeted by 2+ mods |
727
- | `class_detail` | targetClass | Every mod injecting into one class |
728
- | `hotspots` | top, loader | Top-N most contested classes |
729
- | `batch_resolve` | loader, mcVersion | Resolve @Mixin targets for all mixin mods |
730
-
731
- ### 17. `gradle` Gradle Build File Analysis
732
-
733
- | action | Key params | Description |
734
- |--------|-----------|-------------|
735
- | `get_files` | modId | Parsed build.gradle with deps, plugins, repos |
736
- | `search` | query, modIdFilter, limit | Cross-mod grep with context |
737
- | `compare_deps` | groupFilter, modIdFilter | Dependency comparison version conflicts, embed vs compileOnly |
738
-
739
- ### 18. `reports` Markdown Report Generation
740
-
741
- | report | Key params | Description |
742
- |--------|-----------|-------------|
743
- | `mixin_conflicts` | loader, mcVersion, minConflicts | Cross-mod mixin conflict report |
744
- | `tag_conflicts` | registry | replace:true tag conflict report |
745
- | `version_conflicts` | | Duplicate modId + unsatisfied deps |
746
- | `mod_overview` | modId | Full overview for one mod |
747
- | `gradle_deps` | groupFilter, modIdFilter | Gradle dependency comparison |
748
- | `pack_compat` | mcVersion, loader | One-shot pack audit: mixin conflicts + AT/AW shared targets + tag conflicts + dep issues |
749
- | `dep_graph` | mcVersion, modId? | Full dependency graph with Mermaid diagram |
750
- | `sidedness` | mcVersion, loader | Classify all mods as client_only / client_optional / common / server_only |
751
- | `mod_complexity` | mcVersion, loader | Rank mods by class count + mixin + AT/AW footprint |
752
- | `pack_changelog` | oldIds[], newIds[] | Diff two pack snapshots — added/removed/updated mods |
753
-
754
- All reports accept an optional `savePath` to write the `.md` file to disk.
755
-
756
- ### 19. `pack_tools` Modpack Asset & Data Conflict Analysis
757
-
758
- | action | Key params | Description |
759
- |--------|-----------|-------------|
760
- | `asset_conflicts` | mcVersion?, loader?, limit | Resource pack path collisions across all mods |
761
- | `data_conflicts` | dataType?, mcVersion?, loader?, limit | Data pack path collisions (recipes, loot tables, advancements, …) |
762
- | `vanilla_overrides` | type=asset\|data\|both, mcVersion?, loader? | Paths where mods override vanilla files |
763
- | `complexity` | mcVersion?, loader?, limit | Rank mods by JAR entry count (complexity proxy) |
764
- | `pack_sidedness` | mcVersion?, loader? | Classify mods by presence of client/server entry points |
765
- | `missing_assets` | mcVersion?, loader?, limit | Mod JAR entries referencing textures/models that don't exist |
766
- | `at_conflicts` | mcVersion?, loader? | AT/AW entries targeted by multiple mods |
767
-
768
- ### 20. `analyze_crash_log` — Crash Log Triage
769
-
770
- Paste a NeoForge/Forge/Fabric crash log. Cross-references stack frames against the `ModClass` index and returns suspects ranked by frame count, plus coverage warning if the class index is sparse.
771
-
772
- | param | Description |
773
- |-------|-------------|
774
- | `logText` | Full text of the crash report or log snippet |
775
-
776
- ### 21. `find_missing_deps` Missing Dependency Detection
777
-
778
- Reads all ingested mods' declared dependencies and checks each dep ID against the ingested modId set. Skips known platform-provided deps (minecraft, neoforge, forge, fabric-api, java).
779
-
780
- | param | Description |
781
- |-------|-------------|
782
- | `mcVersion` | Filter to a specific MC version |
783
- | `loader` | Filter to a specific loader |
784
-
785
- ### 22. `check_mod_compat` — Pre-flight JAR Compatibility Check
786
-
787
- Runs a candidate JAR through 5 checks without requiring it to be ingested first:
788
- 1. Mixin target conflicts with existing mods
789
- 2. AT/AW entry overlaps
790
- 3. Asset path conflicts
791
- 4. Missing declared dependencies
792
- 5. Sidedness detection
793
-
794
- | param | Description |
795
- |-------|-------------|
796
- | `jarPath` | Absolute path to the candidate mod JAR |
797
- | `mcVersion` | Filter comparison pool to this MC version |
798
- | `loader` | Filter comparison pool to this loader |
799
-
800
- ---
801
-
802
- ## Typical Workflows
803
-
804
- ### Ingest a modpack
805
-
806
- ```bash
807
- # 1. Ingest all mods (--replace keeps DB in sync if re-running after updates)
808
- node dist/cli.js batch-ingest /path/to/mods --index --replace
809
-
810
- # 2. Resolve mixin targets (enables conflict detection)
811
- node dist/cli.js batch-resolve-mixins
812
-
813
- # 3. Sync Modrinth/CurseForge metadata
814
- # (via MCP: platform action=batch_sync)
815
-
816
- # 4. Index mod-shipped tags
817
- # (via MCP: mod_tags action=index_all)
818
-
819
- # 5. Ingest the loader for cross-reference
820
- node dist/cli.js ingest-neoforge 21.1.228
821
- ```
822
-
823
- ### Run a full pack compatibility audit
824
-
825
- ```bash
826
- # via MCP generates a Markdown report scoped to your pack
827
- reports report=pack_compat loader=neoforge mcVersion=1.21.1 savePath=C:/reports/pack-compat.md
828
- ```
829
-
830
- The scorecard covers: duplicate mod IDs, unsatisfied deps, mixin-conflicted classes, and tag hard conflicts. AT/AW shared targets are shown separately as informational (they can only widen access, never cause crashes).
831
-
832
- ### Pre-flight check a new mod before adding it
833
-
834
- ```bash
835
- # via MCP checks against all mods currently in DB, no ingestion needed
836
- check_mod_compat jarPath=/path/to/newmod-1.0.jar loader=neoforge mcVersion=1.21.1
837
- ```
838
-
839
- ### Triage a crash log
840
-
841
- ```bash
842
- # via MCP paste the crash report, get ranked suspect mods
843
- analyze_crash_log logText="<paste full crash log here>"
844
- ```
845
-
846
- ### Find missing dependencies
847
-
848
- ```bash
849
- # via MCP
850
- find_missing_deps loader=neoforge mcVersion=1.21.1
851
- ```
852
-
853
- ### Cross-mod source search
854
-
855
- ```bash
856
- # via MCP — grep across ALL decompiled mod sources at once
857
- mod action=search_source query=LivingEntity isRegex=false
858
- mod action=search_source query="@Mixin.*LivingEntity" isRegex=true
859
- # Results include modId + modVersion so you know which mod each hit came from
860
- ```
861
-
862
- ### Detect mixin conflicts
863
-
864
- ```bash
865
- # via CLI (single class)
866
- node dist/cli.js mixin-conflicts net/minecraft/world/entity/LivingEntity
867
-
868
- # via MCP (full matrix)
869
- mixin_scan action=conflict_matrix
870
- reports report=mixin_conflicts savePath=C:/reports/mixin_conflicts.md
871
- ```
872
-
873
- ### Explore tag conflicts
874
-
875
- ```bash
876
- # via MCP
877
- mod_tags action=index_all
878
- mod_tags action=find_conflicts
879
- mod_tags action=contributors tagPath=c:ores/iron
880
- ```
881
-
882
- ### Explore a mod
883
-
884
- ```bash
885
- node dist/cli.js get apotheosis
886
- node dist/cli.js mixin-targets apotheosis
887
- node dist/cli.js at-entries 2
888
- node dist/cli.js decompile-class 2 com/shadows/apotheosis/mixin/LivingEntityMixin
889
- ```
890
-
891
- ### Check for updates
892
-
893
- ```bash
894
- node dist/cli.js sync-modrinth 2
895
- node dist/cli.js check-updates 2
896
- ```
897
-
898
- ---
899
-
900
- ## Acknowledgements
901
-
902
- ### Services & APIs
903
- - **[CreeperHost](https://www.creeperhost.net)** for the free [modpacks.ch](https://www.modpacks.ch) public API powering modpack search, sync, and mod downloads.
904
- - **[Modrinth](https://modrinth.com)** — for the free [Modrinth API](https://docs.modrinth.com) powering mod search, metadata lookup, and version sync.
905
- - **[CurseForge](https://www.curseforge.com)** — for the [CurseForge API](https://docs.curseforge.com) powering mod and modpack browsing and sync.
906
- - **[misode](https://github.com/misode)** — for [mcmeta](https://github.com/misode/mcmeta), the version-controlled Minecraft data repository that powers the `mc_data`, `mc_files`, and `mc_registry` tools.
907
- - **[Mojang](https://www.minecraft.net)** for publishing official Mojmap mappings and the Piston Meta API used for version discovery and JAR downloads.
908
-
909
- ### Modloader teams
910
- - **[NeoForged team](https://github.com/neoforged/NeoForge)** — for NeoForge, the [NeoForge documentation](https://docs.neoforged.net) seeded into the docs database, and the migration changelogs seeded into the primers database.
911
- - **[FabricMC team](https://github.com/FabricMC)** — for the [Fabric Wiki](https://fabricmc.net/wiki) and [Yarn mappings](https://github.com/FabricMC/yarn) seeded into the docs database, Intermediary mappings used by the `mappings` tool, and [mcsrc.dev](https://mcsrc.dev) whose source browsing and class analysis features inspired our `mc_source` tool.
912
- - **[MinecraftForge team](https://github.com/MinecraftForge)** — for the pre-fork Forge migration changelogs (1.18.2 → 1.20.1) seeded into the primers database.
913
-
914
- ### Community contributors
915
- - **[MCPHackers](https://mcphackers.org/)** — for [RetroMCP](https://github.com/MCPHackers/RetroMCP-Java), providing the Tiny v2 mappings that enable decompilation of legacy Minecraft versions (Alpha, Beta, and pre-1.7.10 releases).
916
- - **[ApexModder](https://github.com/ApexModder)** — for NeoForge update primers and migration guides included in the default primers database.
917
- - **[TheIllusiveC4](https://github.com/TheIllusiveC4)** — for [Curios API](https://github.com/TheIllusiveC4/Curios), whose wiki is seeded into the docs database as a default mod API reference.
918
- - **[ParchmentMC](https://parchmentmc.org)** — for [Parchment](https://github.com/ParchmentMC/Parchment), the community-maintained parameter names and javadocs layered on top of Mojmap used by the `mappings` tool.
919
-
920
- ### Tooling & libraries
921
- - **[Vineflower](https://github.com/Vineflower/vineflower)** — the decompiler powering all Java source reconstruction.
922
- - **[SpecialSource](https://github.com/md-5/SpecialSource)** — the bytecode remapper used to apply legacy SRG mappings for Minecraft 1.7.10 through 1.13.2.
923
- - **[tiny-remapper](https://github.com/FabricMC/tiny-remapper)** — the highly optimized JAR remapping tool used to apply RetroMCP and modern mappings.
924
- - **[SpongePowered Mixin](https://github.com/SpongePowered/Mixin)** — the Mixin framework whose annotation format the mixin-scan tool parses and analyses across mods.
925
- - **[Model Context Protocol SDK](https://github.com/modelcontextprotocol/typescript-sdk)** — the MCP server/client framework this tool is built on.
926
- - **[Prisma](https://www.prisma.io)** — ORM powering multi-backend database support (PostgreSQL, PGlite, SQLite).
927
- - **[pgvector](https://github.com/pgvector/pgvector)** PostgreSQL vector extension enabling semantic search.
928
- - **[Ollama](https://ollama.com)** — local LLM runtime used for generating semantic embeddings.
929
- - **[Electric SQL / PGlite](https://github.com/electric-sql/pglite)** embedded Postgres for zero-Docker deployments.
930
- - **[better-sqlite3](https://github.com/WiseLibs/better-sqlite3)** / **[sqlite-vec](https://github.com/asg017/sqlite-vec)** SQLite backend and vector search extension.
931
- - **[Zod](https://zod.dev)** — runtime schema validation for all MCP tool parameters.
932
- - **[clack](https://github.com/bombshell-dev/clack)** the interactive setup wizard TUI.
933
- - **[adm-zip](https://github.com/cthackers/adm-zip)** — JAR/ZIP extraction used throughout the ingestion pipeline.
934
-
935
- ### Special thanks
936
-
937
- A heartfelt thank you to all the members of the **ForgeCraft Discord and Minecraft server** for being a genuinely great community, for your feedback, and for supporting my development endeavours over the years. This project wouldn't be what it is without you.
938
-
1
+ # modlens-mcp
2
+
3
+ MCP server and CLI for browsing, decompiling, and analyzing Minecraft mod JARs.
4
+
5
+ Store mod metadata, class indexes, mixin targets, AT/AW entries, and decompiled source in a local database — **embedded SQLite by default** (zero setup), or PostgreSQL/PGlite if you want them. Query everything via AI (MCP) or command line (CLI).
6
+
7
+ ## Installation
8
+
9
+ ### Option A — npx (recommended, no clone required)
10
+
11
+ ```bash
12
+ npx @creeperhost/modlens-mcp
13
+ ```
14
+
15
+ On first run it works with **zero configuration**an embedded SQLite database is created automatically at `~/.modlens/data/modlens.db` (no Docker, no external services). Settings are stored in `~/.modlens/.env` and survive updates.
16
+
17
+ Add it to your MCP client config to start using it:
18
+ ```json
19
+ {
20
+ "mcpServers": {
21
+ "modlens": { "command": "npx", "args": ["-y", "@creeperhost/modlens-mcp"] }
22
+ }
23
+ }
24
+ ```
25
+
26
+ **Optional switch backends or enable semantic search:**
27
+ ```bash
28
+ npx @creeperhost/modlens-mcp --setup
29
+ ```
30
+ The setup wizard lets you move to PostgreSQL/PGlite, configure Ollama for semantic search, and auto-write your MCP client config. Re-run it any time to reconfigure.
31
+
32
+ **Update to the latest version:**
33
+ ```bash
34
+ npx @creeperhost/modlens-mcp@latest --setup
35
+ ```
36
+ This pins the new version in your MCP client config. Your database and settings in `~/.modlens/` are untouched.
37
+
38
+ ---
39
+
40
+ ### Option B — git clone (for contributors / advanced users)
41
+
42
+ ```bash
43
+ git clone https://github.com/CreeperHost/modlens-mcp
44
+ cd modlens-mcp
45
+ npm install
46
+ npm run setup # interactive setup wizard
47
+ npm run start # start the server
48
+ ```
49
+
50
+ ---
51
+
52
+ ## Prerequisites
53
+
54
+ | Requirement | Notes |
55
+ |-------------|-------|
56
+ | **Node.js 22+** | Runtime for the MCP server |
57
+ | **Docker** | *Optional*only for the PostgreSQL backend (`docker compose`). Not needed for the default embedded SQLite. |
58
+ | **JDK 21+** | Required for decompilation (Vineflower) and bytecode analysis (`javap`). Eclipse Adoptium recommended — auto-discovered at `C:/Program Files/Eclipse Adoptium`, `C:/Program Files/Java`, `C:/Program Files/Microsoft`, or via `JAVA_HOME` |
59
+ | **Vineflower** | Decompiler JAR — **auto-downloaded** from Maven Central on first use |
60
+ | **mcsrc-indexer.jar** | JAR bytecode indexer — **auto-downloaded** from the modlens-mcp GitHub release on first use |
61
+
62
+ **Optional environment variables:**
63
+
64
+ | Variable | Purpose |
65
+ |----------|---------|
66
+ | `CURSEFORGE_API_KEY` | CurseForge platform sync (`sync_curseforge` action) |
67
+ | `MODRINTH_TOKEN` | Modrinth API — increases rate limit for batch operations |
68
+ | `JAVA_HOME` | Override Java discovery (falls back to PATH if not set) |
69
+
70
+ ---
71
+
72
+ ## Docker — PostgreSQL Setup
73
+
74
+ > Only needed if you choose the **PostgreSQL** backend. The default embedded SQLite backend requires none of this.
75
+
76
+ The included `docker-compose.yml` starts a PostgreSQL 16 container on port **5433**.
77
+
78
+ ```bash
79
+ # Start (detached)
80
+ docker compose up -d
81
+
82
+ # Check it's healthy
83
+ docker compose ps
84
+
85
+ # Stop (data is preserved in the named volume)
86
+ docker compose down
87
+
88
+ # Stop and wipe all data
89
+ docker compose down -v
90
+ ```
91
+
92
+ > **⚠ Dev credentials warning:** `docker-compose.yml` uses `modlens:modlens` as the username/password. This is fine for a local dev tool that only binds to `localhost:5433`. If you expose the port externally or run this on a shared machine, change `POSTGRES_USER`, `POSTGRES_PASSWORD`, and `POSTGRES_DB` in `docker-compose.yml` **and** update your `.env` accordingly.
93
+
94
+ ---
95
+
96
+ ## Setup
97
+
98
+ ```bash
99
+ git clone https://github.com/CreeperHost/modlens-mcp
100
+ cd modlens-mcp
101
+ npm install
102
+ npm run build
103
+
104
+ # Interactive setup wizard — handles Docker, Ollama, schema, MCP config:
105
+ npm run setup
106
+ ```
107
+
108
+ The wizard will ask about semantic search (Ollama), start the containers, apply the schema, optionally seed docs/primers, and write your MCP client config. Run it again any time to reconfigure.
109
+
110
+ **Manual setup (if you prefer):**
111
+
112
+ ```bash
113
+ # 1. Start PostgreSQL
114
+ docker compose up -d
115
+
116
+ # 2. Create .env
117
+ echo DATABASE_URL=postgresql://modlens:modlens@localhost:5433/modlens > .env
118
+ # Optional add a CurseForge key for sync_curseforge:
119
+ # echo CURSEFORGE_API_KEY=<your key> >> .env
120
+ # Optional — add a Modrinth token for higher rate limits:
121
+ # echo MODRINTH_TOKEN=<your token> >> .env
122
+
123
+ # 3. Apply the Prisma schema to the DB
124
+ npx prisma db push
125
+
126
+ # 4. Build
127
+ npm run build
128
+ ```
129
+
130
+ > **Note:** Both Vineflower and mcsrc-indexer.jar are downloaded automatically to `~/.modlens-cache/tools/` on first use — no manual steps needed.
131
+
132
+ ---
133
+
134
+ ## Semantic Search (optional)
135
+
136
+ Semantic (vector) search lets you find docs, primers, and MC source by meaning rather than keywords — e.g. *"how do I attach data to a block?"* instead of the exact class name.
137
+
138
+ **Requirements:** [Ollama](https://ollama.com) installed and running locally.
139
+
140
+ ```bash
141
+ # 1. Install Ollama and pull the embedding model
142
+ ollama pull nomic-embed-text
143
+
144
+ # 2. Enable pgvector in your Postgres container and add embedding columns
145
+ npm run db:vector
146
+
147
+ # 3. Add Ollama config to .env (optional http://localhost:11434 is the default)
148
+ echo OLLAMA_URL=http://localhost:11434 >> .env
149
+
150
+ # 4. Embed all existing docs and primers
151
+ node dist/cli.js backfill-embeddings
152
+
153
+ # Embed a specific MC source version (large takes a while)
154
+ node dist/cli.js backfill-embeddings --type source --version 26.1.2
155
+ ```
156
+
157
+ After this, the `docs` and `primers` MCP tools will have a `semantic_search` action, and the `mc_source` tool will have `search_semantic` and `index_semantic`. Semantic search is **opt-in** — if `OLLAMA_URL` is not reachable, tools fall back to keyword search automatically.
158
+
159
+ > **Note:** The `npm run db:vector` script is safe to re-run. It creates the `pgvector` extension and `embedding` columns using `IF NOT EXISTS` guards.
160
+
161
+ ---
162
+
163
+ ## MCP Configuration
164
+
165
+ The server uses stdio transport — it works with any MCP client (VS Code Copilot, Claude Desktop, Claude CLI, Cursor, etc.) as long as Docker is running and `DATABASE_URL` is set.
166
+
167
+ ### VS Code Copilot (`mcp.json`)
168
+
169
+ ```json
170
+ {
171
+ "servers": {
172
+ "modlens": {
173
+ "type": "stdio",
174
+ "command": "node",
175
+ "args": ["/path/to/modlens-mcp/dist/server.js"],
176
+ "env": {
177
+ "DATABASE_URL": "postgresql://modlens:modlens@localhost:5433/modlens"
178
+ }
179
+ }
180
+ }
181
+ }
182
+ ```
183
+
184
+ ### Claude Desktop (`claude_desktop_config.json`)
185
+
186
+ Location: `%APPDATA%\Claude\claude_desktop_config.json` (Windows) or `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS)
187
+
188
+ ```json
189
+ {
190
+ "mcpServers": {
191
+ "modlens": {
192
+ "command": "node",
193
+ "args": ["/path/to/modlens-mcp/dist/server.js"],
194
+ "env": {
195
+ "DATABASE_URL": "postgresql://modlens:modlens@localhost:5433/modlens"
196
+ }
197
+ }
198
+ }
199
+ }
200
+ ```
201
+
202
+ ### Claude CLI
203
+
204
+ ```bash
205
+ claude mcp add modlens node /path/to/modlens-mcp/dist/server.js \
206
+ --env DATABASE_URL=postgresql://modlens:modlens@localhost:5433/modlens
207
+ ```
208
+
209
+ Or manually edit `~/.claude/mcp.json` (same format as VS Code above).
210
+
211
+ > **Important:** Replace `/path/to/modlens-mcp` with the actual absolute path where you cloned the repo. On Windows use forward slashes or escaped backslashes, e.g. `C:/Users/you/modlens-mcp/dist/server.js`.
212
+
213
+ ---
214
+
215
+ ## Updating
216
+
217
+ ```bash
218
+ npm run update
219
+ ```
220
+
221
+ This runs `git pull`, reinstalls dependencies, rebuilds, and applies any new DB migrations all in one command. After it finishes, **restart your MCP client** (reload VS Code window, restart Claude Desktop, etc.) to pick up the new server build.
222
+
223
+ > **First-time update (before `npm run update` existed)?** Run the steps manually once:
224
+ > ```bash
225
+ > git pull && npm install && npm run build && node scripts/post-update.mjs
226
+ > ```
227
+ > After this you'll have `npm run update` available for all future updates.
228
+
229
+ ---
230
+
231
+ ### 💡 Token overhead disable tools you don't need
232
+
233
+ ModLens ships **22 tools**. Every tool's name, description, and parameter schema is sent to the model on **every request**, whether you use that tool or not. This adds a fixed overhead of ~3,400 tokens per turn.
234
+
235
+ **Recommendation:** disable any tool groups you don't regularly use. Common profiles:
236
+
237
+ | If you primarily… | Keep | Disable |
238
+ |---|---|---|
239
+ | Browse vanilla MC source | `mc_source`, `mc_data`, `mc_files`, `mc_registry`, `mappings` | `platform`, `mixin_scan`, `gradle`, `kubejs`, `pack_tools` |
240
+ | Analyze a modpack | `mod`, `mod_mixins`, `mixin_scan`, `reports`, `pack_tools` | `mc_files`, `mappings`, `docs`, `primers`, `gradle` |
241
+ | Mod development | `mod`, `mod_bytecode`, `mc_source`, `mappings`, `docs`, `primers` | `pack_tools`, `kubejs`, `platform`, `mixin_scan` |
242
+
243
+ **VS Code:** In `mcp.json` you can disable individual tools using the `disabled` list under the server entry:
244
+ ```json
245
+ {
246
+ "servers": {
247
+ "modlens": {
248
+ "type": "stdio",
249
+ "command": "node",
250
+ "args": ["/path/to/modlens-mcp/dist/server.js"],
251
+ "env": { "DATABASE_URL": "postgresql://modlens:modlens@localhost:5433/modlens" },
252
+ "disabled": ["kubejs", "platform", "gradle", "docs", "primers"]
253
+ }
254
+ }
255
+ }
256
+ ```
257
+
258
+ **Claude Desktop / CLI:** Toggle tools off in the MCP settings UI, or maintain separate config files for different workflows.
259
+
260
+ ---
261
+
262
+ ## CLI
263
+
264
+ All MCP tools are available from the command line:
265
+
266
+ ```
267
+ node dist/cli.js <command> [args] [--flags]
268
+ ```
269
+
270
+ Run without arguments (or `--help`) to print the full command list. Every MCP tool action has a CLI equivalent.
271
+
272
+ ### Quick Reference
273
+
274
+ **Database & Catalog**
275
+
276
+ | Command | Description |
277
+ |---------|-------------|
278
+ | `stats` | DB statistics |
279
+ | `list` | List all mods |
280
+ | `get <modId>` | Get mod metadata |
281
+ | `search <query>` | Search mods |
282
+ | `deps <modId>` | List dependencies |
283
+ | `dep-graph` | Full dependency graph |
284
+ | `version-conflicts` | Duplicate modIds + unsatisfied deps |
285
+ | `source-urls [query]` | List GitHub/GitLab source URLs |
286
+
287
+ **Ingest**
288
+
289
+ | Command | Description |
290
+ |---------|-------------|
291
+ | `ingest <jarPath>` | Ingest a mod JAR (WSL paths auto-converted) |
292
+ | `ingest-neoforge <version>` | Download + ingest NeoForge |
293
+ | `ingest-fabric-api <version>` | Download + ingest Fabric API |
294
+ | `batch-ingest <dir>` | Ingest all JARs in a directory |
295
+ | `batch-decompile` | Decompile all un-decompiled mods |
296
+ | `batch-sync` | Bulk sync from Modrinth/CurseForge |
297
+ | `reindex` | Index class names for un-indexed mods |
298
+
299
+ **Decompile & Source**
300
+
301
+ | Command | Description |
302
+ |---------|-------------|
303
+ | `decompile <dbId>` | Decompile entire mod JAR |
304
+ | `decompile-status <dbId>` | Poll decompilation progress |
305
+ | `decompile-class <dbId> <class>` | Decompile a single class |
306
+ | `source <dbId> [path]` | Browse decompiled source |
307
+ | `search-source <query>` | Search decompiled source |
308
+ | `get-paths <dbId>` | JAR + decomp paths for native grep |
309
+ | `index-fts <dbId>` | Index mod source for BM25 search (no Ollama) |
310
+ | `search-indexed <dbId> <query>` | Fast BM25 FTS over mod source |
311
+
312
+ **Bytecode Analysis**
313
+
314
+ | Command | Description |
315
+ |---------|-------------|
316
+ | `search-class <dbId> <query>` | Search for a class by name |
317
+ | `members <dbId> <class>` | List methods and fields |
318
+ | `bytecode <dbId> <class>` | Raw javap bytecode |
319
+ | `refs <dbId> <target>` | Find references |
320
+ | `inheritance <dbId> <class>` | Inheritance chain |
321
+ | `diff <dbIdA> <dbIdB>` | Compare two mod versions |
322
+ | `diff-detailed <dbIdA> <dbIdB>` | AST-level diff with breaking-change flags |
323
+ | `cross-refs <target>` | Cross-mod references to a target |
324
+ | `find-implementors <target>` | Classes implementing an interface |
325
+ | `scan-registrations <dbId>` | Registry object registrations |
326
+ | `annotated-by <annotation>` | Classes with a given annotation |
327
+ | `event-listeners <event>` | Event listener registrations |
328
+ | `optional-integrations <dbId>` | Soft dependency integrations |
329
+ | `network-payloads <dbId>` | Network packet types |
330
+ | `config-schema <dbId>` | Configuration class schemas |
331
+
332
+ **Mixin Analysis**
333
+
334
+ | Command | Description |
335
+ |---------|-------------|
336
+ | `mixin-targets <modId>` | MC classes this mod injects into |
337
+ | `resolve-mixins <dbId>` | Parse `@Mixin` bytecode update DB |
338
+ | `mixin-conflicts <targetClass>` | Mods injecting into the same class |
339
+ | `at-entries <dbId>` | Access Transformer entries |
340
+ | `aw-entries <dbId>` | Access Widener entries |
341
+ | `targets-in-package <pkg>` | Mods targeting classes in a package |
342
+ | `at-conflicts` | AT/AW entries conflicting across mods |
343
+ | `batch-resolve-mixins` | Resolve `@Mixin` targets for all mods |
344
+
345
+ **Mixin Scan (cross-mod matrix)**
346
+
347
+ | Command | Description |
348
+ |---------|-------------|
349
+ | `mixin-scan list` | List mods with mixins |
350
+ | `mixin-scan conflict-matrix` | Full conflict matrix |
351
+ | `mixin-scan class-detail <class>` | All mixins targeting one MC class |
352
+ | `mixin-scan hotspots` | Most-targeted MC classes |
353
+ | `mixin-scan batch-resolve` | Resolve targets for all mixin mods |
354
+
355
+ **Platform**
356
+
357
+ | Command | Description |
358
+ |---------|-------------|
359
+ | `sync-modrinth <dbId>` | Look up on Modrinth |
360
+ | `sync-curseforge <dbId>` | Look up on CurseForge |
361
+ | `check-updates <dbId>` | Check for newer versions |
362
+ | `download-source <dbId>` | Download GitHub/GitLab source |
363
+
364
+ **Versions**
365
+
366
+ | Command | Description |
367
+ |---------|-------------|
368
+ | `mc-versions` | List Minecraft versions |
369
+ | `neoforge-versions` | List NeoForge versions |
370
+ | `fabric-api-versions` | List Fabric API versions |
371
+
372
+ **Vanilla MC Source**
373
+
374
+ | Command | Description |
375
+ |---------|-------------|
376
+ | `mc-source search-class <ver> <q>` | Find a vanilla class by name |
377
+ | `mc-source get-source <ver> <class>` | Read decompiled source |
378
+ | `mc-source bytecode <ver> <class>` | Raw javap bytecode |
379
+ | `mc-source class-members <ver> <c>` | Methods and fields |
380
+ | `mc-source find-refs <ver> <target>` | References to a target |
381
+ | `mc-source inheritance <ver> <c>` | Inheritance tree |
382
+ | `mc-source diff <verA> <verB>` | High-level class diff |
383
+ | `mc-source diff-detailed <A> <B>` | AST-level method/field diff |
384
+ | `mc-source decompile <ver>` | Decompile MC JAR |
385
+ | `mc-source decompile-status <ver>` | Poll decompilation progress |
386
+ | `mc-source search-code <ver> <q>` | Full-text search over vanilla source |
387
+ | `mc-source index <ver>` | Index vanilla source for BM25 |
388
+ | `mc-source search-indexed <ver> <q>` | BM25 FTS over vanilla source |
389
+ | `mc-source search-events <ver>` | Browse event classes |
390
+ | `mc-source validate-aw <ver> <file>` | Validate an `.accesswidener` file |
391
+ | `mc-source analyze-mixin <ver> <file>` | Analyze a mixin source file |
392
+ | `mc-source search-semantic <ver> <q>` | Semantic search (requires Ollama) |
393
+ | `mc-source get-paths <ver>` | On-disk jar/decomp/index paths |
394
+
395
+ **Mappings**
396
+
397
+ | Command | Description |
398
+ |---------|-------------|
399
+ | `mappings find <sym> <ver> <src> <tgt>` | Translate between namespaces |
400
+ | `mappings remap <in> <out> <ver> <mapping>` | Remap a JAR |
401
+ | `mappings parchment <class> <mcVer>` | Parchment parameter docs |
402
+ | `mappings list-parchment <mcVer>` | Available Parchment versions |
403
+ | `mappings parchment-summary <mcVer>` | Parchment coverage stats |
404
+
405
+ **Documentation & Primers**
406
+
407
+ | Command | Description |
408
+ |---------|-------------|
409
+ | `docs seed` | Seed built-in docs |
410
+ | `docs get <query>` | Look up by title/class |
411
+ | `docs search <query>` | Keyword search |
412
+ | `docs list` | List all entries |
413
+ | `docs delete <id>` | Delete by ID |
414
+ | `docs semantic-search <query>` | Semantic search (requires Ollama) |
415
+ | `primers seed` | Seed built-in primers |
416
+ | `primers get <id>` | Get by ID |
417
+ | `primers by-version <from> <to>` | Guides for a version range |
418
+ | `primers search <query>` | Keyword search |
419
+ | `primers list` | List all primers |
420
+ | `primers delete <id>` | Delete by ID |
421
+ | `primers semantic-search <query>` | Semantic search (requires Ollama) |
422
+
423
+ **MC Registry / Data / Files**
424
+
425
+ | Command | Description |
426
+ |---------|-------------|
427
+ | `mc-registry <action>` | blocks, commands, registries, sounds, item-components, registry-entries, mcmeta-versions |
428
+ | `mc-data <action>` | tags, find-tags-for, recipes, get-recipe, biomes, enchantments, lang, model, structures, particles, entity-attributes, and more |
429
+ | `mc-files <action>` | get-data, get-asset, list-files, diff, atlas, raw, compare, changelog |
430
+
431
+ **Mod JAR & Mod Data**
432
+
433
+ | Command | Description |
434
+ |---------|-------------|
435
+ | `mod-jar <action> <modId>` | list-files, get-file, lang, sounds, atlas, registry-entries, manifest, list-configs, get-config |
436
+ | `mod-data <action> <modId>` | list, get, diff, trace-item — with type: recipe, loot_table, advancement, model, biome, data_tag, enchantment, and more |
437
+
438
+ **Mod Tags, Gradle, Reports, Pack Tools**
439
+
440
+ | Command | Description |
441
+ |---------|-------------|
442
+ | `mod-tags <action>` | index, index-all, namespaces, contributors, expand, mod-list, find-conflicts, search |
443
+ | `gradle <action>` | get-files, search, compare-deps |
444
+ | `report <type>` | mixin-conflicts, tag-conflicts, version-conflicts, mod-overview, gradle-deps, pack-compat, dep-graph, sidedness, mod-complexity, pack-changelog |
445
+ | `pack-tools <action>` | asset-conflicts, vanilla-overrides, sidedness, pack-sidedness, complexity, pack-changelog, data-conflicts |
446
+
447
+ **KubeJS & Modpacks**
448
+
449
+ | Command | Description |
450
+ |---------|-------------|
451
+ | `kubejs index <dir>` | Index a kubejs/ scripts directory |
452
+ | `kubejs search <dir> <query>` | Search indexed scripts |
453
+ | `modpacks search <query>` | Search modpacks.ch packs |
454
+ | `modpacks featured` | Featured packs |
455
+ | `modpacks info <packId>` | Pack metadata |
456
+ | `modpacks manifest <packId> <verId>` | Pack manifest |
457
+ | `modpacks list-versions` | Pack version list |
458
+ | `modpacks list-files` | Pack file list |
459
+ | `modpacks ftb-mod-info <modId>` | FTB mod info |
460
+ | `modpacks find-mod` | Find a mod across packs |
461
+
462
+ **Diagnostics**
463
+
464
+ | Command | Description |
465
+ |---------|-------------|
466
+ | `crash-log <logPath>` | Analyze a crash log file |
467
+ | `missing-deps` | Find unsatisfied declared dependencies |
468
+ | `compat-check <jarPath>` | Pre-flight compatibility check |
469
+
470
+ **Semantic Search (requires Ollama)**
471
+
472
+ | Command | Description |
473
+ |---------|-------------|
474
+ | `backfill-embeddings` | Embed docs + primers |
475
+ | `backfill-embeddings --type=source --version=<ver>` | Embed MC source |
476
+ | `backfill-embeddings --type=mod --db-id=<n>` | Embed mod source |
477
+
478
+ ---
479
+
480
+ ## MCP Tools Reference
481
+
482
+ All tool actions have been consolidated into **24 grouped tools** to stay within MCP client tool-count limits. Each tool takes a required `action` parameter that selects the operation, plus optional params specific to that action.
483
+
484
+ ### Tool Index
485
+
486
+ | # | Tool | Actions | Description |
487
+ |---|------|---------|-------------|
488
+ | 1 | `mod` | 22 | Mod DB, decompile, source, FTS/semantic search |
489
+ | 2 | `mod_bytecode` | 16 | Mod JAR class/bytecode analysis |
490
+ | 3 | `mod_mixins` | 7 | Mixin targets, AT/AW entries, package scan |
491
+ | 4 | `platform` | 5 | Modrinth/CurseForge sync |
492
+ | 5 | `mc_versions` | 5 | MC + loader version listing/ingest |
493
+ | 6 | `mc_source` | 19 | Vanilla MC source, decompile, validate |
494
+ | 7 | `mappings` | 5 | Name mappings + Parchment |
495
+ | 8 | `docs` | 8 | Documentation CRUD + semantic search |
496
+ | 9 | `primers` | 9 | Version migration guides + semantic search |
497
+ | 10 | `mc_registry` | 7 | MC registries, blocks, commands, sounds |
498
+ | 11 | `mc_data` | 23 | Vanilla data browser (tags, recipes, biomes, …) |
499
+ | 12 | `mc_files` | 8 | MC file access via misode/mcmeta |
500
+ | 13 | `mod_jar` | 9 | Mod JAR file browser, lang, sounds, configs |
501
+ | 14 | `mod_data` | list+get × 22 types | Mod structured data (recipes, loot tables, …) |
502
+ | 15 | `mod_tags` | 8 | Cross-mod tag indexing + conflict detection |
503
+ | 16 | `mixin_scan` | 5 | Cross-mod mixin conflict analysis |
504
+ | 17 | `gradle` | 3 | Gradle build file analysis |
505
+ | 18 | `reports` | 10 report types | Markdown report generation |
506
+ | 19 | `pack_tools` | 7 | Modpack asset/data conflict analysis |
507
+ | 20 | `kubejs` | 2 | KubeJS script indexing + search |
508
+ | 21 | `modpacks_ch` | 12 | modpacks.ch / FTB / CurseForge pack browsing |
509
+ | 22 | `analyze_crash_log` | | Triage crash logs against mod class index |
510
+ | 23 | `find_missing_deps` | | Find mods with missing declared dependencies |
511
+ | 24 | `check_mod_compat` | — | Pre-flight compatibility check for a candidate JAR |
512
+
513
+ ---
514
+
515
+ ### 1. `mod` Mod Database, Decompile & Source
516
+
517
+ | action | Key params | Description |
518
+ |--------|-----------|-------------|
519
+ | `ingest` | jarPath, skipSource | Add a JAR to the database. Accepts Windows paths (`C:\mods\foo.jar`) and WSL paths (`/mnt/c/mods/foo.jar`) |
520
+ | `list` | loader, mcVersion, hasMixins, decompiled, limit | List mods |
521
+ | `get` | modId | Full metadata for a mod |
522
+ | `search` | query, loader, mcVersion, limit | Search by name/description |
523
+ | `stats` | — | DB statistics |
524
+ | `dependencies` | modId, recursive | Dependency list |
525
+ | `dep_graph` | mcVersion | Full requires/requiredBy graph |
526
+ | `version_conflicts` | | Detect duplicate modIds + unsatisfied deps |
527
+ | `source_urls` | query | GitHub/GitLab URLs from manifests |
528
+ | `decompile` | dbId, force | Bulk decompile JAR via Vineflower (background) |
529
+ | `decompile_status` | dbId | Poll background decompile job |
530
+ | `decompile_class` | dbId, className | Decompile a single class on demand |
531
+ | `source` | dbId, path | Browse or read decompiled source tree |
532
+ | `search_source` | query, dbId?, isRegex, limit | Text/regex search across decompiled source — omit `dbId` to search **all** decompiled mods (results include `modId` + `modVersion`) |
533
+ | `reindex` | dbId? | Re-index class names |
534
+ | `batch_ingest` | directory, skipSource, indexClasses, replace | Ingest all JARs in a directory. `replace=true` deletes any existing DB row for the same `modId` before inserting — keeps DB in sync with disk |
535
+ | `batch_decompile` | | Decompile all not-yet-decompiled mods with concurrency control |
536
+ | `index_fts` | dbId | Index decompiled mod source into BM25/FTS. Works for all loaders — NeoForge, Fabric, Forge, Quilt. **No Ollama required.** |
537
+ | `search_indexed` | dbId, query, limit? | Fast BM25-ranked FTS search over indexed mod source |
538
+ | `index_semantic` | dbId, batchSize? | Embed decompiled source into pgvector (batched, resumable — requires Ollama). Also populates FTS index as a side-effect. |
539
+ | `search_semantic` | dbId, query, limit? | Semantic source search using Ollama + pgvector (requires Ollama) |
540
+ | `get_paths` | dbId | Return `jarPath`, `decompPath` (null if not yet decompiled), and `cacheRoot` so the agent can grep/search files natively |
541
+
542
+ ### 2. `mod_bytecode` — Mod JAR Class Analysis
543
+
544
+ | action | Key params | Description |
545
+ |--------|-----------|-------------|
546
+ | `search_class` | dbId, query | Find class by name (CamelCase/prefix/substring) |
547
+ | `class_members` | dbId, className | Methods/fields with mixin targets, AT/AW strings |
548
+ | `bytecode` | dbId, className | Raw `javap` output |
549
+ | `find_refs` | dbId, target | All classes referencing a class/method/field |
550
+ | `inheritance` | dbId, className | Superclass, interfaces, subclasses |
551
+ | `diff` | dbIdA, dbIdB | Added/removed classes between two versions |
552
+ | `find_implementors` | target, modId?, limit | Find mod classes extending/implementing a target across DB |
553
+
554
+ ### 3. `mod_mixins` Mixin & Access Transformer Analysis
555
+
556
+ | action | Key params | Description |
557
+ |--------|-----------|-------------|
558
+ | `targets` | modId | MC classes a mod injects into |
559
+ | `resolve` | dbId | Parse `@Mixin` bytecode update DB |
560
+ | `conflicts` | targetClass | All mods injecting into the same MC class |
561
+ | `at_entries` | dbId | NeoForge/Forge AT entries |
562
+ | `aw_entries` | dbId | Fabric/Quilt AW entries |
563
+
564
+ ### 4. `platform` Modrinth/CurseForge Sync
565
+
566
+ | action | Key params | Description |
567
+ |--------|-----------|-------------|
568
+ | `sync_modrinth` | dbId | SHA-512 lookup store project ID + source URL |
569
+ | `sync_curseforge` | dbId | Murmur2 fingerprint lookup (needs `CURSEFORGE_API_KEY`) |
570
+ | `check_updates` | dbId | Check both platforms for newer version |
571
+ | `batch_sync` | syncModrinth, syncCurseforge, downloadSources, modIdFilter, limit | Bulk sync all unmatched mods |
572
+ | `download_source` | dbId | Download GitHub/GitLab source ZIP |
573
+
574
+ ### 5. `mc_versions` Loader Version Management
575
+
576
+ | action | Key params | Description |
577
+ |--------|-----------|-------------|
578
+ | `list_mc` | type=release\|snapshot\|all | MC versions from Mojang Piston Meta |
579
+ | `list_neoforge` | mcVersion, limit | NeoForge versions from Maven |
580
+ | `list_fabric` | mcVersion, limit | Fabric API versions from Modrinth |
581
+ | `ingest_neoforge` | version, skipIndex | Download + ingest a NeoForge JAR |
582
+ | `ingest_fabric` | version, skipIndex | Download + ingest a Fabric API JAR |
583
+
584
+ ### 6. `mc_source` Vanilla MC Source & Validation
585
+
586
+ | action | Key params | Description |
587
+ |--------|-----------|-------------|
588
+ | `search_class` | version, query | Find class by name |
589
+ | `get_source` | version, className, startLine, endLine, maxLines | Read decompiled source |
590
+ | `bytecode` | version, className | Raw `javap` output |
591
+ | `class_members` | version, className | Methods/fields with mixin target strings |
592
+ | `find_refs` | version, target | Classes referencing a target |
593
+ | `inheritance` | version, className | Superclass/interfaces/subclasses |
594
+ | `diff` | versionA, versionB | Added/removed classes between MC versions |
595
+ | `decompile` | version, force | Bulk decompile MC JAR (background) |
596
+ | `decompile_status` | version | Poll bulk decompile job |
597
+ | `search_code` | version, query, searchType, isRegex, limit | Regex/text search across MC source |
598
+ | `index` | version, force | Index decompiled MC into PostgreSQL FTS |
599
+ | `search_indexed` | version, query, limit | Fast FTS search |
600
+ | `search_events` | version, query?, modloader? | Find Event subclasses in decompiled source |
601
+ | `validate_aw` | content, mcVersion | Validate Access Widener against MC JAR |
602
+ | `analyze_mixin` | source, mcVersion | Parse + validate a Mixin class |
603
+
604
+ ### 7. `mappings` Name Mappings & Parchment
605
+
606
+ | action | Key params | Description |
607
+ |--------|-----------|-------------|
608
+ | `find` | symbol, version, sourceNs, targetNs | Translate between official/intermediary/yarn/mojmap |
609
+ | `remap` | inputJar, outputJar, version, toMapping | Remap mod JAR using TinyRemapper |
610
+ | `parchment` | className, mcVersion | Community parameter names/javadocs for a class |
611
+ | `list_parchment` | mcVersion | Available Parchment builds |
612
+ | `parchment_summary` | mcVersion | Parchment coverage summary |
613
+
614
+ ### 8. `docs` — Documentation Database
615
+
616
+ | action | Key params | Description |
617
+ |--------|-----------|-------------|
618
+ | `ingest` | entries[] | Add/update doc entries |
619
+ | `seed` | | Populate built-in defaults |
620
+ | `get` | query | Look up by class name or keyword |
621
+ | `search` | query, category, namespace | Full-text search |
622
+ | `list` | category, namespace, tag, limit | List all entries |
623
+ | `delete` | id | Remove by DB id |
624
+
625
+ ### 9. `primers` — Version Migration Guides
626
+
627
+ | action | Key params | Description |
628
+ |--------|-----------|-------------|
629
+ | `ingest` | entries[] | Add migration guide entries |
630
+ | `seed` | | Populate built-in NeoForge/Forge/Fabric guides |
631
+ | `get` | id | Get primer by DB id |
632
+ | `by_version` | fromVersion, toVersion, modloader | All guides covering a version span |
633
+ | `search` | query, modloader, fromVersion, toVersion, limit | Full-text search |
634
+ | `list` | modloader, limit | List all primers |
635
+ | `delete` | id | Remove by DB id |
636
+
637
+ ### 10. `mc_registry` — MC Registry & Meta Data
638
+
639
+ | action | Key params | Description |
640
+ |--------|-----------|-------------|
641
+ | `blocks` | version | Block state property definitions |
642
+ | `commands` | version | Full Brigadier command tree |
643
+ | `registries` | version, registry? | All registry keys, or entries for one registry |
644
+ | `sounds` | version | sounds.json all sound events |
645
+ | `item_components` | version | Data-driven item component definitions |
646
+ | `registry_entries` | registry, version | Full entry list from registries branch |
647
+ | `mcmeta_versions` | filter=release\|snapshot\|all | All MC versions tracked by misode/mcmeta |
648
+
649
+ ### 11. `mc_data` Vanilla Data Browser
650
+
651
+ | action | Key params | Description |
652
+ |--------|-----------|-------------|
653
+ | `tags` | version, registry, tagId, namespace | Browse vanilla tags |
654
+ | `find_tags_for` | entry, registry, version, namespace | Reverse tag lookup |
655
+ | `recipes` | version, type, outputItem | List recipes |
656
+ | `get_recipe` | recipeId, version | Recipe JSON |
657
+ | `find_recipes_for` | item, version | Reverse recipe lookup by output item |
658
+ | `loot_tables` | version, category | List loot tables |
659
+ | `get_loot_table` | path, version | Loot table JSON |
660
+ | `lang` | version, filter, limit | Search en_us.json |
661
+ | `blockstate` | block, version | Blockstate variant/model mapping |
662
+ | `model` | modelPath, version, resolveParents | Model JSON with parent chain |
663
+ | `model_tree` | modelPath, version | Full model inheritance with merged textures |
664
+ | `biomes` | version | List all biomes |
665
+ | `get_biome` | biomeId, version | Biome worldgen JSON |
666
+ | `damage_types` | version | All damage types with JSON |
667
+ | `enchantments` | version | List all enchantments |
668
+ | `get_enchantment` | id, version | Enchantment JSON |
669
+ | `advancements` | version, category | List advancements |
670
+ | `get_advancement` | id, version | Advancement JSON |
671
+ | `structures` | version | List worldgen structures |
672
+ | `get_structure` | id, version | Structure JSON |
673
+ | `particles` | version | List particle types |
674
+ | `get_particle` | id, version | Particle description JSON |
675
+ | `entity_attributes` | entity, version, modId? | Default attributes for vanilla or modded entity |
676
+
677
+ ### 12. `mc_files` — MC File Access (misode/mcmeta)
678
+
679
+ | action | Key params | Description |
680
+ |--------|-----------|-------------|
681
+ | `get_data` | filePath, version, jsonOnly | Fetch a data pack file |
682
+ | `get_asset` | filePath, version, jsonOnly | Fetch a resource pack file |
683
+ | `list_files` | dirPath, version, branch | List files in a directory |
684
+ | `diff` | filePath, versionA, versionB, branch | Compare a file between two MC versions |
685
+ | `atlas` | version, atlas? | Texture atlas definitions |
686
+ | `raw` | ref, filePath | Fetch any file by git ref + path |
687
+ | `compare` | versionA, versionB, branch | GitHub compare API between two MC versions |
688
+ | `changelog` | version, branch | Files changed in a specific MC version |
689
+
690
+ ### 13. `mod_jar` — Mod JAR File & Registry Access
691
+
692
+ | action | Key params | Description |
693
+ |--------|-----------|-------------|
694
+ | `list_files` | modId, prefix? | List JAR contents under an optional path prefix |
695
+ | `get_file` | modId, path | Read any file from the JAR |
696
+ | `lang` | modId, filter, limit | Translation strings from en_us.json |
697
+ | `sounds` | modId, namespace? | sounds.json registered sound events |
698
+ | `atlas` | modId, atlas?, namespace? | Texture atlas JSON |
699
+ | `registry_entries` | modId, type, filter, limit | Items/blocks/entities via lang key inspection — no decompilation needed |
700
+
701
+ ### 14. `mod_data` Mod Structured Data
702
+
703
+ `action=list` or `action=get` combined with a `type` parameter:
704
+
705
+ | type | list returns | get returns |
706
+ |------|-------------|-------------|
707
+ | `recipe` | All recipe ids | Recipe JSON |
708
+ | `loot_table` | All loot table ids | Loot table JSON |
709
+ | `advancement` | All advancement ids | Advancement JSON |
710
+ | `blockstate` | All blockstate files | Blockstate JSON |
711
+ | `model` | All model files | Model JSON |
712
+ | `biome` | All biome ids | Biome JSON |
713
+ | `structure` | All structure ids | Structure JSON |
714
+ | `data_tag` | All tag files (+ registry param) | Tag entries JSON |
715
+ | `particle` | All particle ids | Particle JSON |
716
+ | `damage_type` | All damage type ids | Damage type JSON |
717
+ | `enchantment` | All enchantment ids | Enchantment JSON |
718
+
719
+ Common params: `modId` (required), `namespace` (optional scope), `filter` (list), `id` (get), `modelPath` (get model), `registry` (data_tag only).
720
+
721
+ ### 15. `mod_tags` — Cross-Mod Tag Analysis
722
+
723
+ | action | Key params | Description |
724
+ |--------|-----------|-------------|
725
+ | `index` | modId | Scan + index tag files for one mod |
726
+ | `index_all` | | Scan + index tags for all mods |
727
+ | `namespaces` | | All tag namespaces + registries present |
728
+ | `contributors` | tagPath, registry? | Every mod contributing to a tag path |
729
+ | `mod_list` | modId, registry? | All tags a specific mod registers |
730
+ | `find_conflicts` | registry? | replace:true conflicts across mods |
731
+ | `search` | query, registry, limit | Substring search across tag paths |
732
+
733
+ ### 16. `mixin_scan` Cross-Mod Mixin Conflict Analysis
734
+
735
+ | action | Key params | Description |
736
+ |--------|-----------|-------------|
737
+ | `list_mods` | loader, mcVersion | All mixin mods with target class lists |
738
+ | `conflict_matrix` | loader, mcVersion, minConflicts | Classes targeted by 2+ mods |
739
+ | `class_detail` | targetClass | Every mod injecting into one class |
740
+ | `hotspots` | top, loader | Top-N most contested classes |
741
+ | `batch_resolve` | loader, mcVersion | Resolve @Mixin targets for all mixin mods |
742
+
743
+ ### 17. `gradle` Gradle Build File Analysis
744
+
745
+ | action | Key params | Description |
746
+ |--------|-----------|-------------|
747
+ | `get_files` | modId | Parsed build.gradle with deps, plugins, repos |
748
+ | `search` | query, modIdFilter, limit | Cross-mod grep with context |
749
+ | `compare_deps` | groupFilter, modIdFilter | Dependency comparison version conflicts, embed vs compileOnly |
750
+
751
+ ### 18. `reports` Markdown Report Generation
752
+
753
+ | report | Key params | Description |
754
+ |--------|-----------|-------------|
755
+ | `mixin_conflicts` | loader, mcVersion, minConflicts | Cross-mod mixin conflict report |
756
+ | `tag_conflicts` | registry | replace:true tag conflict report |
757
+ | `version_conflicts` | — | Duplicate modId + unsatisfied deps |
758
+ | `mod_overview` | modId | Full overview for one mod |
759
+ | `gradle_deps` | groupFilter, modIdFilter | Gradle dependency comparison |
760
+ | `pack_compat` | mcVersion, loader | One-shot pack audit: mixin conflicts + AT/AW shared targets + tag conflicts + dep issues |
761
+ | `dep_graph` | mcVersion, modId? | Full dependency graph with Mermaid diagram |
762
+ | `sidedness` | mcVersion, loader | Classify all mods as client_only / client_optional / common / server_only |
763
+ | `mod_complexity` | mcVersion, loader | Rank mods by class count + mixin + AT/AW footprint |
764
+ | `pack_changelog` | oldIds[], newIds[] | Diff two pack snapshots added/removed/updated mods |
765
+
766
+ All reports accept an optional `savePath` to write the `.md` file to disk.
767
+
768
+ ### 19. `pack_tools` — Modpack Asset & Data Conflict Analysis
769
+
770
+ | action | Key params | Description |
771
+ |--------|-----------|-------------|
772
+ | `asset_conflicts` | mcVersion?, loader?, limit | Resource pack path collisions across all mods |
773
+ | `data_conflicts` | dataType?, mcVersion?, loader?, limit | Data pack path collisions (recipes, loot tables, advancements, …) |
774
+ | `vanilla_overrides` | type=asset\|data\|both, mcVersion?, loader? | Paths where mods override vanilla files |
775
+ | `complexity` | mcVersion?, loader?, limit | Rank mods by JAR entry count (complexity proxy) |
776
+ | `pack_sidedness` | mcVersion?, loader? | Classify mods by presence of client/server entry points |
777
+ | `missing_assets` | mcVersion?, loader?, limit | Mod JAR entries referencing textures/models that don't exist |
778
+ | `at_conflicts` | mcVersion?, loader? | AT/AW entries targeted by multiple mods |
779
+
780
+ ### 20. `analyze_crash_log` Crash Log Triage
781
+
782
+ Paste a NeoForge/Forge/Fabric crash log. Cross-references stack frames against the `ModClass` index and returns suspects ranked by frame count, plus coverage warning if the class index is sparse.
783
+
784
+ | param | Description |
785
+ |-------|-------------|
786
+ | `logText` | Full text of the crash report or log snippet |
787
+
788
+ ### 21. `find_missing_deps` Missing Dependency Detection
789
+
790
+ Reads all ingested mods' declared dependencies and checks each dep ID against the ingested modId set. Skips known platform-provided deps (minecraft, neoforge, forge, fabric-api, java).
791
+
792
+ | param | Description |
793
+ |-------|-------------|
794
+ | `mcVersion` | Filter to a specific MC version |
795
+ | `loader` | Filter to a specific loader |
796
+
797
+ ### 22. `check_mod_compat` Pre-flight JAR Compatibility Check
798
+
799
+ Runs a candidate JAR through 5 checks without requiring it to be ingested first:
800
+ 1. Mixin target conflicts with existing mods
801
+ 2. AT/AW entry overlaps
802
+ 3. Asset path conflicts
803
+ 4. Missing declared dependencies
804
+ 5. Sidedness detection
805
+
806
+ | param | Description |
807
+ |-------|-------------|
808
+ | `jarPath` | Absolute path to the candidate mod JAR |
809
+ | `mcVersion` | Filter comparison pool to this MC version |
810
+ | `loader` | Filter comparison pool to this loader |
811
+
812
+ ---
813
+
814
+ ## Typical Workflows
815
+
816
+ ### Ingest a modpack
817
+
818
+ ```bash
819
+ # 1. Ingest all mods (--replace keeps DB in sync if re-running after updates)
820
+ node dist/cli.js batch-ingest /path/to/mods --index --replace
821
+
822
+ # 2. Resolve mixin targets (enables conflict detection)
823
+ node dist/cli.js batch-resolve-mixins
824
+
825
+ # 3. Sync Modrinth/CurseForge metadata
826
+ # (via MCP: platform action=batch_sync)
827
+
828
+ # 4. Index mod-shipped tags
829
+ # (via MCP: mod_tags action=index_all)
830
+
831
+ # 5. Ingest the loader for cross-reference
832
+ node dist/cli.js ingest-neoforge 21.1.228
833
+ ```
834
+
835
+ ### Run a full pack compatibility audit
836
+
837
+ ```bash
838
+ # via MCP — generates a Markdown report scoped to your pack
839
+ reports report=pack_compat loader=neoforge mcVersion=1.21.1 savePath=C:/reports/pack-compat.md
840
+ ```
841
+
842
+ The scorecard covers: duplicate mod IDs, unsatisfied deps, mixin-conflicted classes, and tag hard conflicts. AT/AW shared targets are shown separately as informational (they can only widen access, never cause crashes).
843
+
844
+ ### Pre-flight check a new mod before adding it
845
+
846
+ ```bash
847
+ # via MCP — checks against all mods currently in DB, no ingestion needed
848
+ check_mod_compat jarPath=/path/to/newmod-1.0.jar loader=neoforge mcVersion=1.21.1
849
+ ```
850
+
851
+ ### Triage a crash log
852
+
853
+ ```bash
854
+ # via MCP — paste the crash report, get ranked suspect mods
855
+ analyze_crash_log logText="<paste full crash log here>"
856
+ ```
857
+
858
+ ### Find missing dependencies
859
+
860
+ ```bash
861
+ # via MCP
862
+ find_missing_deps loader=neoforge mcVersion=1.21.1
863
+ ```
864
+
865
+ ### Cross-mod source search
866
+
867
+ ```bash
868
+ # via MCP grep across ALL decompiled mod sources at once
869
+ mod action=search_source query=LivingEntity isRegex=false
870
+ mod action=search_source query="@Mixin.*LivingEntity" isRegex=true
871
+ # Results include modId + modVersion so you know which mod each hit came from
872
+ ```
873
+
874
+ ### Detect mixin conflicts
875
+
876
+ ```bash
877
+ # via CLI (single class)
878
+ node dist/cli.js mixin-conflicts net/minecraft/world/entity/LivingEntity
879
+
880
+ # via MCP (full matrix)
881
+ mixin_scan action=conflict_matrix
882
+ reports report=mixin_conflicts savePath=C:/reports/mixin_conflicts.md
883
+ ```
884
+
885
+ ### Explore tag conflicts
886
+
887
+ ```bash
888
+ # via MCP
889
+ mod_tags action=index_all
890
+ mod_tags action=find_conflicts
891
+ mod_tags action=contributors tagPath=c:ores/iron
892
+ ```
893
+
894
+ ### Explore a mod
895
+
896
+ ```bash
897
+ node dist/cli.js get apotheosis
898
+ node dist/cli.js mixin-targets apotheosis
899
+ node dist/cli.js at-entries 2
900
+ node dist/cli.js decompile-class 2 com/shadows/apotheosis/mixin/LivingEntityMixin
901
+ ```
902
+
903
+ ### Check for updates
904
+
905
+ ```bash
906
+ node dist/cli.js sync-modrinth 2
907
+ node dist/cli.js check-updates 2
908
+ ```
909
+
910
+ ---
911
+
912
+ ## Acknowledgements
913
+
914
+ ### Services & APIs
915
+ - **[CreeperHost](https://www.creeperhost.net)** — for the free [modpacks.ch](https://www.modpacks.ch) public API powering modpack search, sync, and mod downloads.
916
+ - **[Modrinth](https://modrinth.com)** — for the free [Modrinth API](https://docs.modrinth.com) powering mod search, metadata lookup, and version sync.
917
+ - **[CurseForge](https://www.curseforge.com)** — for the [CurseForge API](https://docs.curseforge.com) powering mod and modpack browsing and sync.
918
+ - **[misode](https://github.com/misode)** — for [mcmeta](https://github.com/misode/mcmeta), the version-controlled Minecraft data repository that powers the `mc_data`, `mc_files`, and `mc_registry` tools.
919
+ - **[Mojang](https://www.minecraft.net)** — for publishing official Mojmap mappings and the Piston Meta API used for version discovery and JAR downloads.
920
+
921
+ ### Modloader teams
922
+ - **[NeoForged team](https://github.com/neoforged/NeoForge)** — for NeoForge, the [NeoForge documentation](https://docs.neoforged.net) seeded into the docs database, and the migration changelogs seeded into the primers database.
923
+ - **[FabricMC team](https://github.com/FabricMC)** — for the [Fabric Wiki](https://fabricmc.net/wiki) and [Yarn mappings](https://github.com/FabricMC/yarn) seeded into the docs database, Intermediary mappings used by the `mappings` tool, and [mcsrc.dev](https://mcsrc.dev) whose source browsing and class analysis features inspired our `mc_source` tool.
924
+ - **[MinecraftForge team](https://github.com/MinecraftForge)** — for the pre-fork Forge migration changelogs (1.18.2 1.20.1) seeded into the primers database.
925
+
926
+ ### Community contributors
927
+ - **[MCPHackers](https://mcphackers.org/)** — for [RetroMCP](https://github.com/MCPHackers/RetroMCP-Java), providing the Tiny v2 mappings that enable decompilation of legacy Minecraft versions (Alpha, Beta, and pre-1.7.10 releases).
928
+ - **[ApexModder](https://github.com/ApexModder)** — for NeoForge update primers and migration guides included in the default primers database.
929
+ - **[TheIllusiveC4](https://github.com/TheIllusiveC4)** for [Curios API](https://github.com/TheIllusiveC4/Curios), whose wiki is seeded into the docs database as a default mod API reference.
930
+ - **[ParchmentMC](https://parchmentmc.org)** for [Parchment](https://github.com/ParchmentMC/Parchment), the community-maintained parameter names and javadocs layered on top of Mojmap used by the `mappings` tool.
931
+
932
+ ### Tooling & libraries
933
+ - **[Vineflower](https://github.com/Vineflower/vineflower)** — the decompiler powering all Java source reconstruction.
934
+ - **[SpecialSource](https://github.com/md-5/SpecialSource)** — the bytecode remapper used to apply legacy SRG mappings for Minecraft 1.7.10 through 1.13.2.
935
+ - **[tiny-remapper](https://github.com/FabricMC/tiny-remapper)** — the highly optimized JAR remapping tool used to apply RetroMCP and modern mappings.
936
+ - **[SpongePowered Mixin](https://github.com/SpongePowered/Mixin)** — the Mixin framework whose annotation format the mixin-scan tool parses and analyses across mods.
937
+ - **[Model Context Protocol SDK](https://github.com/modelcontextprotocol/typescript-sdk)** the MCP server/client framework this tool is built on.
938
+ - **[Prisma](https://www.prisma.io)** — ORM powering multi-backend database support (PostgreSQL, PGlite, SQLite).
939
+ - **[pgvector](https://github.com/pgvector/pgvector)** — PostgreSQL vector extension enabling semantic search.
940
+ - **[Ollama](https://ollama.com)** — local LLM runtime used for generating semantic embeddings.
941
+ - **[Electric SQL / PGlite](https://github.com/electric-sql/pglite)** — embedded Postgres for zero-Docker deployments.
942
+ - **[better-sqlite3](https://github.com/WiseLibs/better-sqlite3)** / **[sqlite-vec](https://github.com/asg017/sqlite-vec)** — SQLite backend and vector search extension.
943
+ - **[Zod](https://zod.dev)** — runtime schema validation for all MCP tool parameters.
944
+ - **[clack](https://github.com/bombshell-dev/clack)** — the interactive setup wizard TUI.
945
+ - **[adm-zip](https://github.com/cthackers/adm-zip)** — JAR/ZIP extraction used throughout the ingestion pipeline.
946
+
947
+ ### Special thanks
948
+
949
+ A heartfelt thank you to all the members of the **ForgeCraft Discord and Minecraft server** for being a genuinely great community, for your feedback, and for supporting my development endeavours over the years. This project wouldn't be what it is without you.
950
+