home / mcp / minecraft mcp server

Minecraft MCP Server

A 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 instruction

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "yuniko-software-minecraft-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "github:yuniko-software/minecraft-mcp-server",
        "--host",
        "localhost",
        "--port",
        "25565",
        "--username",
        "ClaudeBot"
      ]
    }
  }
}

You can run an MCP-enabled Minecraft bot that is controlled by Claude and other models through the Model Context Protocol. This server acts as the bridge between your Minecraft game and an MCP client, letting you issue in-game commands and automate actions via natural language prompts.

How to use

Once you have the MCP server running, you can issue commands from your MCP client to control your in-game avatar. Start your Minecraft world, connect the MCP client, and begin giving the bot commands such as moving to coordinates, interacting with blocks, or reading chat. The bot will respond and perform actions in the active world as you prompt it.

How to install

Prerequisites you need before installation:

  • Install Git on your system.
  • Install Node.js (version 20.10.0 or newer).
  • Launch Minecraft Java Edition (1.21.x) and ensure you can open worlds to LAN.
  • Install Claude Desktop or another MCP client to connect to the server.

Step 1: Ensure Minecraft is running and the world is opened to LAN.

Step 2: Configure the MCP bridge in the MCP client. Open the MCP client settings and insert the following configuration to connect to the local MCP server using localhost and the default port 25565.

{
  "mcpServers": {
    "minecraft": {
      "command": "npx",
      "args": [
        "-y",
        "github:yuniko-software/minecraft-mcp-server",
        "--host",
        "localhost",
        "--port",
        "25565",
        "--username",
        "ClaudeBot"
      ]
    }
  }
}

Running

With Minecraft running and the world opened to LAN, start the MCP client (for example, Claude Desktop). The bot will join the game once the MCP bridge initializes. It may take a moment for the MCP server to boot. You will know it is ready when the client shows the bot has connected successfully.

From the MCP client chat, you can command the bot to perform actions in Minecraft. Refer to the available commands to see what you can request the bot to do in your world.

Available tools

get-position

Retrieve the bot's current coordinates in the Minecraft world.

move-to-position

Move the bot to specific X, Y, Z coordinates.

look-at

Orient the bot to face specific coordinates.

jump

Make the bot jump.

move-in-direction

Move the bot in a chosen direction for a set duration.

fly-to

Fly the bot directly to the specified coordinates.

list-inventory

List all items in the bot's inventory.

find-item

Search for a specific item in the inventory.

equip-item

Equip a chosen item from the inventory.

place-block

Place a block at given coordinates.

dig-block

Dig or break a block at given coordinates.

get-block-info

Get information about a block at specific coordinates.

find-block

Find the nearest block of a specified type.

smelt-item

Smelt items using a furnace-like block.

find-entity

Find the nearest entity of a given type.

send-chat

Send a chat message in-game.

read-chat

Fetch recent chat messages from players.

detect-gamemode

Detect the current gamemode of the connected world.