Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AIFire in da houseCheck it out free

minecraft-mcp-server

MCP.Pizza Chef: yuniko-software

The minecraft-mcp-server is a Minecraft bot server leveraging the Mineflayer API and Model Context Protocol (MCP) to enable AI models like Claude to control a Minecraft character in real-time. It allows AI assistants to build, explore, and interact with the Minecraft world through natural language instructions, providing dynamic, interactive gameplay automation and AI-driven environment manipulation within Minecraft Java Edition 1.21.4.

Use This MCP server To

Control Minecraft characters with natural language commands Automate building complex structures in Minecraft Explore Minecraft worlds autonomously Interact with Minecraft environment programmatically Integrate AI assistants for Minecraft gameplay Test Minecraft mods with AI-driven bots Create AI-driven Minecraft gameplay scenarios

README

Minecraft MCP Server

⚠️ IMPORTANT COMPATIBILITY WARNING: As of March 25, 2025, Minecraft 1.21.5 was just released. This bot is currently NOT compatible with Minecraft 1.21.5. Please use Minecraft 1.21.4 until we release an update with 1.21.5 support.

minecraft-mcp-server-white-house.mp4

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
  • A running Minecraft game (the setup below was tested with Minecraft 1.21.4 Java Edition included in Microsoft Game Pass)
  • Claude Desktop

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 is a hammer icon that appears next to the chat.

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 3.7 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-block - Find the nearest block of a specific type

Entity Interaction

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

Communication

  • send-chat - Send a chat message in-game

Contributing

This application was made in just two days, and the code is really simple and straightforward. All refactoring commits, functional and test contributions, issues and discussion are greatly appreciated!

Feel free to submit pull requests or open issues for improvements. Some areas that could use enhancement:

  • Additional documentation
  • More robust error handling
  • Tests for different components
  • New functionality and commands

minecraft-mcp-server FAQ

How do I set up the minecraft-mcp-server?
Install Git and Node.js, run a compatible Minecraft Java Edition (1.21.4), then follow the GitHub setup instructions.
Which Minecraft versions are supported?
Currently, only Minecraft Java Edition 1.21.4 is supported; 1.21.5 is not compatible yet.
What AI models can control the Minecraft character?
Models supporting MCP like Claude, GPT-4, and Gemini can control the character.
How does the server communicate with AI models?
It uses the Model Context Protocol (MCP) to enable real-time interaction between AI models and the Minecraft bot.
Can I customize the bot's behavior?
Yes, you can extend or modify the Mineflayer API integration and natural language command handling.
Is this server suitable for multiplayer Minecraft?
It is primarily designed for single-player or controlled environments but can be adapted for multiplayer with additional setup.
What prerequisites are needed?
Git, Node.js, and a running Minecraft Java Edition 1.21.4 game are required.
How do I update for future Minecraft versions?
Monitor the GitHub repository for updates and compatibility patches for newer Minecraft versions.