/ 目錄 / 演練場 / minecraft-mcp-server
● 社群 yuniko-software ⚡ 即開即用

minecraft-mcp-server

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

Control a Minecraft bot with Claude — build structures, explore worlds, manage inventory, and interact in real-time via natural language.

minecraft-mcp-server uses the Mineflayer API to let AI assistants control a Minecraft character in real-time. Claude can navigate, build structures, manage inventory, interact with blocks and entities, smelt items, and communicate in chat. Supports Minecraft 1.21.11, connects via LAN to your singleplayer world, and works with 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

How to build a Minecraft structure with AI assistance

👤 Minecraft players who want AI help with building ⏱ ~15 min beginner

何時使用: You want to build something complex in Minecraft without placing every block manually.

前置條件
  • Minecraft Java Edition 1.21.11 — Create a singleplayer world and Open to LAN
  • minecraft-mcp-server configured — Add to Claude Desktop config with host, port, and username
步驟
  1. Describe the build
    Build a 10x10 stone house with oak wood corners, glass windows on each wall, an oak door, and a flat stone roof. Start at my current position.✓ 已複製
    → Bot begins placing blocks systematically, reporting progress
  2. Modify the build
    Add a second floor with the same layout and a staircase connecting them.✓ 已複製
    → Second floor built with stairs

結果: A complete structure built in Minecraft via natural language instructions.

注意事項
  • Bot doesn't have required blocks in inventory — Ensure the bot has materials or switch to Creative mode for unlimited blocks

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