1.7 KiB
1.7 KiB
minecraft-mcp
MCP server that bridges Claude Code to a Minecraft bot via the Clod mod's HTTP API.
Installation
cd minecraft-mcp
pip install -e .
Register with Claude Code
claude mcp add minecraft-bridge -- python -m minecraft_mcp.server
Verify it's registered:
claude mcp list
Usage
- Launch Minecraft with the Clod mod (HTTP server runs on port 8766)
- Start Claude Code — the MCP server connects automatically
- Ask Claude to interact with the bot: "check the bot status", "move to 100 64 100", etc.
Configuration
Set MINECRAFT_PORT environment variable to override the default port (8766):
claude mcp add minecraft-bridge -e MINECRAFT_PORT=9000 -- python -m minecraft_mcp.server
Available Tools
Observation
get_bot_status— position, state, dimensionget_blocks— 3D block array in a bounding box (max 32x32x32)get_block— single block type and propertiesget_nearby_entities— entities within radius (default 16, max 64)get_inventory— bot's inventory contentsget_biome— biome at X/Z coordinateslist_block_types— all block IDs, with optional filter
Actions
move_to— pathfind to coordinatesteleport— instant teleportplace_block— place a single blockplace_blocks— place up to 10,000 blocksfill— fill a bounding box (max 32x32x32)break_block— destroy a blockset_state— set bot visual state (idle/thinking/building/moving)look_at— aim at coordinateschat— send in-game chat message
Interaction
wait_for_instruction— long-poll for player!clodcommands (300s timeout)