/ 目录 / 演练场 / minecraft-mcp-server
● 社区 yuniko-software ⚡ 即开即用

minecraft-mcp-server

作者 yuniko-software · yuniko-software/minecraft-mcp-server

与 Claude 一起控制 Minecraft 机器人 — 构建结构、探索世界、管理库存并通过自然语言实时交互。

minecraft-mcp-server 使用 Mineflayer API 让 AI 助手实时控制 Minecraft 角色。 克劳德可以导航、建造结构、管理库存、与方块和实体交互、熔炼物品以及在聊天中进行交流。 支持 Minecraft 1.21.11,通过 LAN 连接到您的单人游戏世界,并与 Claude Desktop 配合使用。

为什么要用

核心特性

实时演示

实际使用效果

minecraft-mcp-server-2.replay ▶ 就绪
0/0

安装

选择你的客户端

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "minecraft-mcp-server-2": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/yuniko-software/minecraft-mcp-server"
      ]
    }
  }
}

打开 Claude Desktop → Settings → Developer → Edit Config。保存后重启应用。

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "minecraft-mcp-server-2": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/yuniko-software/minecraft-mcp-server"
      ]
    }
  }
}

Cursor 使用与 Claude Desktop 相同的 mcpServers 格式。项目级配置优先于全局。

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "minecraft-mcp-server-2": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/yuniko-software/minecraft-mcp-server"
      ]
    }
  }
}

点击 Cline 侧栏中的 MCP Servers 图标,然后选 "Edit Configuration"。

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "minecraft-mcp-server-2": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/yuniko-software/minecraft-mcp-server"
      ]
    }
  }
}

格式与 Claude Desktop 相同。重启 Windsurf 生效。

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "minecraft-mcp-server-2",
      "command": "TODO",
      "args": [
        "See README: https://github.com/yuniko-software/minecraft-mcp-server"
      ]
    }
  ]
}

Continue 使用服务器对象数组,而非映射。

~/.config/zed/settings.json
{
  "context_servers": {
    "minecraft-mcp-server-2": {
      "command": {
        "path": "TODO",
        "args": [
          "See README: https://github.com/yuniko-software/minecraft-mcp-server"
        ]
      }
    }
  }
}

加入 context_servers。Zed 保存后热重载。

claude mcp add minecraft-mcp-server-2 -- TODO 'See README: https://github.com/yuniko-software/minecraft-mcp-server'

一行命令搞定。用 claude mcp list 验证,claude mcp remove 卸载。

使用场景

实战用法: minecraft-mcp-server

如何在 AI 辅助下构建 Minecraft 结构

👤 需要 AI 帮助建造的 Minecraft 玩家 ⏱ ~15 min beginner

何时使用: 您想在 Minecraft 中构建一些复杂的东西,而不需要手动放置每个块。

前置条件
  • 我的世界 Java 版 1.21.11 — 创建一个单人游戏世界并开放给局域网
  • 配置了minecraft-mcp-server — 使用主机、端口和用户名添加到 Claude Desktop 配置
步骤
  1. 描述构建
    建造一座 10x10 的石头房子,有橡木角、每面墙上有玻璃窗、橡木门和平坦的石头屋顶。 从我现在的位置开始。✓ 已复制
    → 机器人开始系统地放置区块并报告进度
  2. 修改构建
    添加具有相同布局的二楼和连接它们的楼梯。✓ 已复制
    → 二楼建有楼梯

结果: 通过自然语言指令在 Minecraft 中构建的完整结构。

注意事项
  • 机器人的库存中没有所需的方块 — 确保机器人有材料或切换到创意模式以获得无限块

Send an AI bot to explore and gather resources in Minecraft

👤 Minecraft players who want automated resource gathering ⏱ ~20 min beginner

何时使用: You need resources but don't want to grind for them.

前置条件
  • Minecraft world open to LAN with bot connected — Configure and launch
步骤
  1. Explore surroundings
    Look around and tell me what biome we're in. Find the nearest cave entrance.✓ 已复制
    → Biome info and cave location
  2. Gather resources
    Go to the cave and mine all iron ore you can find. Come back and smelt it into iron ingots.✓ 已复制
    → Mining progress updates and smelting confirmation

结果: Resources gathered and processed automatically.

注意事项
  • Bot gets stuck on complex terrain — Use fly-to for navigation over rough terrain

组合

与其他 MCP 搭配,撬动十倍杠杆

minecraft-mcp-server-2 + filesystem

Save build plans as files and load them for construction

Save this house blueprint to a file so we can build it again in another world.✓ 已复制

工具

此 MCP 暴露的能力

工具输入参数何时调用成本
get-position none Get the bot's current position 0
move-to-position x: int, y: int, z: int Navigate to a specific position 0
place-block x: int, y: int, z: int, block_name: str Place a block at a position 0
dig-block x: int, y: int, z: int Mine/dig a block 0
list-inventory none List items in the bot's inventory 0
find-blocks block_name: str, range?: int Find nearby blocks of a type 0
send-chat message: str Send a message in game chat 0

成本与限制

运行它的成本

API 配额
N/A — connects directly to Minecraft LAN
每次调用 Token 数
100–500 tokens per action
费用
Free MCP server — requires Minecraft Java Edition ($26.95)
提示
Give high-level instructions ('build a house') rather than individual block placements to reduce calls.

安全

权限、密钥、影响范围

凭据存储: N/A — connects to LAN game
数据出站: Connects to your local Minecraft LAN server only

故障排查

常见错误与修复

Bot can't connect to server

Ensure you opened the world to LAN (ESC → Open to LAN) and the port in your config matches the LAN port shown in chat.

验证: Check the Minecraft chat for 'Local game hosted on port XXXXX'
Bot disconnected

The Minecraft server may have kicked the bot for inactivity or invalid actions. Restart Claude Desktop to reconnect.

验证: Check Minecraft chat for kick messages
Can't place blocks — invalid position

The bot may be too far from the target position. Move closer first with move-to-position.

验证: Check bot position relative to target

替代方案

minecraft-mcp-server 对比其他方案

替代方案何时用它替代权衡
Roblox Studio MCPYou want AI-assisted game development in Roblox instead of MinecraftDifferent platform and audience

更多

资源

📖 阅读 GitHub 上的官方 README

🐙 查看未解决的 issue

🔍 浏览全部 400+ MCP 服务器和 Skills