Sandbox
@yuniko-software/minecraft-mcp-server

MCP server for controlling a Minecraft bot

This server turns a Minecraft character into an MCP-connected bot powered by Mineflayer. An MCP client sends commands, and the bot can move, dig, place blocks, inspect inventory, smelt items, read chat, and interact with entities.

735 starsβ€’87 forksβ€’TypeScriptβ€’Updated 5mo ago
Who it's for

Builders who want their MCP client to control a Minecraft character in a live world.

What it delivers

You can tell an agent to build, explore, and interact in Minecraft without driving the character yourself.

What it does

Movement tools

Lets the bot report its position, move to coordinates, look at a point, jump, move for a duration, and fly to a target.

Inventory tools

Lists inventory items, finds a specific item, and equips an item.

Block tools

Places blocks, digs blocks, reads block info, and finds nearby blocks of a chosen type.

Furnace and crafting actions

Smelts items with furnace-like blocks and supports crafting-related actions covered by the test suite.

Entity and chat tools

Finds nearby entities, sends in-game chat messages, and reads recent chat.

Game state detection

Detects the current game mode so the agent can adapt its actions.

README

Minecraft MCP Server

CI Contribution Welcome Latest Release image

[!IMPORTANT] Currently supports Minecraft version 1.21.11. Newer versions may not work with this MCP server, but we will add support as soon as possible.

https://github.com/user-attachments/assets/6f17f329-3991-4bc7-badd-7cde9aacb92f

A Minecraft bot powered by large language models and Mineflayer API. This bot uses the Model Context Protocol (MCP) to enable Claude and other supported models to control a Minecraft character.

mcp-minecraft MCP server

Prerequisites

  • Git
  • Node.js (>= 20.10.0)
  • A running Minecraft game (the setup below was tested with Minecraft 1.21.8 Java Edition included in Microsoft Game Pass)
  • An MCP-compatible client. Claude Desktop will be used as an example, but other MCP clients are also supported

Getting started

This bot is designed to be used with Claude Desktop through the Model Context Protocol (MCP).

Run Minecraft

Create a singleplayer world and open it to LAN (ESC -> Open to LAN). Bot will try to connect using port 25565 and hostname localhost. These parameters could be configured in claude_desktop_config.json on a next step.

MCP Configuration

Make sure that Claude Desktop is installed. Open File -> Settings -> Developer -> Edit Config. It should open installation directory. Find file with a name claude_desktop_config.json and insert the following code:

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

Double-check that right --port and --host parameters were used. Make sure to completely reboot the Claude Desktop application (should be closed in OS tray).

Running

Make sure Minecraft game is running and the world is opened to LAN. Then start Claude Desktop application and the bot should join the game.

It could take some time for Claude Desktop to boot the MCP server. The marker that the server has booted successfully:

image

You can give bot any commands through any active Claude Desktop chat. You can also upload images of buildings and ask bot to build them 😁

Don't forget to mention that bot should do something in Minecraft in your prompt. Because saying this is a trigger to run MCP server. It will ask for your permissions.

Using Claude Sonnet could give you some interesting results. The bot-agent would be really smart 🫑

Example usage: shared Claude chat

Available Commands

Once connected to a Minecraft server, Claude can use these commands:

Movement

  • get-position - Get the current position of the bot
  • move-to-position - Move to specific coordinates
  • look-at - Make the bot look at specific coordinates
  • jump - Make the bot jump
  • move-in-direction - Move in a specific direction for a duration

Flight

  • fly-to - Make the bot fly directly to specific coordinates

Inventory

  • list-inventory - List all items in the bot's inventory
  • find-item - Find a specific item in inventory
  • equip-item - Equip a specific item

Block Interaction

  • place-block - Place a block at specified coordinates
  • dig-block - Dig a block at specified coordinates
  • get-block-info - Get information about a block
  • find-blocks - Find one or more nearby blocks of a specific type

Furnace

  • smelt-item - Smelt items using a furnace-like block

Entity Interaction

  • find-entity - Find the nearest entity of a specific type

Communication

  • send-chat - Send a chat message in-game
  • read-chat - Get recent chat messages from players

Game State

  • detect-gamemode - Detect the gamemode on game

Contributing

Feel free to submit pull requests or open issues for improvements. All refactoring commits, functional and test contributions, issues and discussion are greatly appreciated!

To get started with contributing, please see CONTRIBUTING.md.


⭐ If you find this project useful, please consider giving it a star on GitHub! ⭐

Your support helps make this project more visible to other people who might benefit from it.

Files in the repo

Repository payloadβ€’13 top-level entries
  • .github
  • src
  • tests
  • .gitattributes
  • .gitignore
  • CONTRIBUTING.md
  • eslint.config.mjs
  • LICENSE
  • package-lock.json
  • package.json
  • README.md
  • tsconfig.build.json
  • tsconfig.json

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More connectors

noskillish/
bankmcp

BankMCPβ„’: your AI can now read your bank. Self-hosted, read-only MCP server for your own bank accounts via open banking (Enable Banking). Standard MCP; tested with Claude and Ollama.

177
memorax-ai/
memorax-code

A memory plugin for AI coding that turns engineering experience, repository knowledge, and your way of working into memory that remains useful in future tasks.

1.2k
MaxFreedomPollard/
Compartment

Encrypted, fully offline agentic memory. One click install, GUI w/ memory map, all OS and agents. Superior memory creation, storage and retrieval.

586
LetsFG/LetsFGConnectors

Agent-native flight & hotel search and booking β€” MCP server, CLI, and Python/JS SDKs. Hundreds of airlines plus the major booking sites, with per-flight reliability history. Free-cancellation hotel rates: hold the room with a small upfront charge, then pay the balance later by link, up to the hotel's own deadline.

2k
ahujasid/
ableton-mcp

Control Ableton Live with any LLM: create tracks, arrange clips & compose music via MCP

3k

Calendar sync tool & universal calendar MCP server. Aggregate, sync and control calendars on Google, Outlook, Office 365, iCloud, CalDAV or ICS.

1.3k