MCP Hub
Back to servers

minecraft-mcp

Enables AI agents to control a Minecraft bot for movement, building, crafting, and instant schematic-based structure spawning via MCP tools.

glama
Stars
3
Updated
May 8, 2026
Validated
May 10, 2026

⛏️ Minecraft MCP Server — AI-Powered Minecraft Agent

Built by Soumyadeep, AI/ML Lead


What Is This?

This is an AI agent for Minecraft, powered by the Model Context Protocol (MCP). It connects any MCP-compatible AI client (Claude Desktop, Cursor, Kiro, Windsurf, etc.) directly to your Minecraft world, turning the AI into a fully capable in-game bot.

The AI can move, build, craft, chat, and now — instantly spawn entire structures from schematic files using a single command.


✨ What's New — Schematic Builder (The Star Feature)

The biggest addition to this fork is the Schematic Builder System — a set of 3 new MCP tools that let the AI construct massive, complex structures in seconds using .schem / .schematic files.

Instead of the AI tediously calling place-block hundreds of times (slow, error-prone, wrong), it now:

  1. Checks its bundled library of schematic files
  2. Parses the file to understand its dimensions and blocks
  3. Fires a stream of /setblock commands via the bot to build the entire structure instantly in Creative mode — no inventory, no pathfinding, no failures

The 3 New Tools

ToolDescription
list-schematicsLists all .schem files bundled with the server. The AI always calls this first before attempting any build.
schematic-infoInspects a schematic file — shows dimensions, fill %, and top block types — without touching the world.
build-schematicBuilds the structure at given world coordinates using rapid /setblock commands. Accepts a short name ("smallhouse1") or a full path.

Supported Formats

FormatExtensionNotes
Sponge Schematic.schem✅ Primary format (WorldEdit, modern)
MCEdit Schematic.schematic✅ Legacy format, read-only
NBT Structure.nbt✅ Vanilla Minecraft structure files

How the AI Uses It

The AI is instructed to always check the bundled library first. So when you say:

"Build a viking house near me"

The AI will:

  1. Call list-schematics → finds viking-house1
  2. Call schematic-info("viking-house1") → reads dimensions
  3. Call build-schematic("viking-house1", x, y, z) → spawns it instantly

No manual block placement. No hallucinated geometry. Just a real, human-designed structure in seconds.


🛠️ Full Tool Reference

Movement

ToolDescription
get-positionGet the bot's current world coordinates
move-to-positionPathfind to specific coordinates
look-atMake the bot look at coordinates
jumpMake the bot jump
move-in-directionMove in a direction for a duration
fly-toFly directly to coordinates

Building (Schematic)

ToolDescription
list-schematics★ List all bundled schematic files
schematic-infoInspect a schematic's metadata
build-schematicInstantly build a structure from a .schem file

Blocks

ToolDescription
place-blockPlace a single block at a position
dig-blockDig/break a block
get-block-infoGet info about a block at coordinates
find-blocksFind nearby blocks of a given type

Inventory & Crafting

ToolDescription
list-inventoryList all items in the bot's inventory
find-itemFind a specific item
equip-itemEquip an item
list-recipesList craftable recipes
craft-itemCraft an item
get-recipeGet detailed recipe information
can-craftCheck if the bot can craft an item
smelt-itemSmelt items in a furnace

Entities & Chat

ToolDescription
find-entityFind a nearby entity
send-chatSend an in-game chat message
read-chatRead recent chat messages
detect-gamemodeDetect the current game mode

🚀 Setup Guide

Prerequisites

  • Node.js ≥ 20.10.0
  • Git
  • Minecraft Java Edition (tested on 1.21.x)
  • An MCP-compatible AI client (Claude Desktop, Cursor, Kiro, etc.)

Step 1 — Clone & Install

git clone https://github.com/soumyadeo/minecraft-mcp-server.git
cd minecraft-mcp-server
npm install

