mcdev-mcp
Allows executing Groovy scripts inside a running Minecraft instance for live game interaction, including state snapshots, screenshots, world introspection, and more.
Provides a Python scripting guide and wire-protocol reference for driving the DebugBridge mod directly from Python, enabling programmatic control of the Minecraft client.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcdev-mcp show me the source of EntityPlayer class"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcdev-mcp
An MCP (Model Context Protocol) server that empowers AI coding agents to work effectively with Minecraft mod development. Provides both static analysis of decompiled source code and runtime interaction with a running Minecraft instance.
Features
Static Analysis (work offline)
Decompiled Source Access — Auto-downloads and decompiles Minecraft client using Vineflower
Dev Snapshot Support — Works with development snapshots (e.g.,
26.1-snapshot-10) that lack ProGuard mappingsSymbol Search — Search for classes, methods, and fields by name (
mc_search)Source Retrieval — Get full class source or individual methods with context
Package Exploration — List all classes under a package path or discover available packages
Class Hierarchy — Find subclasses and interface implementors
Call Graph Analysis — Find method callers and callees across the entire codebase
Runtime Interaction (requires DebugBridge mod)
Live Groovy Execution — Execute Groovy scripts inside the running Minecraft JVM (
mc_execute); migrated from Lua in mid-2026Game State Snapshots — Player position, health, dimension, time, weather (
mc_snapshot)Screenshots, Recordings & Screen Inspection — Game-window JPEG, multi-frame contact sheet for temporal debug, and current-GUI structure (
mc_screenshot,mc_record_video,mc_screen_inspect)World Introspection — Nearby entities and block-entities, plus per-id details (
mc_nearby_entities,mc_entity_details,mc_nearby_blocks,mc_block_details,mc_looked_at_entity)Visual Markers — Outline entities or blocks for the user to spot (
mc_set_entity_glow,mc_set_block_glow,mc_clear_block_glow)Item Texture Rendering — Render an inventory slot, an item id, or a slot on another entity as PNG (
mc_get_item_texture,mc_get_item_texture_by_id,mc_get_entity_item_texture)Chat History — Recent client-side chat messages (
mc_chat_history)Session Control & Dev Loop — Join/leave servers, quit the client, and reconnect after a relaunch (
mc_join_server,mc_leave_server,mc_quit_client,mc_wait_for_bridge,mc_wait_until_in_world; gated bysession_control_enabledin the DebugBridge config). Build/launch orchestration is the coding agent's job, guided by themcdev://guides/dev-loopresource and theminecraft-dev-loopskill.Slash Commands — Execute in-game commands (
mc_run_command, opt-in dev tool)Script Execution Logs — Review past
mc_executeruns and error patterns (mc_script_logs, opt-in via Claude Desktop user setting)
MCP Resources
mcdev://guides/python-scripting— Wire-protocol reference for AI agents that want to drive DebugBridge from Python directly (bypassing the MCP tools): WebSocket framing, a minimal asyncio client, and the Groovy surface you send through it. Surfaced via the standard MCPresources/list+resources/read, with a pointer in the server'sinstructionsso agents know to look.
Related MCP server: MCP Plus
Quick Start
Security note —
initis intentionally terminal-only. The MCP server only exposes read/query tools. Downloading and decompiling Minecraft sources must be triggered by you in the terminal; an AI agent connected to the server has no tool surface to triggerinit,rebuild,clean, orcallgraph.
1. Initialize in your terminal
# Download, decompile, and index Minecraft sources (~2-5 minutes)
npx mcdev-mcp init -v 1.21.11This command:
Downloads the Minecraft client JAR
Decompiles using Vineflower (pure Java, 8 threads)
Builds the symbol index (classes, methods, fields, inheritance)
Generates call graph for
mc_find_refs
Data is stored in your OS cache directory (see Storage location below), so it persists across npx invocations. Expect roughly ~2 GB per Minecraft version — mostly decompiled .java sources and a SQLite callgraph database. All of it is regeneratable, so your OS is free to evict it under storage pressure and init will rebuild what it needs.
2. Add to your MCP client
Codex Desktop / Codex CLI
Codex can launch local stdio MCP servers directly. Install the published package with:
codex mcp add mcdev-mcp -- npx -y mcdev-mcp serveIf you are developing from a local checkout, build first and point Codex at the local server:
git clone https://github.com/use-ai-for-mc/mcdev-mcp.git
cd mcdev-mcp
npm install
npm run build
codex mcp add mcdev-mcp -- node "$(pwd)/dist/index.js"Verify that Codex can see it:
codex mcp list
codex mcp get mcdev-mcpRestart Codex Desktop, or start a new Codex session, after adding the server. Codex will launch the MCP server automatically when a session needs it; you do not run serve by hand.
Other MCP clients
{
"mcpServers": {
"mcdev": {
"command": "npx",
"args": ["-y", "mcdev-mcp", "serve"]
}
}
}The serve subcommand starts the MCP server over stdio. Your MCP client (Claude Desktop, Cursor, etc.) launches it automatically — you never run serve directly.
3. (Optional) Install DebugBridge for live-game tools
The static analysis tools (mc_search, mc_get_class, mc_find_refs, …) work as soon as init finishes. The runtime tools (mc_execute, mc_snapshot, screenshots, world introspection, item textures, glow markers, etc.) additionally require the DebugBridge mod installed in the Minecraft instance you want to drive. Without DebugBridge, those tools will just report a connection error — the static half keeps working unaffected.
Supported Versions
Version Type | Example | Notes |
New scheme ( |
| Recommended. Ships pre-unobfuscated; no ProGuard mapping step. |
Releases |
| Supported. Mojang's official ProGuard mappings are required (downloaded automatically). |
Older releases ( |
| Not supported — no official mappings published. |
The validator lives in src/cli.ts (isValidVersion). For 1.x.x releases it requires 1.14 or later; the new 26.x+ scheme is accepted unconditionally.
(Optional) Skip Call Graph
# Skip callgraph generation if you don't need mc_find_refs
npx mcdev-mcp init -v 1.21.11 --skip-callgraph
# Generate callgraph later
npx mcdev-mcp callgraph -v 1.21.11Verify Installation
npx mcdev-mcp statusNote:
mc_version(withaction: "set") must be called before using any other static MCP tools. If the version isn't initialized, the AI will be instructed to ask you to runinit.
Install from source (development)
git clone https://github.com/use-ai-for-mc/mcdev-mcp.git
cd mcdev-mcp
npm install
npm run build
# Use the local build instead of npx
node dist/cli.js init -v 1.21.11
node dist/cli.js serve # stdio MCP server; MCP clients launch thisUpgrading from an older version? If you have a previous installation using DecompilerMC, run
npx mcdev-mcp clean --allfirst to remove old cached data.
MCP Tools
Version Management (Static Tools)
Before using static tools, set the active Minecraft version:
mc_version
Manage the active Minecraft version. Call with action: "set" before other static tools, or action: "list" to see what's initialized.
{
"action": "set",
"version": "1.21.11"
}{
"action": "list"
}Static Tool Requirements
Tool | Requires | Requires |
| - | - |
| ✓ | - |
| ✓ | - |
| ✓ | - |
| ✓ | - |
| ✓ | - |
| ✓ | - |
| ✓ | ✓ |
mc_search
Search decompiled source code for classes, methods, or fields by name pattern.
{
"query": "Minecraft",
"type": "class"
}mc_get_class
Get the full decompiled source code for a class.
{
"className": "net.minecraft.client.Minecraft"
}mc_get_method
Get source code for a specific method with context.
{
"className": "net.minecraft.client.Minecraft",
"methodName": "tick"
}mc_find_refs
Find who calls a method (callers) or what it calls (callees).
{
"className": "net.minecraft.client.MouseHandler",
"methodName": "setup",
"direction": "callers"
}Direction | Description |
| Find methods that call this method |
| Find methods this method calls |
Note: Requires callgraph to be generated (included in
initby default).
mc_list_classes
List all classes under a specific package path (includes subpackages).
{
"packagePath": "net.minecraft.client.gui.screens"
}mc_list_packages
List all available packages. Optionally filter by namespace.
{
"namespace": "minecraft"
}Namespace | Description |
| Minecraft client classes |
| Fabric API classes (if indexed) |
mc_find_hierarchy
Find classes that extend or implement a given class or interface.
{
"className": "net.minecraft.world.entity.Entity",
"direction": "subclasses"
}Direction | Description |
| Classes that extend this class |
| Classes that implement this interface |
Runtime Tools
These tools require Minecraft to be running with the DebugBridge mod installed.
mc_connect
Connect to a running Minecraft instance. Other runtime tools auto-connect if needed. Pass reset: true to disconnect and clear state before reconnecting (useful when switching instances). If port is omitted, scans ports 9876-9886.
{
"port": 9876,
"reset": false
}mc_execute
Execute Groovy code in the running game. The binding persists across calls,
and mc / player / level are pre-bound. (The runtime migrated from Lua
to Apache Groovy 5 in mid-2026 — the tool description carries a Lua→Groovy
cheat-sheet.)
return player.blockPosition().toShortString()mc_snapshot
Get a structured snapshot of current game state (player, world, time, weather).
{}mc_screenshot
Capture the game window as a JPEG file and return its path.
{
"downscale": 2,
"quality": 0.75
}mc_record_video
Capture a short burst of frames for debugging temporal rendering issues (animation glitches, shader bugs, particles, sub-tick artifacts a single screenshot can't resolve). Returns either one composed grid JPEG (default) or N separate frame JPEGs.
{
"frames": 60,
"interval": 50,
"output": "grid",
"downscale": 2,
"quality": 0.75
}interval is either "frame" (every render tick, ~60 Hz) or milliseconds (number, >= 1). Numeric intervals (50–100 ms) are recommended unless you specifically need sub-tick detail; at "frame" cadence the encoder may fall behind and the response's dropped count tells you how many frames were skipped. Capped at 300 frames per call. Files land under <gameDir>/debugbridge-recordings/<requestId>/.
mc_screen_inspect
Snapshot the screen the player currently has open (chest UI, inventory, advancement screen, etc.) and return its structure.
{
"includeIcons": false
}Set includeIcons: true to render each unique item in the screen as a small PNG and attach an icons map keyed by registry id.
mc_chat_history
Get the most recent client-side chat messages — what the user has seen in chat.
{
"limit": 50,
"includeJson": false
}Set includeJson: true to include each message's full Minecraft Component JSON (useful when chat-message styling matters).
mc_nearby_entities
List entities (mobs, items, projectiles, players) within a radius of the player.
{
"range": 64,
"limit": 100,
"includeIcons": false
}Returns each entity's id, type, position, and primary equipment summary. Pass the id to mc_entity_details, mc_set_entity_glow, or mc_get_entity_item_texture to drill in.
mc_entity_details
Get full details for one entity by id (the id field returned by mc_nearby_entities or mc_looked_at_entity).
{
"entityId": 12345
}mc_looked_at_entity
Returns the entity id the player is currently aiming at (raycast), or null if nothing is in the line of sight.
{
"range": 64
}mc_nearby_blocks
List nearby block-entities (signs, chests, banners, beacons, hoppers, …). Plain world blocks aren't included — use mc_block_details for any specific position.
{
"range": 16,
"limit": 100
}mc_block_details
Get details for the block-entity at (x, y, z): sign lines, chest contents, banner patterns, etc.
{
"x": 100,
"y": 64,
"z": 200
}mc_set_entity_glow
Outline an entity with the team-colour glow so the user can spot it. Pass glow: false to remove.
{
"entityId": 12345,
"glow": true
}mc_set_block_glow
Highlight a block in the world (yellow outline on 1.19, vanilla glow on newer versions). Pass glow: false to remove just this position.
{
"x": 100,
"y": 64,
"z": 200,
"glow": true
}mc_clear_block_glow
Clear all block highlights set via mc_set_block_glow in one call.
{}mc_get_item_texture
Render the item in the player's inventory slot N as a PNG attached as MCP image content.
{
"slot": 0
}Slot range | Meaning |
0–35 | Main inventory (0–8 are the hotbar) |
36–39 | Armor (boots, leggings, chestplate, helmet) |
40 | Off-hand |
mc_get_item_texture_by_id
Render the default texture for a registry id (e.g. minecraft:diamond) without needing the item to be in any inventory.
{
"itemId": "minecraft:diamond"
}mc_get_entity_item_texture
Render an item carried by another entity. slot is "mainhand", "offhand", or one of the armor slot names.
{
"entityId": 12345,
"slot": "mainhand"
}Session control & dev loop
These five tools are the bridge-side primitives of the rebuild → relaunch → rejoin loop. The underlying endpoints (disconnect, joinServer, quit) are disabled by default: set "session_control_enabled": true in <minecraft>/config/debugbridge.json and restart the client (the flag is read at startup). mc_connect reports whether the connected instance has it enabled, and the tools return exact instructions when it's off.
The machine-specific halves of the loop — building the mod, copying the jar into <gameDir>/mods/, and launching the client — are deliberately not server tools: a coding agent with shell access discovers and runs them itself, guided by the mcdev://guides/dev-loop resource (also available as a copyable Claude Code skill in skills/minecraft-dev-loop/). The short version: the agent derives the deploy target, instance name, and launcher from the gameDir that mc_connect reports, persists the launch command it composes in the project's CLAUDE.md, and leaves authentication entirely to the launcher.
Caution:
mc_quit_clientshuts down the whole Minecraft client, andmc_join_server/mc_leave_serverchange which world the user is in — they tear down the current play session. For repeated automated test runs, prefer a local throwaway server over a live community server (nondeterministic world, other players, server rules).
mc_join_server
Join a multiplayer server (disconnecting from the current world first if needed). The server resource pack is pre-accepted by default so the join doesn't stall on the confirmation prompt. The bridge ack means the connect attempt has started: bridges ≥ 2.0.0 defer it until the client has settled (no startup/reload overlay), so a join fired right after a relaunch may take some extra seconds to ack; older bridges ack as soon as the request is queued. By default the tool then polls every second until a game snapshot shows a player (joined) or a DisconnectedScreen appears (failed — its title is returned as the reason).
{
"address": "localhost:25565",
"acceptResourcePacks": true,
"wait": true,
"timeoutSeconds": 60
}mc_leave_server
Leave the current world/server to the title screen (when not in a world, it still resets the open menu screen to the title screen). Fire-and-acknowledge — the ack means the disconnect was queued on the game thread.
{}mc_wait_until_in_world
Poll until the player is in a world, a DisconnectedScreen appears, or the timeout elapses. Read-only (doesn't require session control); useful after mc_join_server with wait: false or after a relaunch.
{
"timeoutSeconds": 60
}mc_quit_client
Gracefully shut down the Minecraft client (the WebSocket dropping right after the ack is the normal success mode). By default it resolves the client's PID from the bridge port before quitting, then polls until the port stops listening and that process exits — on success it's safe to relaunch immediately, even through launchers that track the instance (Prism silently ignores --launch while it still sees the old process). When the PID can't be resolved (no lsof, permissions), it falls back to port-close-only and the result says so — the JVM can outlive the port by a few seconds, so in that case confirm the old process exited yourself before relaunching.
{
"waitForExit": true,
"timeoutSeconds": 30
}mc_wait_for_bridge
Block until a freshly (re)launched client's bridge answers, then connect to it. Sweeps ports 9876-9886 once per second, only accepting the instance that matches the previous connection's game directory / version — so a second running instance isn't mistaken for the relaunch. Pass expectedVersion only when deliberately switching instances. Read-only.
{
"expectedVersion": "1.21.11",
"timeoutSeconds": 120
}mc_run_command (opt-in dev tool)
Execute a Minecraft slash command.
{
"command": "/give @s minecraft:diamond 64"
}Disabled by default. Both this server (
MCDEV_RUN_COMMAND=1) and the DebugBridge mod (runCommandEnabledinBridgeConfig) must opt-in. See Opt-in / dev tools below.
mc_script_logs (opt-in dev tool)
Review the file-backed log of past mc_execute runs (timestamp, code, result, error, duration), summarise common error patterns, or print the log paths.
{
"mode": "errors",
"limit": 20
}Mode | Returns |
| The most recent failed |
| Aggregate error patterns (which messages recur) |
| Where the log files live on disk |
Disabled by default. Enabled by
MCDEV_SCRIPT_LOGS=1. The Claude Desktop MCPB exposes this as a user-facing toggle ("Log script executions") — see Opt-in / dev tools.
Opt-in / dev tools
Two runtime tools are gated behind environment variables so the default server only exposes the read-only and "safe" wrappers. The bridge mod has its own matching flags, so flipping just the server-side env on does nothing if the mod hasn't also opted in.
Tool | Env var | Bridge-side flag | Surface in Claude Desktop |
|
|
| Not exposed via the MCPB user_config — set the env explicitly when launching the server. |
|
| (server-side only) | "Log script executions" toggle in the MCPB extension settings (also enables file logging of every |
When the env var is unset (or set to 0/false), the tool simply isn't registered and won't appear in the MCP client's tool list.
AST-based Java indexer (preview)
Set MCDEV_AST_PARSER=1 before init or rebuild to use the new java-parser-backed indexer. Compared to the default regex parser it:
Correctly handles multi-line annotations, nested generics, records, sealed types, pattern matching, and lambda-initialised fields (the regex parser silently miscounts on each of these).
Picks up interface constants and
default/staticinterface methods that the regex parser misses.Does not fold nested-class members into the outer type's lists.
In a head-to-head on Minecraft 1.21.11 source (500-file sample), the AST parser found ~2× more fields and ~33% fewer (correctly attributed) methods than the regex parser. It is ~4.5× slower per file, so a full re-index runs in roughly 75 seconds instead of 17 — acceptable inside an init that already takes 2–5 minutes for download + decompile. Very large generated command classes are isolated in bounded worker processes; if java-parser still exhausts a worker on one file, the indexer falls back to the regex parser for that file instead of failing the whole rebuild.
MCDEV_AST_PARSER=1 npx mcdev-mcp init -v 1.21.11
# or, to re-index an already-decompiled version:
MCDEV_AST_PARSER=1 npx mcdev-mcp rebuild -v 1.21.11 --with-callgraphThe MCP server stamps manifest.indexerVersion so it can tell which parser produced the existing index. When you flip the flag but haven't rebuilt yet, the server prints a one-time hint per version on the next tool call:
[source-store/manifest:1.21.11] Index was built with the 'regex' parser, but the server is now running the 'ast' parser.
This is fine — existing indices still work — but the new parser would produce a better index.
Run `mcdev-mcp rebuild -v 1.21.11` (or `init -v 1.21.11` for a full re-fetch) to refresh.
Set MCDEV_SUPPRESS_INDEXER_HINT=1 to silence this message.Requirements
Dependency | Version | Purpose |
Node.js | 18+ | Runtime |
Java | 8+ | Decompilation (Vineflower) & callgraph |
~2GB | disk | Decompiled sources + cache |
Note: Java 17+ is recommended for the
callgraphcommand due to Gradle compatibility.
CLI Commands
Invoke via npx mcdev-mcp <command> (or node dist/cli.js <command> from a source checkout).
Command | Description |
| Start the MCP server over stdio (launched by MCP clients — not run by humans) |
| Download, decompile, index Minecraft sources, and generate callgraph |
| Same as above but skip callgraph generation |
| Generate call graph for |
| Show all initialized versions and what stage each one is at |
| Rebuild the symbol index from already-cached sources |
| Also regenerate the callgraph in the same run |
| Remove cached data for one version |
| Remove all cached data across versions |
Re-indexing
To re-index a version:
# Clean existing data for a version
npx mcdev-mcp clean -v 1.21.11 --all
# Re-initialize
npx mcdev-mcp init -v 1.21.11Architecture
mcdev-mcp/
├── src/
│ ├── index.ts # MCP server entry point
│ ├── cli.ts # CLI commands
│ ├── tools/
│ │ ├── static/ # Decompiled source tools
│ │ └── runtime/ # DebugBridge runtime tools
│ ├── decompiler/ # Vineflower integration
│ ├── indexer/ # Symbol index builder
│ ├── callgraph/ # Call graph generation & queries
│ └── storage/ # Source & index storage
└── dist/ # Compiled outputHow It Works
┌─────────────────────────────────────────────────────────────┐
│ MCP Client (AI Agent) │
└─────────────────────────────────────────────────────────────┘
│
┌────────────────────┴────────────────────┐
▼ ▼
┌─────────────────────────────┐ ┌──────────────────────────────────┐
│ Static Tools (8) │ │ Runtime Tools (18 + 2 opt-in) │
│ ┌────────────────────────┐ │ │ ┌────────────────────────────┐ │
│ │ mc_version │ │ │ │ mc_connect / mc_execute │ │
│ │ mc_search │ │ │ │ mc_snapshot / mc_screenshot│ │
│ │ mc_get_class / method │ │ │ │ mc_screen_inspect │ │
│ │ mc_list_classes / pkgs │ │ │ │ mc_chat_history │ │
│ │ mc_find_hierarchy │ │ │ │ mc_nearby_entities + det. │ │
│ │ mc_find_refs │ │ │ │ mc_nearby_blocks + det. │ │
│ └───────────┬────────────┘ │ │ │ mc_looked_at_entity │ │
│ │ │ │ │ mc_set_*_glow / mc_clear_* │ │
│ ┌──────┴──────┐ │ │ │ mc_get_item_texture (×3) │ │
│ ▼ ▼ │ │ │ ─── opt-in (env-gated) ─── │ │
│ ┌─────────┐ ┌──────────┐ │ │ │ mc_run_command │ │
│ │ Index │ │Callgraph │ │ │ │ mc_script_logs │ │
│ │ (JSON) │ │ (SQLite) │ │ │ └─────────────┬──────────────┘ │
│ └────┬────┘ └────┬─────┘ │ │ │ │
└───────┼────────────┼────────┘ │ ┌──────┴──────┐ │
▼ ▼ │ ▼ │ │
┌────────────────────────────┐ │ ┌──────────────┐ │ │
│ Decompiled Src (local) │ │ │ WebSocket │ │ │
│ (Vineflower) │ │ │ to Minecraft │ │ │
└────────────────────────────┘ │ └──────┬───────┘ │ │
└──────────┼────────────┘
▼
┌────────────────────────────┐
│ DebugBridge Mod (in game) │
│ github.com/use-ai-for-mc/ │
│ debugbridge │
└────────────────────────────┘See docs/ARCHITECTURE.md for detailed design documentation.
Storage location
mcdev-mcp stores all cached data in the OS-standard cache directory, courtesy of env-paths. Everything under this directory is regeneratable — safe to delete at any time — and init will rebuild what it needs on next run.
Platform | Path |
macOS |
|
Linux |
|
Windows |
|
Disk usage: approximately 2 GB per Minecraft version (JAR ~60 MB, decompiled sources ~1.8 GB, callgraph DB ~200 MB, symbol index ~50 MB). Run npx mcdev-mcp status to see which versions are cached, and npx mcdev-mcp clean --all (or clean -v <version> --all) to reclaim space.
Layout
<cache-dir>/
├── tools/
│ └── vineflower.jar # Decompiler, downloaded once
├── java-callgraph2/ # Call graph tool, cloned once
├── cache/
│ └── {version}/
│ ├── jars/ # Downloaded Minecraft client JARs
│ └── client/ # Decompiled Minecraft sources
├── index/
│ └── {version}/
│ ├── manifest.json # Index metadata
│ └── minecraft/ # Per-package symbol indices
└── tmp/ # Temporary files (cleaned by --all)Upgrading from a pre-1.0 install? Earlier versions stored everything under
~/.mcdev-mcp/. If you have data there and want to keep it, move it manually to the new location (e.g. on macOS:mv ~/.mcdev-mcp ~/Library/Caches/mcdev-mcp). Otherwise just runinitagain — the download step is idempotent.
Development
npm run build # Compile TypeScript
npm test # Run tests
npm run lint # Lint code
npm run mcpb # Build a Claude Desktop MCPB bundle for the current platformReleasing
Releases are tag-driven. Pushing a v* tag triggers GitHub Actions to:
Run the full test matrix and TypeScript checks
Build a single universal MCPB bundle on
ubuntu-latestPublish the package to npm
Create a GitHub Release with the
.mcpbattached
To cut a release:
# 1. Bump the version. npm version only touches package.json; mirror the same
# value into manifest.json by hand — the verify-version CI job hard-fails
# if the two disagree with the tag.
npm version patch # or: minor, major, 1.2.3, etc.
$EDITOR manifest.json # set "version" to match package.json
# 2. Commit the manifest bump (npm version already committed package.json)
git commit -am "Sync manifest.json version"
git tag -f "v$(node -p 'require(\"./package.json\").version')"
# 3. Push the commit and the tag
git push --follow-tagsThat's it — the workflow at .github/workflows/ci.yml handles the rest. No NPM_TOKEN secret is needed; the workflow publishes to npm via Trusted Publishing (OIDC). A trusted publisher must be configured on the npm side, under the package's publishing-access settings: owner use-ai-for-mc, repo mcdev-mcp, workflow ci.yml. Releases also ship npm provenance attestations via npm publish --provenance.
The MCPB build is also runnable locally:
npm run mcpb
# → dist-mcpb/mcdev-mcp-<version>.mcpbThe bundle is universal — pure JavaScript plus sql.js (SQLite compiled to WebAssembly), no native binaries. The same .mcpb works on macOS (arm64 and x86_64), Linux (x64/arm64), and Windows. Node ≥ 20 is required at runtime (from package.json engines).
Installing the MCPB in Claude Desktop
Download the bundle from the Releases page and double-click the .mcpb file. Claude Desktop will validate the manifest and offer to install it. After install, run mcdev-mcp init -v <version> in a terminal once to populate the cache (the extension cannot trigger init itself — it's deliberately terminal-only, see Quick Start).
Limitations
Static Analysis:
mc_find_refscannot trace calls through reflection, JNI callbacks, or lambda/method references created dynamicallyClient Only: Server-side classes are not included in static analysis
Runtime Tools: Require Minecraft running with the DebugBridge mod installed
Legal Notice
This tool decompiles Minecraft source code for development reference purposes. Please respect Mojang's intellectual property:
You MAY:
Decompile and study the code for understanding and learning
Use the knowledge to develop mods that don't contain substantial Mojang code
Reference class/method names for mod development
You may NOT:
Distribute decompiled source code
Distribute modified versions of Minecraft
Use decompiled code commercially without permission
Per the Minecraft EULA: "You may not distribute any Modded Versions of our game or software" and "Mods are okay to distribute; hacked versions or Modded Versions of the game client or server software are not okay to distribute."
This tool is for reference only — do not copy decompiled code directly into your projects.
Third-Party Components
This project includes or uses third-party software under the following licenses:
DecompilerMC (MIT) — Decompiler logic adapted and translated from Python to TypeScript in
src/decompiler/Vineflower (Apache-2.0) — Java decompiler used for source generation
java-callgraph2 — Cloned at runtime for static call graph generation
Additional runtime dependencies (downloaded/used):
Mojang — Official ProGuard mappings and Minecraft client JAR
See LICENSE for full license text and third-party attributions.
License
MIT — Copyright (c) 2025 mcdev-mcp contributors
Available Tools
31 toolsmc_block_detailsA
Get details for the block-entity at (x, y, z): sign lines, chest contents, banner patterns, skull profile, beacon level, etc.
Returns {gone: true} if there is no block-entity at that position (e.g. plain terrain, or it was broken since the last mc_nearby_blocks call).
Inputs: x (required), y (required), z (required).
mc_chat_historyA
Get the most recent client-side chat messages — what the user has seen in the chat overlay, including system messages and command output.
Prefer this over walking mc.gui.getChat().allMessages from Groovy (which costs one bridge round-trip per field on each message). Returns {plain, addedTime} per message, newest-first. Set includeJson=true to also receive each message as a structured Component (preserves colors, styles, click events, hover events) — handy for parsing colored command output.
Inputs: limit, includeJson.
mc_clear_block_glowA
Clear all block highlights set via mc_set_block_glow.
Inputs: no named parameters.
mc_connectA
Connect to a running Minecraft instance with the DebugBridge mod. Optional - other runtime tools auto-connect if needed. Useful to specify a non-default port, reconnect to a different instance, or get session info.
If port is not specified, scans ports 9876-9886 to find the mod. Use reset=true to disconnect and clear state before reconnecting.
Inputs: port, reset.
mc_entity_detailsA
Get full details for one entity by id (the id field returned by mc_nearby_entities). Includes equipment slots with damage and custom names, mounted vehicle, passengers, attributes, and frame contents where applicable.
Returns {gone: true} if the entity has despawned or its chunk has unloaded.
Inputs: entityId (required).
mc_executeA
Execute GROOVY code in the Minecraft session (the runtime migrated from Lua to Apache Groovy 5 in mid-2026 — see the migration note at the end if you knew the old surface). The binding is persistent: undeclared assignments (x = 5) survive to later calls; def x is script-local.
PREFER NATIVE TOOLS WHERE POSSIBLE — they're faster and avoid script overhead:
Player state (x/y/z/yaw/pitch/look/velocity/vehicle/raycast target/world): mc_snapshot
Nearby entities or one entity's details: mc_nearby_entities / mc_entity_details
Nearby block entities (signs, chests, etc.): mc_nearby_blocks / mc_block_details
Open screen / inventory contents: mc_screen_inspect
Recent chat: mc_chat_history
Item textures: mc_get_item_texture (by slot or by id) Reach for mc_execute when you need to explore the Java API or do something the native tools don't cover.
Pre-bound globals: mc (Minecraft instance), player, level — plus the "java" helper.
Mojang names everywhere, on every Minecraft version: obj.foo reads a field (JavaBean getter fallback), obj.foo(args) calls a method. Overloads resolve by argument types; decimal literals coerce to double/float params.
Minecraft classes can't be named directly on obfuscated builds — load them via java.type: def Vec3 = java.type('net.minecraft.world.phys.Vec3'); construct with Vec3(1, 2, 3) or Vec3.create(1, 2, 3). (Single-quote class names: double-quoted GStrings interpolate the $ in inner-class names.)
The "java" helper provides:
java.type(className) - class handle for statics + construction, by Mojang name
java.list(x) - Java collection/array -> Groovy List (use for iteration)
java.typeName(obj) - the Mojang class name
java.isNull(obj) - null check
java.ref(refId) - retrieve a stored object reference ($ref_N from results)
sync { ... } - run the closure ON THE GAME THREAD in one hop. Use it to batch bulk loops (hundreds of entities/slots run in milliseconds instead of one thread-hop per call): sync { java.list(level.entitiesForRendering()).collect { java.typeName(it) } }
Reflection helpers for exploring API:
java.describe(obj) - full dump: class, fields, methods, supers
java.methods(obj, [filter]) - list methods (optional name filter)
java.fields(obj, [filter]) - list fields (optional name filter)
java.supers(obj) - class hierarchy and interfaces
java.find(pattern, [scope]) - search mappings for classes/methods/fields
Plain JDK classes work natively (System.currentTimeMillis(), new File(path).text = "..."). Sandbox: Runtime / ProcessBuilder / java.net.* are blocked; file I/O is allowed. Caveat: bridge-wrapped Minecraft objects don't auto-unwrap when passed to NATIVE Java calls like new File(wrappedFile, name) — pass strings/primitives or unwrap with wrapped.getTarget(). Bridge-dispatched calls (anything on mc/player/level or a java.type class) unwrap arguments automatically.
Use "return " to get a value back; println/print output is captured. Returned Minecraft objects serialize as {className, ref, toString, fields} — resume them later with java.ref(ref).
timeoutMs: optional per-call deadline in ms (default 10000, max 300000 = 5 min). Bump it for bulk reflection or heavy file I/O — but prefer sync{} batching or a native tool over raising the timeout.
MIGRATING FROM THE OLD LUA SURFACE (pre-2026-06): obj:method(args) -> obj.method(args); java.import(name) -> java.type(name); java.new(Cls, args) -> Cls(args) or Cls.create(args); java.iter/java.array -> java.list; java.typeof -> java.typeName; java.cast - removed (dispatch walks the runtime hierarchy, no cast needed); io.open(...) -> new File(...); os.time() -> System.currentTimeMillis(); print(x) -> println x; pcall -> try/catch; local x -> def x; {a = 1} tables -> [a: 1] maps and [1, 2, 3] lists.
Inputs: code (required), timeoutMs.
mc_find_hierarchyA
Find classes that extend (subclasses) or implement (implementors) a given class or interface. Useful for understanding class inheritance relationships.
Results are capped (default 200, max 5000). Pass limit to widen.
Inputs: className (required), direction (required), limit, version.
mc_find_refsA
Find callers (who calls this method) or callees (what this method calls) using the callgraph database. Useful for understanding code dependencies.
Results are capped (default 100, max 5000). Pass limit to widen.
Inputs: className (required), direction (required), methodName (required), limit, +1 more.
mc_get_classA
Get info about a Minecraft or Fabric API class.
Use the "view" parameter to control the response size:
"summary" (default): hierarchy + counts + one-line method/field signatures. Always fits in the response budget; pick this first.
"methods": hierarchy + every method signature (no bodies, no fields).
"fields": hierarchy + every field declaration (no methods).
"full": full decompiled source. Big classes (e.g. ClientPacketListener) may exceed the response budget — start with "summary" and only ask for "full" when you need the implementation.
Inputs: className (required), view, version.
mc_get_entity_item_textureA
Render an item carried by another entity (slot is "mainhand", "offhand", "head", "chest", "legs", or "feet") as a PNG you can see directly. Pair with mc_nearby_entities to find ids.
Inputs: slot (required), entityId (required).
mc_get_item_textureA
Render the item in the player's inventory slot N as a PNG you can see directly. Honors damage / CustomModelData resource-pack overrides on 1.21.11; falls back to the baked sprite on 1.19. Returns the rendered PNG plus a one-line text caption with dimensions + sprite name.
Inputs: slot (required).
mc_get_item_texture_by_idA
Render the default texture for an item registry id (e.g. "minecraft:diamond_pickaxe") as a PNG you can see directly. No inventory slot required.
Inputs: itemId (required).
mc_get_methodA
Get the source code for a specific method in a class, with surrounding context. Useful for understanding method implementation details.
Inputs: className (required), methodName (required), version.
mc_join_serverA
Join a multiplayer server by address ("host" or "host:port"). Disconnects from the current world/server first if needed, so this changes the user's play session — don't point it at a new server without being asked. The server's resource pack is pre-accepted by default so the join doesn't stall on the confirmation prompt.
The bridge ack means the connect attempt has started — current bridges defer it until the client has settled (no startup/reload overlay), so a join issued right after client launch is safe and may take some extra seconds to ack. By default this also polls until the player is actually in-world: success when a game snapshot shows a player, failure when a DisconnectedScreen appears (its title is returned as the reason). When called from inside a world, the poll first waits for the old session to drop so a stale snapshot of it can't masquerade as the new join. Set wait=false to just fire the join and return.
For repeated automated test runs, prefer a local throwaway server over a live community server — live servers have nondeterministic worlds, other players, and rules about automation.
Requires session_control_enabled=true in the DebugBridge config.
Inputs: address (required), wait, timeoutSeconds, acceptResourcePacks.
mc_leave_serverA
Leave the current world or server and return to the title screen. If not in a world, it still resets whatever menu screen is open back to the title screen. This ends the user's current play session — only do it when asked, or as part of a dev loop the user set up.
Fire-and-acknowledge: the ack means the disconnect was queued on the game thread, not that it finished. Requires session_control_enabled=true in the DebugBridge config.
Inputs: no named parameters.
mc_list_classesA
List all classes under a specific package path. Returns class names and their source locations. Use this to discover classes in a package hierarchy.
Results are capped (default 200, max 5000). Pass limit to widen.
Inputs: packagePath (required), limit, version.
mc_list_packagesA
List all available packages. Optionally filter by namespace (minecraft or fabric). Use this to discover package structure.
Results are capped (default 500, max 5000). Pass limit to widen.
Inputs: limit, version, namespace.
mc_looked_at_entityA
Returns the entity id the player is currently aiming at, or null if none is within range. Useful for "what is that thing?" questions where the user gestures at an entity in the world. Pair with mc_entity_details.
Inputs: range.
mc_nearby_blocksA
Get nearby block-entities (signs, chests, banners, beacons, hoppers, furnaces, skulls, etc.) — the blocks worth browsing for debugging. Plain terrain (dirt, stone) is intentionally excluded.
Returns x, y, z, blockId (e.g. "minecraft:oak_sign"), type (Mojang class name), and distance for each. Use mc_block_details to drill in.
Inputs: limit, range.
mc_nearby_entitiesA
Get nearby entities in the world (mobs, items, projectiles, players, etc.). Returns id, type (Mojang class name), position, distance, and a primaryEquipment summary (held item / framed item / displayed item) where applicable.
Prefer this over iterating entities via mc_execute — no script round-trip, and the summary shape is already curated. (If you do script it, batch the loop in sync { } .) Use mc_entity_details to drill into a specific entity by id.
Set includeIcons=true to also receive a top-level icons map keyed by itemId ({base64Png, width, height, spriteName}) for every primaryEquipment item — lets you see what entities are holding/displaying without per-entity mc_get_entity_item_texture calls. Deduplicated across entities.
Inputs: limit, range, includeIcons.
mc_quit_clientA
Gracefully shut down the entire Minecraft client. This tears down the user's whole play session, including any world or server they're in — only do it when asked, or as part of a dev loop the user set up (typically the quit step of build → deploy → quit → launch → mc_wait_for_bridge; see the mcdev://guides/dev-loop resource).
Fire-and-acknowledge: the WebSocket is expected to drop moments after the ack (that counts as success). By default the tool then waits for the client to be truly gone: it resolves the PID listening on the bridge port before quitting, polls until the port stops listening, then until that process exits — so on success it's safe to relaunch immediately, even through launchers that track the instance (Prism silently ignores --launch while the old process lives). When the PID can't be resolved (no lsof, permissions), it falls back to port-close-only and the result says so — the JVM can outlive the port by a few seconds, so in that case confirm the process exited yourself (pgrep / kill -0) before relaunching. Requires session_control_enabled=true in the DebugBridge config.
Inputs: waitForExit, timeoutSeconds.
mc_record_videoA
Capture a short burst of the Minecraft client framebuffer for debugging temporal rendering issues — animation glitches, shader bugs, particles, sub-tick artifacts that mc_screenshot can't resolve. Use the Read tool to view the result.
Two output modes:
"grid" (default): one composed JPEG laid out as a frame grid. Best for Claude — the whole recording in a single Read.
"frames": N separate JPEGs. Use only when you need to inspect individual frames closely.
Caps (validated mod-side, request rejected if exceeded):
frames: 1..300 (≈5 s at 60 Hz)
interval: "frame" (every render tick) or milliseconds >= 1
downscale: integer >= 1 (default 2)
quality: [0.05, 1.0] (default 0.75)
Pick interval deliberately. Default to a numeric ms (50–100 ms is usually right) — smooth motion, never drops frames. Use "frame" only when sub-tick detail matters; at that cadence the encoder may fall behind and the response's "dropped" count tells you how many frames were skipped.
The mod and the MCP server must run on the same machine for the returned paths to be readable here. Files land under /debugbridge-recordings//.
Inputs: frames (required), output, quality, gridCols, +2 more.
mc_screen_inspectA
Snapshot the screen the player currently has open. Returns {open: false} if no screen is displayed; otherwise {open, type, title, ...}.
For container screens (chests, anvils, brewing stands, etc.) also returns {menuClass, slots: [{idx, container, item:{itemId, count, damage, maxDamage, name}}]} in a single native pass — cheaper than iterating slots from a script (one bridge call instead of per-slot traffic).
Set includeIcons=true to also receive a top-level icons map keyed by itemId ({base64Png, width, height, spriteName}) — lets you see every item in the container in one call. Deduplicated across slots so a chest of stone+dirt only renders two icons. Adds a few KB to the response per unique item.
Inputs: includeIcons.
mc_screenshotA
Capture the current Minecraft client framebuffer as a JPEG file on the machine running the mod, and return its absolute path. Use the Read tool to view the image.
The capture runs on the render thread and pauses for at most one frame; the game otherwise continues. Works while the game is paused (returns the last rendered frame).
Defaults are tuned for low-bandwidth visual inspection: downscale=2, quality=0.75. Override only if you specifically need higher fidelity.
The mod and the MCP server must run on the same machine for the returned path to be readable here.
Inputs: quality, downscale.
mc_searchA
Search decompiled Minecraft or Fabric API source code for classes, methods, or fields by name pattern.
Each hit returns enough context to make follow-up mc_get_class / mc_get_method calls unnecessary in trivial cases:
class hits: kind (class/interface/record/enum), extends, implements, field/method counts
method hits: full signature including modifiers (public/static/etc.) plus line number
field hits: full declaration including modifiers and type
Pass type="class"/"method"/"field" to filter; defaults to all three.
Results are capped (default 50, max 1000). Pass limit to widen.
Inputs: query (required), type, limit, version.
mc_set_block_glowA
Highlight a block in-world (yellow outline on 1.19, vanilla test-highlight on 1.21.11) or remove the highlight. Useful for pointing a specific sign / chest / etc. out to the user. Pair with mc_nearby_blocks to find positions; use mc_clear_block_glow to clear all highlights at once.
Inputs: x (required), y (required), z (required), glow (required).
mc_set_entity_glowA
Make an entity render with the team-color outline so the user can spot it in-world (or remove the outline). Client-side only — no server authority needed. Pair with mc_nearby_entities to find ids.
Glow may "stick" to a stale id if the entity's chunk unloads; harmless.
Inputs: glow (required), entityId (required).
mc_snapshotA
Get a structured snapshot of the current game state. Returns player position, health, food, dimension, game mode, time of day, weather, etc. No scripting needed - quick overview of current state.
Inputs: no named parameters.
mc_versionB
Manage Minecraft versions for static analysis tools.
Actions:
"set": Set the active version (required before using other static tools)
"list": Show all initialized versions and their status
Inputs: action (required), version.
mc_wait_for_bridgeA
Block until a freshly (re)launched Minecraft client's DebugBridge answers, then connect to it. Sweeps ports 9876-9886 once per second, verifying the answering instance is the expected one — by game directory when known from the previous connection, else by Minecraft version — so a second running instance (e.g. a 1.19 client next to the 1.21 one) is never mistaken for it. Read-only; doesn't require session control.
Use this instead of polling mc_connect yourself after launching the client (typically right after mc_quit_client + a detached launch command — see the mcdev://guides/dev-loop resource). On timeout, the likely causes are a launcher login prompt or a crash during startup.
Inputs: timeoutSeconds, expectedVersion.
mc_wait_until_in_worldA
Poll until the player is in a world (or the join visibly failed). Checks every second: a game snapshot with a player present means in-world; a DisconnectedScreen means the join failed and its title is returned as the reason; anything else keeps waiting until the timeout.
Use after mc_join_server with wait=false, after a relaunch, or whenever you need to confirm the client finished loading into a world. If you fired the join from INSIDE a world (mc_join_server wait=false), pass requireAbsenceFirst=true: on older bridges the ack comes before the old world tears down, so the first polls can still see its player and report in-world for a join that hasn't happened yet (current bridges ack after teardown — the gate is harmless insurance there). Read-only — doesn't require session control to be enabled.
Inputs: timeoutSeconds, requireAbsenceFirst.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 31 tools
Each tool has a clearly distinct purpose, from game state snapshots (mc_snapshot) to entity/block details (mc_entity_details, mc_block_details) and texture rendering (mc_get_item_texture variants). Even similar tools like mc_get_item_texture and mc_get_entity_item_texture differ by target. No ambiguity.
All tools follow the consistent pattern 'mc_verb_noun' using snake_case (e.g., mc_block_details, mc_join_server, mc_screenshot). There are no deviations or mixed conventions, making the naming predictable and easy to navigate.
With 31 tools, the set is larger than average, but the server's scope—covering runtime debugging, static analysis, video recording, and connection management—justifies the count. Each tool earns its place, though a few could potentially be merged without loss of clarity.
The toolset covers the core Minecraft development and debugging workflow comprehensively, including player state, entity/block interaction, inventory inspection, item textures, chat history, video capture, class browsing, and version management. Minor gaps exist, such as no direct tool for reading player inventory without scripting, but these are manageable.
Maintenance
Related MCP Connectors
An MCP server that gives your AI access to the source code and docs of all public github repos
An MCP server that provides agents access to the KeldynAI platform
Official Duck Framework MCP server for AI-assisted development and project scaffolding.
An MCP server that integrates with Discord to provide AI-powered features.
Related MCP Servers
- AlicenseBqualityDmaintenanceAn MCP server that supercharges AI assistants with powerful tools for software development, enabling research, planning, code generation, and project scaffolding through natural language interaction.1130 npm102MIT
- FlicenseNot gradedqualityDmaintenanceA lightweight MCP server that enhances AI agents with tools for codebase analysis, task delegation to sub-agents, multi-agent coordination through chatrooms, and project todo management.-
- AlicenseNot gradedqualityDmaintenanceAn MCP server that gives AI agents structured code understanding and precise code intelligence via local indexing of AST, call graphs, and semantic search.110 npm4Apache 2.0
- AlicenseNot gradedqualityBmaintenanceA Model Context Protocol server that gives AI assistants native access to Minecraft mod development tools — decompile, remap, search, and analyze Minecraft source code directly from your AI workflow.149 npm49MIT