$git clone https://github.com/yuniko-software/minecraft-mcp-server___
| 1 | # Minecraft MCP Server |
| 2 | |
| 3 | <a href="https://github.com/yuniko-software/minecraft-mcp-server/actions"> |
| 4 | <img alt="CI" src="https://github.com/yuniko-software/minecraft-mcp-server/actions/workflows/build.yml/badge.svg"> |
| 5 | </a> |
| 6 | <a href="https://github.com/yuniko-software"> |
| 7 | <img alt="Contribution Welcome" src="https://img.shields.io/badge/Contribution-Welcome-blue"> |
| 8 | </a> |
| 9 | <a href="https://github.com/yuniko-software/minecraft-mcp-server/releases/latest"> |
| 10 | <img alt="Latest Release" src="https://img.shields.io/github/v/release/yuniko-software/minecraft-mcp-server?label=Latest%20Release"> |
| 11 | </a> |
| 12 | |
| 13 | <img width="2063" height="757" alt="image" src="https://github.com/user-attachments/assets/3f0f0438-f079-4226-90bd-87b9e1311d19" /> |
| 14 | |
| 15 | ___ |
| 16 | |
| 17 | > [!IMPORTANT] |
| 18 | > 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. |
| 19 | |
| 20 | https://github.com/user-attachments/assets/6f17f329-3991-4bc7-badd-7cde9aacb92f |
| 21 | |
| 22 | A Minecraft bot powered by large language models and [Mineflayer API](https://github.com/PrismarineJS/mineflayer). This bot uses the [Model Context Protocol](https://github.com/modelcontextprotocol) (MCP) to enable Claude and other supported models to control a Minecraft character. |
| 23 | |
| 24 | <a href="https://glama.ai/mcp/servers/@yuniko-software/minecraft-mcp-server"> |
| 25 | <img width="380" height="200" src="https://glama.ai/mcp/servers/@yuniko-software/minecraft-mcp-server/badge" alt="mcp-minecraft MCP server" /> |
| 26 | </a> |
| 27 | |
| 28 | ## Prerequisites |
| 29 | |
| 30 | - Git |
| 31 | - Node.js (>= 20.10.0) |
| 32 | - A running Minecraft game (the setup below was tested with Minecraft 1.21.8 Java Edition included in Microsoft Game Pass) |
| 33 | - An MCP-compatible client. Claude Desktop will be used as an example, but other MCP clients are also supported |
| 34 | |
| 35 | ## Getting started |
| 36 | |
| 37 | This bot is designed to be used with Claude Desktop through the Model Context Protocol (MCP). |
| 38 | |
| 39 | ### Run Minecraft |
| 40 | |
| 41 | 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. |
| 42 | |
| 43 | ### MCP Configuration |
| 44 | |
| 45 | Make sure that [Claude Desktop](https://claude.ai/download) 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: |
| 46 | |
| 47 | ```json |
| 48 | { |
| 49 | "mcpServers": { |
| 50 | "minecraft": { |
| 51 | "command": "npx", |
| 52 | "args": [ |
| 53 | "-y", |
| 54 | "github:yuniko-software/minecraft-mcp-server", |
| 55 | "--host", |
| 56 | "localhost", |
| 57 | "--port", |
| 58 | "25565", |
| 59 | "--username", |
| 60 | "ClaudeBot" |
| 61 | ] |
| 62 | } |
| 63 | } |
| 64 | } |
| 65 | ``` |
| 66 | |
| 67 | 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). |
| 68 | |
| 69 | ## Running |
| 70 | |
| 71 | 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. |
| 72 | |
| 73 | **It could take some time for Claude Desktop to boot the MCP server**. The marker that the server has booted successfully: |
| 74 | |
| 75 | <img width="885" height="670" alt="image" src="https://github.com/user-attachments/assets/ccbb42f8-6544-462c-8ac1-8af13ddfcddd" /> |
| 76 | |
| 77 | 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 😁 |
| 78 | |
| 79 | 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. |
| 80 | |
| 81 | Using Claude Sonnet could give you some interesting results. The bot-agent would be really smart 🫡 |
| 82 | |
| 83 | Example usage: [shared Claude chat](https://claude.ai/share/535d5f69-f102-4cdb-9801-f74ea5709c0b) |
| 84 | |
| 85 | ## Available Commands |
| 86 | |
| 87 | Once connected to a Minecraft server, Claude can use these commands: |
| 88 | |
| 89 | ### Movement |
| 90 | - `get-position` - Get the current position of the bot |
| 91 | - `move-to-position` - Move to specific coordinates |
| 92 | - `look-a |