minecraft-mcp
⛏️ Minecraft MCP 服务器 — AI 驱动的 Minecraft 智能体
由 Soumyadeep(AI/ML 负责人)构建
这是什么?
这是一个由 模型上下文协议 (MCP) 驱动的 Minecraft AI 智能体。它将任何兼容 MCP 的 AI 客户端(Claude Desktop、Cursor、Kiro、Windsurf 等)直接连接到你的 Minecraft 世界,将 AI 变成一个功能齐全的游戏内机器人。
AI 可以移动、建造、合成、聊天,现在还可以通过单个命令——从原理图文件即时生成整个结构。
Related MCP server: Minecraft MCP Server
✨ 新功能 — 原理图构建器(核心亮点)
此分支最大的新增功能是 原理图构建系统 — 一套包含 3 个新的 MCP 工具,让 AI 能够使用 .schem / .schematic 文件在几秒钟内构建庞大、复杂的结构。
AI 不再需要繁琐地调用 place-block 数百次(速度慢、易出错、容易出错),现在它会:
检查其捆绑的库 中的原理图文件
解析文件 以了解其尺寸和方块
通过机器人发送一连串
/setblock命令,在创造模式下即时构建整个结构 — 无需库存,无需寻路,不会失败
3 个新工具
工具 | 描述 |
| 列出服务器捆绑的所有 |
| 检查原理图文件 — 显示尺寸、填充百分比和顶部方块类型 — 而无需触碰世界。 |
| 使用快速的 |
支持的格式
格式 | 扩展名 | 备注 |
Sponge Schematic |
| ✅ 主要格式(WorldEdit,现代) |
MCEdit Schematic |
| ✅ 旧版格式,只读 |
NBT Structure |
| ✅ 原版 Minecraft 结构文件 |
AI 如何使用它
AI 被指示始终先检查捆绑的库。所以当你输入:
“在我附近建一座维京房屋”
AI 将会:
调用
list-schematics→ 找到viking-house1调用
schematic-info("viking-house1")→ 读取尺寸调用
build-schematic("viking-house1", x, y, z)→ 即时生成它
无需手动放置方块。没有幻觉几何图形。只需几秒钟,就能得到一个真实、由人类设计的结构。
🛠️ 完整工具参考
移动
工具 | 描述 |
| 获取机器人的当前世界坐标 |
| 寻路到特定坐标 |
| 让机器人看向坐标 |
| 让机器人跳跃 |
| 向某个方向移动一段时间 |
| 直接飞向坐标 |
建造 (原理图)
工具 | 描述 |
| ★ 列出所有捆绑的原理图文件 |
| 检查原理图的元数据 |
| 从 |
方块
工具 | 描述 |
| 在位置放置单个方块 |
| 挖掘/破坏方块 |
| 获取坐标处方块的信息 |
| 查找附近给定类型的方块 |
库存与合成
工具 | 描述 |
| 列出机器人库存中的所有物品 |
| 查找特定物品 |
| 装备物品 |
| 列出可合成的配方 |
| 合成物品 |
| 获取详细的配方信息 |
| 检查机器人是否可以合成某物品 |
| 在熔炉中烧炼物品 |
实体与聊天
工具 | 描述 |
| 查找附近的实体 |
| 发送游戏内聊天消息 |
| 读取最近的聊天消息 |
| 检测当前游戏模式 |
🚀 设置指南
先决条件
Node.js ≥ 20.10.0
Git
Minecraft Java Edition (已在 1.21.x 上测试)
兼容 MCP 的 AI 客户端 (Claude Desktop, Cursor, Kiro 等)
第 1 步 — 克隆并安装
git clone https://github.com/soumyadeo/minecraft-mcp-server.git
cd minecraft-mcp-server
npm install第 2 步 — 构建
npm run build这将把 TypeScript 编译为 dist/main.js。
第 3 步 — 添加原理图文件(可选但推荐)
将任何 .schem 文件放入项目根目录的 schematics/ 文件夹中:
minecraft-mcp-server/
schematics/
smallhouse1.schem ← already included
viking-house1.schematic ← already included
my-castle.schem ← add your own!AI 将通过 list-schematics 自动发现它们。
第 4 步 — 配置你的 MCP 客户端
Claude Desktop
打开 File → Settings → Developer → Edit Config 并添加:
{
"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"
}
}
}将
C:\path\to\替换为你机器上的实际路径。
第 5 步 — 启动 Minecraft
启动 Minecraft Java Edition
打开或创建一个 单人世界
按 ESC → 对局域网开放
记下显示的端口号(通常是
25565)在聊天中,给予机器人管理员权限:
/op ClaudeBot⚠️
/setblock命令(原理图构建器使用)需要 管理员权限 才能工作
第 6 步 — 重启你的 AI 客户端并测试
完全重启你的 MCP 客户端(如有必要,从系统托盘关闭)。机器人应该会自动加入游戏。
测试提示词:
“检查有哪些可用的原理图,并在我当前的位置建造 smallhouse。”
📦 添加更多原理图
原理图库只是一个文件夹。要添加更多结构:
在线查找
.schem文件:Planet Minecraft — 搜索并按“schematic”过滤
在游戏中使用 WorldEdit 内置的
//copy+//schem save命令
将文件放入
minecraft-mcp-server/schematics/重启 MCP 服务器
AI 会立即识别它们 — 无需更改代码。
⚙️ 服务器参数
参数 | 默认值 | 描述 |
|
| Minecraft 服务器主机名 |
|
| Minecraft 服务器端口 |
|
| 机器人的游戏内用户名 |
node dist/main.js --host localhost --port 25565 --username ClaudeBot🏗️ 架构
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关键库:
mineflayer— Minecraft 机器人框架prismarine-schematic— 原理图文件解析器@modelcontextprotocol/sdk— MCP 服务器 SDK
🗺️ 路线图
[ ]
mode: "bot_place"— 通过mineflayer-builder进行物理生存模式建造[ ] 通过
@kleppe/litematic-reader支持.litematic格式[ ]
search-and-build工具 — 按关键字抓取和下载原理图[ ]
run-builder-script— 执行程序化构建脚本(用于金字塔、圆顶等)[ ] 箱子和存储工具
[ ] 村民交易工具
[ ] 战斗与生存工具
🤝 贡献
欢迎提交 Pull Request!请参阅 CONTRIBUTING.md 获取指南。
📄 许可证
MIT — 请参阅 LICENSE
由 Soumyadip Debnath(AI/ML 负责人)构建和扩展 原始项目由 Yuniko Software 提供
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityDmaintenanceA Minecraft bot that allows Claude and other LLMs to control a Minecraft character through the Model Context Protocol, enabling AI to perform various in-game actions like movement, building, and interacting with the world.1623Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to control Minecraft bots through over 30 verified skills including navigation, resource gathering, and advanced building. It allows for multi-bot management and seamless integration with MCP clients to automate complex in-game tasks.75MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to control Minecraft bots via natural language commands by bridging a Python MCP server with a Node.js Mineflayer bridge. It supports a wide range of in-game actions including complex pathfinding, resource gathering, crafting, and combat.10MIT
- FlicenseNot gradedqualityCmaintenanceEnables controlling a semi-autonomous Minecraft bot via MCP, supporting tasks like movement, combat, farming, and chatting.
Related MCP Connectors
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
MCP server for AI dialogue using various LLM models via AceDataCloud
MCP server for Hailuo (MiniMax) AI video generation
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/soumyacodes007/minecraft-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server