agentleFS
MCDxAIMCDxAI/minecraft-dev-mcp/AGENTS.md

minecraft-dev-mcp

AGENTS.md41 starsChanged 12 months agoMITView on GitHub

Reference for AI/agent operators working in this repo. Grounded in CLAUDE.md and current project state.

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,691 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository5 other files it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Keep ESM intact: no CommonJS, ensure .js extensions on local imports after build.

    line 12
  2. Very specific:

    Add mod JAR decompilation after remapping (reuse VineFlower).

    line 43
  3. Very specific:

    Add new mapping type: extend MappingType, add downloader, wire into mapping-service, add tests.

    line 48
  4. Very specific:

    Add manual test for version: copy template under __tests__/manual/vX.Y.Z, add script test:manual:X.Y.Z.

    line 49

≈ “Common” is an estimate: at least 1 in 5 of the 16,597 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AGENT HANDBOOK – Minecraft Dev MCP

Reference for AI/agent operators working in this repo. Grounded in CLAUDE.md and current project state.

Project Snapshot

  • MCP server that lets agents decompile, remap, search, and analyze Minecraft (1.14+; obfuscated through 1.21.11).
  • Phase 1 & 2 complete (core + advanced tools); 29 integration tests green as of 2025-12-06.
  • Phase 3 focus: third-party mod analysis; missing piece is decompiling remapped mod JARs (see TODO).
  • Stack: Node 18+/ESM-only ("type": "module"), TS 5.7, Java 17+ (21+ for newest MC), better-sqlite3, VineFlower decompiler, tiny-remapper.

What Agents Should Prioritize

  • Keep ESM intact: no CommonJS, ensure .js extensions on local imports after build.
  • Registry extraction must use the obfuscated server JAR with version-aware bundler flag; never the client JAR.
  • Yarn remapping is two-step: official → intermediary → yarn; do not collapse into one pass.
  • Respect cache layout in platform app data (jars/, mappings/, remapped/, decompiled/{version}/{mapping}/, registry/{version}/, resources/, search-index/, cache.db).
  • VineFlower drops libraries/, versions/, logs/ in CWD during runs; temporary and gitignored.

Architecture Wayfinder (src/)

  • services/: version-manager (JARs), mapping-service (Yarn/Mojmap/Intermediary), remap-service (two-step Yarn), decompile-service (VineFlower), registry-service (data generator on server JAR), source-service (pipeline orchestrator).
  • java/: tiny-remapper, vineflower, mc-data-gen (bundler vs legacy invocation), java-process (exec wrapper).
  • downloaders/: Mojang assets/mappings, Yarn mappings, Java tool JARs.
  • cache/: cache manager + SQLite metadata DB.
  • utils/paths.ts: resolves OS-specific cache roots.

Available MCP Tools (for LLM surfaces)

  • Phase 1 core: get_minecraft_source, decompile_minecraft_version, list_minecraft_versions, get_registry_data.
  • Phase 2 analysis: remap_mod_jar, find_mapping, search_minecraft_code, compare_versions, analyze_mixin, validate_access_widener, validate_access_transformer, compare_versions_detailed, index_minecraft_version, search_indexed, get_documentation, search_documentation.
  • Phase 3: analyze_mod_jar (metadata/mixins/bytecode scan). Missing: decompile remapped mod JARs.

Critical Behaviors & Pitfalls

  • Registry paths: MC ≥1.21 writes reports/registries.json; <1.21 uses generated/reports/registries.json. Names are singular (block, item, entity), auto-prefixed with minecraft: if absent.
  • Java invocation: MC 1.18+ bundler needs -DbundlerMainClass=net.minecraft.data.Main; pre-1.18 uses -cp mode.
  • Performance: first decompile downloads/remaps (~400–500 MB/version). Caching makes subsequent requests near-instant.
  • Integrity: downloads are SHA-verified; cache rebuilds on corruption; Java processes run with timeouts and memory caps.

Testing & Commands

  • Fast suite: npm test (vitest, targets 1.21.10 pipeline end-to-end).
  • Manual/versioned suites: npm run test:manual (Yarn 1.21.10/1.20.1/1.19.4), npm run test:manual:mojmap (+ version-specific overrides).
  • Dev/build: npm run dev (tsx watch), npm run build, npm run typecheck, npm run lint[:fix].
  • Full sweep: npm run test:all (CI + manual).

Active TODO / Gaps

  • Add mod JAR decompilation after remapping (reuse VineFlower); target output under decompiled-mods/{mod-id}/{version}/{mapping}/. New tool name suggestion: decompile_mod_jar or remap_mod_jar with decompile flag.

Quick Playbooks

  • Retrieve class source: ensure version cached → get_minecraft_source(version, className, mapping); triggers download/remap/decompile if missing.
  • Extract registries: use registry-service with server JAR and version-aware path detection; fail fast on wrong registry names.
  • Add new mapping type: extend MappingType, add downloader, wire into mapping-service, add tests.
  • Add manual test for version: copy template under __tests__/manual/vX.Y.Z, add script test:manual:X.Y.Z.

Support Files & References

  • Primary context: CLAUDE.md (architecture, constraints, known issues).
  • Manual test guide: __tests__/manual/README.md.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.