Step 2 — Build

npm run build

This compiles TypeScript to dist/main.js.

Step 3 — Add Schematic Files (Optional but Recommended)

Drop any .schem files into the schematics/ folder at the root of the project:

minecraft-mcp-server/
  schematics/
    smallhouse1.schem       ← already included
    viking-house1.schematic ← already included
    my-castle.schem         ← add your own!

The AI will automatically discover them via list-schematics.

Step 4 — Configure Your MCP Client

Claude Desktop

Open File → Settings → Developer → Edit Config and add:

{
  "mcpServers": {
    "minecraft": {
      "command": "node",
      "args": [
        "C:\\path\\to\\minecraft-mcp-server\\dist\\main.js",
        "--host", "localhost",
        "--port", "25565",
        "--username", "ClaudeBot"
      ]
    }
  }
}

Cursor / VS Code (mcp.json)

{
  "mcpServers": {
    "minecraft": {
      "command": "node",
      "args": [
        "C:\\path\\to\\minecraft-mcp-server\\dist\\main.js",
        "--host", "localhost",
        "--port", "25565",
        "--username", "ClaudeBot"
      ],
      "type": "stdio"
    }
  }
}

Replace C:\\path\\to\\ with the actual path on your machine.

Step 5 — Start Minecraft

  1. Launch Minecraft Java Edition
  2. Open or create a Singleplayer world
  3. Press ESC → Open to LAN
  4. Note the port number shown (usually 25565)
  5. In the chat, give the bot operator permissions:
    /op ClaudeBot
    

    ⚠️ Operator permissions are required for /setblock commands to work (used by the schematic builder)

Step 6 — Restart Your AI Client & Test

Fully restart your MCP client (close from system tray if needed). The bot should join the game automatically.

Test prompt:

"Check what schematics are available and build the smallhouse at my current position."


📦 Adding More Schematics

The schematic library is just a folder. To add more structures:

  1. Find .schem files online:

  2. Drop the file into minecraft-mcp-server/schematics/

  3. Restart the MCP server

The AI immediately picks it up — no code changes needed.


⚙️ Server Arguments

ArgumentDefaultDescription
--hostlocalhostMinecraft server hostname
--port25565Minecraft server port
--usernameClaudeBotBot's in-game username
node dist/main.js --host localhost --port 25565 --username ClaudeBot

🏗️ Architecture

src/
  main.ts                   — MCP server entry point, tool registration
  bot-connection.ts         — Mineflayer bot lifecycle management
  tool-factory.ts           — MCP tool registration wrapper
  tools/
    schematic-tools.ts      — ★ Schematic builder (new)
    block-tools.ts          — Block placement & digging
    position-tools.ts       — Movement & pathfinding
    inventory-tools.ts      — Inventory management
    crafting-tools.ts       — Recipe lookup & crafting
    furnace-tools.ts        — Smelting
    entity-tools.ts         — Entity detection
    chat-tools.ts           — In-game chat
    flight-tools.ts         — Flight control
    gamestate-tools.ts      — Game mode detection
schematics/                 — Bundled schematic file library
  smallhouse1.schem
  viking-house1.schematic

Key Libraries:

Forked and extended from yuniko-software/minecraft-mcp-server


🗺️ Roadmap

  • mode: "bot_place" — physical survival-mode building via mineflayer-builder
  • .litematic format support via @kleppe/litematic-reader
  • search-and-build tool — scrape and download schematics by keyword
  • run-builder-script — execute procedural build scripts (for pyramids, domes, etc.)
  • Chest & storage tools
  • Villager trading tools
  • Combat & survival tools

🤝 Contributing

Pull requests are welcome! See CONTRIBUTING.md for guidelines.


📄 License

MIT — see LICENSE


Built and extended by Soumyadip Debnath, AI/ML Lead Original project by Yuniko Software

Reviews

No reviews yet

Sign in to write a review