minecraft-mcp
This server acts as an MCP bridge that allows AI agents to control a Minecraft player and the server itself on a PaperMC server. It provides a wide range of tools categorized as follows:
Movement & View:
look_atto face a position,move_toto walk/sprint to coordinates (with timeout and speed options),jump,sprint/sneaktoggles, andstopto cancel movement.Block Interaction:
break_blockandplace_blockat coordinates (with optional face and world, works without a player).Entity & Combat:
attackandinteract_entityusing entity IDs fromget_nearby_entities;use_itemfor right-click actions.Inventory Management:
get_inventory,equip_item(to main/offhand/armor slots),drop_item,swap_hands, andgive_itemto add items directly.World & Player Queries:
get_player_state(health, position, gamemode, etc.),get_block_at,get_nearby_entities, andget_time_weather.Chat:
send_chatsends messages as the player.Teleport & Gamemode:
teleportwith optional world, yaw, pitch;set_gamemodeto survival/creative/adventure/spectator.World & Server Control:
set_time(tick values: 0=sunrise, 6000=noon, 13000=sunset, 18000=midnight),set_weather(clear, rain, thunder),summon_entity(spawn mobs/entities), andrun_commandto execute console commands.Player-less Operation: Many world-level tools work without any player online, enabling automated building.
Extensible: All tools accept an optional
playerargument to target a specific online player, defaulting to the first online player.Showcase Scripts: Includes pre-built scripts (e.g.,
build-castle,build-lighthouse) demonstrating large-scale automated building.
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., "@minecraft-mcp break the block I'm looking at and place a torch"
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.
minecraft-mcp
A local MCP server that lets AI harnesses (Claude Code, Codex, Hermes, ...) perform every action a Minecraft player can — move, jump, break/place blocks, fight, manage inventory, chat — plus op-level extras (teleport, gamemode, weather/time, summon entities, console commands).
Architecture
AI Harness (Claude Code / Codex / Hermes)
│ stdio (MCP protocol)
▼
src/ Node + TypeScript MCP server (this repo, `npm run dev` / dist/index.js)
│ WebSocket, JSON frames (see docs/bridge-protocol.md)
▼ ws://127.0.0.1:8765
plugin/ Java Paper plugin `minecraft-mcp-bridge`
│ Bukkit/Paper API
▼
Local PaperMC server (server/ dir) — you join as the controlled playerThe harness controls whoever is online on the server (you). Every tool
accepts an optional player argument to target a specific online player.
Related MCP server: MCP Minecraft Remote
Prerequisites
Node.js ≥ 18
JDK ≥ 21 to build the plugin (JDK 24 works; the plugin is compiled for Java 21 bytecode)
A Minecraft Java Edition client matching the server version
Quick start
npm install # install MCP server deps
node scripts/setup-server.mjs 26.2 # download Paper 26.2 into server/, accept EULA
npm run start:server # build plugin, install it, launch the serverNotes:
setup-server.mjstakes an optional version argument (26.2,1.21.11, ...). Without one it downloads the latest 1.21.x.Paper 26.1+ requires Java 25 to run (not just build). If a portable JDK is extracted under
.jdk/(e.g..jdk/jdk-25.0.4+7/),start-server.mjsuses it automatically instead of the systemjava.Join
localhostwith a client matching the server version. The server runs withonline-mode=falsefor local dev.
To verify everything end-to-end (requires the server running and a player online):
npm run smoke:bridge # exercises every tool against the live serverHarness configuration
The MCP server runs over stdio. Build first (npm run build), then register:
Claude Code (claude mcp add):
claude mcp add minecraft -- node /path/to/minecraft-mcp/dist/index.jsCodex / other harnesses — equivalent stdio entry:
{
"mcpServers": {
"minecraft": {
"command": "node",
"args": ["/path/to/minecraft-mcp/dist/index.js"]
}
}
}Environment variable MINECRAFT_MCP_BRIDGE_URL overrides the bridge address
(default ws://127.0.0.1:8765).
Tools
All tools take an optional player (defaults to the first online player).
Category | Tool | What it does |
Movement |
| Face a block/position |
| Walk/sprint toward coordinates (timeout-aware) | |
| Movement state control | |
Interaction |
| Block manipulation |
| Right-click / combat | |
Inventory |
| Full inventory control |
Info |
| World & player queries |
Chat |
| Chat as the player |
Extras |
| Beyond player capabilities |
The full tool/command contract is documented in docs/bridge-protocol.md.
Development
npm run typecheck # TS typecheck
npm run build # compile MCP server to dist/
npm test # bridge unit tests (mock socket, no Minecraft needed)
npm run build:plugin # build the Paper plugin jar (Gradle shadowJar)Plugin jar output: plugin/build/libs/minecraft-mcp-bridge-0.1.0.jar.
Bridge port is configurable in plugin/src/main/resources/config.yml
(runtime copy: server/plugins/minecraft-mcp-bridge/config.yml).
Known limitations (v0.1)
move_tois velocity-based steering, not pathfinding; it hops over 1-block obstacles but won't route around walls.Survival
break_blockuses a fixed 1s delay regardless of tool/hardness.use_item/interact_entityfire the Bukkit events but don't reproduce vanilla effects (eating, trading, mounting).Controls an online player; fake-player NPCs are future work.
Player-less operation
World-level commands (place_block, break_block, get_block_at,
get_heightmap, run_command, set_time, set_weather, summon_entity with
explicit coordinates) work with no player online, against the default
world — so agents can build 24/7. Use run_command with forceload add to
keep build regions' chunks loaded.
Showcase build scripts
The scripts/ directory contains the builds that grew the world, all driven
through the bridge and verified with get_block_at sampling:
build-house.ts— the original medieval house smoke testbuild-castle.ts/build-lighthouse.ts/build-bridge.ts— the three terrain-fitted marvels (SE hill keep, W shore lighthouse, channel arch bridge)build-aqueduct.ts/build-forum.ts/build-colossus.ts/build-span.ts/build-skyfall.ts/build-roads.ts— the Aurelian Reach megastructure program (run in that order)survey-terrain.ts/fine-survey.ts— ASCII relief maps fromget_heightmap, used to pick sites from real terrain datalib-build.ts— shared Builder: plan queue with last-wins dedupe, carve-after-place, chunked console fills (vanilla 32768 limit), forceload helpers, tolerant placement, verification
License
MIT
Available Tools
27 toolsattackAttack an entityA
Face and attack an entity once. Use an entity id from get_nearby_entities.
Inputs: entity_id (required), player.
break_blockBreak a blockA
Face and break the block at the given coordinates. Instant in creative mode; takes time in survival and may time out.
Inputs: x (required), y (required), z (required), player.
drop_itemDrop itemsA
Drop items from the player's inventory onto the ground. Defaults to one of the currently held item.
Inputs: item, count, player.
equip_itemEquip an itemA
Move the first matching stack from the player's inventory into a slot (main hand by default). Fails if the player doesn't have the item.
Inputs: item (required), slot, player.
get_block_atInspect a blockA
Read which material occupies the block at the given coordinates.
Inputs: x (required), y (required), z (required), world, +1 more.
get_inventoryRead player inventoryA
Read the player's inventory: hotbar, main storage, armor, offhand contents and the currently held hotbar slot.
Inputs: player.
get_nearby_entitiesList nearby entitiesA
List entities near the player (mobs, players, items, ...) with their ids, types, positions and distances. Entity ids are used with attack and interact_entity.
Inputs: player, radius.
get_player_stateRead player stateA
Read the player's position, world, view direction, health, food, XP, gamemode, movement flags, and held item.
Inputs: player.
get_time_weatherRead time and weatherA
Read the time of day and weather for a world (default: the player's world).
Inputs: world, player.
give_itemGive itemsA
Add items directly to the player's inventory (no crafting or pickup needed).
Inputs: item (required), count, player.
interact_entityInteract with an entityA
Right-click an entity (e.g. open a villager trade or mount). Use an entity id from get_nearby_entities.
Inputs: entity_id (required), player.
jumpJumpB
Make the player jump once.
Inputs: player.
look_atLook at a positionA
Instantly rotate the player's view to face the given block or entity position.
Inputs: x (required), y (required), z (required), player.
move_toWalk to coordinatesA
Walk the player toward the given coordinates (looking at the target and holding forward, jumping over 1-block obstacles). Resolves once within 1.5 blocks horizontally; call stop to cancel a long walk.
Inputs: x (required), y (required), z (required), speed, +2 more.
place_blockPlace a blockA
Place a block of the given material at the coordinates, against the adjacent face. Uses the player's inventory (or places directly in creative mode).
Inputs: x (required), y (required), z (required), block (required), +2 more.
run_commandRun a console commandA
Execute a vanilla or plugin command from the server console, without the leading slash (e.g. "say hello"). Returns the command output, possibly empty.
Inputs: command (required), player.
send_chatSend a chat messageA
Send a chat message as the player; it appears in game chat and triggers normal chat events.
Inputs: message (required), player.
set_gamemodeSet gamemodeB
Change the player's gamemode (creative enables instant breaking and free placement).
Inputs: mode (required), player.
set_timeSet world timeA
Set the time of day for a world in ticks (0 = sunrise, 6000 = noon, 13000 = sunset, 18000 = midnight).
Inputs: time_ticks (required), world, player.
set_weatherSet weatherA
Set the weather for a world (default: the player's world).
Inputs: weather (required), world, player.
sneakToggle sneakingA
Enable or disable sneaking (crouching) for the player.
Inputs: enabled (required), player.
sprintToggle sprintingA
Enable or disable sprinting for the player.
Inputs: enabled (required), player.
stopStop all movementA
Cancel any in-progress move_to, stop the player's movement, and clear sprint/sneak.
Inputs: player.
summon_entitySummon an entityA
Spawn an entity (e.g. zombie, cow, armor_stand) at the given coordinates, or 2 blocks in front of the player by default.
Inputs: type (required), x, y, z, +1 more.
swap_handsSwap handsA
Swap the items in the player's main hand and off hand.
Inputs: player.
teleportTeleport the playerA
Instantly teleport the player to coordinates, optionally in another world and with a given view direction.
Inputs: x (required), y (required), z (required), yaw, +3 more.
use_itemUse held itemC
Right-click with the item in the player's main hand.
Inputs: player.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 27 tools
Each tool targets a distinct action or query in Minecraft, from movement (sprint, sneak, jump, move_to, teleport) to interaction (break_block, place_block, attack, interact_entity) and data retrieval (get_inventory, get_player_state, get_block_at). Even similar operations like use_item and interact_entity are clearly differentiated by targeting items vs. entities.
Tool names follow a consistent verb_noun snake_case pattern: get_* for state queries, set_* for world modifications, and bare action verbs for player actions. There are no mixed conventions or vague generic names like 'process' or 'do_thing'.
27 tools is slightly above the typical well-scoped range, but the breadth is justified by Minecraft's complex mechanics (movement, inventory, world editing, entities, time/weather, commands). The set feels comprehensive rather than bloated, with each tool serving a concrete purpose.
The surface covers most core Minecraft interactions: movement, block manipulation, inventory management, entity interaction, world queries, and environment settings. Minor gaps exist (e.g., no explicit crafting action, no block entity inspection like chests), but agents can work around these via run_command or give_item.
Maintenance
Related MCP Connectors
An MCP server that gives your AI access to the source code and docs of all public github repos
MCP server for AI dialogue using various LLM models via AceDataCloud
Official MCP server for Agentwork — delegate tasks to AI agents with human-in-the-loop
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
Related MCP Servers
- AlicenseBqualityDmaintenanceA Minecraft MCP Server powered by Mineflayer API. It allows to control a Minecraft character in real-time, allowing AI assistants to build structures, explore the world, and interact with the game environment through natural language instruction22296 npm816Apache 2.0
- AlicenseCqualityDmaintenanceAllows AI assistants to connect to and control Minecraft players on remote servers, enabling navigation, building, mining, inventory management, entity interaction, and chat communication through natural language commands.2719 npm13MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that lets Claude control a Minecraft bot with 40+ actions including movement, combat, crafting, and inventory management. Built on Mineflayer, it supports Microsoft authentication, pathfinding, and auto-reconnect.3MIT
- AlicenseBqualityDmaintenanceAn MCP server that enables AI agents to play Minecraft with full bot capabilities including pathfinding, block interaction, crafting, combat, and more.2919 npmMIT