MineCode is a local Model Context Protocol (MCP) server that gives AI assistants like GitHub Copilot and Claude real-time access to version-accurate Minecraft data, documentation, vanilla presets, and your Minecraft logs.
Written for a hackathon about MCP sponsored by dust, alpic, and others. Prototyped using the worst ai model ;-; (note I rewrote it now it is actually viable). Please star if you'd like to help out, and open issues for anything broken.

🎯 The problem this solves
AI assistants get Minecraft syntax wrong constantly, and they do it confidently. The reason is simple: Minecraft's datapack format changed substantially and repeatedly, and every model's training data is older than the current game.
- 1.20.5 replaced item NBT with typed components. Old NBT is now a hard parse error.
- 1.21 renamed every datapack folder to singular (
advancements/ → advancement/). A pack with the old names loads with no error and no content — it silently does nothing.
- 1.21.2 dropped the
generic. prefix from every attribute ID.
- 1.21.4 turned
custom_model_data from an integer into an object.
- 1.21.5 made text components strictly typed.
minecraft.wiki documents only the latest version, so consulting it for an older pack actively makes this worse.
MineCode attacks this from four directions:
minecraft_start_session — detects the target version from pack.mcmeta before any code is written, so nothing downstream is guessing.
get_technical_changes — returns what actually changed between two versions, from misode/technical-changes plus a curated table of the traps agents fall into most.
get_command_usage / validate_command — command syntax compiled from the game's own Brigadier grammar, and a parser to check the agent's output against it.
- Honest tool descriptions — every wiki tool states up front that it covers the latest version only, and names the version-exact alternative.
🚀 Installation
Requires Python 3.10 or newer. Check with python --version (Windows: py --version).
Windows
py -m pip install --upgrade pip
py -m pip install minecode-mcp
Verify:
py -m minecode.server --help 2>$null; py -c "import minecode; print('ok')"
If py is not recognised: Python isn't installed or wasn't added to PATH. Reinstall from python.org with "Add python.exe to PATH" ticked. Avoid the Microsoft Store build — it sandboxes file access, which breaks reading pack.mcmeta and Minecraft logs from arbitrary paths.
macOS
python3 -m pip install --upgrade pip
python3 -m pip install minecode-mcp
If your Python is Homebrew-managed you'll hit error: externally-managed-environment. Use a venv (see below) or pipx:
brew install pipx && pipx install minecode-mcp
Linux
python3 -m pip install --upgrade pip
python3 -m pip install minecode-mcp
Most modern distributions (Arch, Debian 12+, Ubuntu 23.04+, Fedora) mark the system Python as externally managed and will refuse the command above. That protection is correct — don't override it with --break-system-packages. Use one of:
# Option A: pipx — recommended, isolated but still on PATH
sudo pacman -S python-pipx # Arch
sudo apt install pipx # Debian/Ubuntu
sudo dnf install pipx # Fedora
pipx install minecode-mcp