M

Minecraft 远程控制工具

允许AI助手连接到远程服务器上的Minecraft玩家并对其进行控制,通过自然语言命令实现导航、建造、挖掘、库存管理、实体交互和聊天通信等功能。

games-and-gamificationos-automation

614 查看 · 2026-07-07 更新

简介

允许AI助手连接到远程服务器上的Minecraft玩家并对其进行控制,通过自然语言命令实现导航、建造、挖掘、库存管理、实体交互和聊天通信等功能。

简介

允许AI助手连接到远程服务器上的Minecraft玩家并对其进行控制,通过自然语言命令实现导航、建造、挖掘、库存管理、实体交互和聊天通信等功能。

MCP Minecraft 远程控制

该项目受到 arjunkmrm 的 mcp-minecraft 启发。虽然原项目仅支持本地 Minecraft 服务器连接,但本项目是从头开始全新创建的,以添加对远程 Minecraft 服务器连接的支持。

使用 MCP(模型上下文协议)进行 Minecraft 远程控制。

功能

  • 通过 AI 助手连接并控制 Minecraft 玩家
  • 导航、挖掘、建造和与 Minecraft 世界互动
  • 与服务器上的其他玩家聊天
  • 检查物品栏、玩家位置和服务器信息
  • 高级移动控制,包括跳跃、潜行和冲刺
  • 实体互动,包括攻击和跟随
  • 使用容器(箱子、熔炉等)
  • 制作物品和村民交易
  • 详细的物品栏管理

安装

快速安装(推荐)

npx -y @smithery/cli install mcp-minecraft-remote --client claude

按照 CLI 提示完成设置。

手动安装

# Install from npm npm install -g mcp-minecraft-remote # Or clone the repository git clone https://github.com/nacal/mcp-minecraft-remote.git cd mcp-minecraft-remote # Install dependencies npm install # Build the project npm run build

使用方法

与 Claude Desktop 一起使用

  1. 导航到 Claude Desktop 配置文件:

    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Linux: ~/.config/Claude/claude_desktop_config.json
  2. 将 Minecraft Remote MCP 配置添加到您的配置文件中:

{ "mcpServers": { "minecraft-remote": { "command": "npx", "args": ["-y", "mcp-minecraft-remote@latest"] } } }

如果您已全局安装:

{ "mcpServers": { "minecraft-remote": { "command": "mcp-minecraft-remote" } } }

如果您已在本地克隆了仓库:

{ "mcpServers": { "minecraft-remote": { "command": "node", "args": ["/absolute/path/to/mcp-minecraft-remote/build/index.js"] } } }
  1. 保存文件并重新启动 Claude Desktop
  2. 与 Claude 开始新的对话,并开始使用 Minecraft 控制命令

重要服务器要求

  • 服务器在线模式:Minecraft 服务器必须在 server.properties 文件中将 online-mode=false 设置为 false。这允许机器人无需通过 Minecraft 的会话服务器进行身份验证即可连接。
  • 如果使用需要身份验证的服务器,在连接时需要提供有效的高级账户凭据。

可用工具

核心功能

  • connectToServer:使用指定凭据连接到 Minecraft 服务器
  • disconnectFromServer:断开与 Minecraft 服务器的连接
  • sendChat:向服务器发送聊天消息
  • getServerInfo:获取已连接服务器的信息

移动

  • getPosition:获取当前玩家位置
  • moveTo:移动到特定坐标
  • moveControl:基本移动控制(前进、后退、左转、右转、跳跃、冲刺、潜行、停止)
  • lookAt:使玩家朝特定方向或坐标看

世界互动

  • digBlock:在特定坐标处挖掘方块
  • placeBlock:在特定坐标处放置方块

物品栏管理

  • checkInventory:基本物品栏检查
  • inventoryDetails:获取关于物品栏物品的详细信息
  • equipItem:从物品栏装备物品到手中或护甲槽
  • tossItem:从物品栏扔出物品

实体互动

  • getNearbyPlayers: 获取附近的玩家列表
  • getNearbyEntities: 获取附近的所有实体列表
  • attackEntity: 攻击特定实体
  • useOnEntity: 对特定实体使用手中的物品
  • followEntity: 跟随特定实体

容器交互

  • openContainer: 打开指定坐标的容器(如箱子、熔炉等)
  • withdrawItem: 从打开的容器中取出物品
  • depositItem: 将物品放入打开的容器
  • closeContainer: 关闭当前打开的容器

制作

  • getRecipes: 获取可用的制作配方列表
  • craftItem: 使用可用材料制作物品

交易

  • listTrades: 列出附近村民提供的交易
  • tradeWithVillager: 与附近的村民进行交易

示例指令

基本控制

  • "使用用户名 player1 连接到 play.example.com 的 Minecraft 服务器"
  • "我在游戏中的当前位置是什么?"
  • "将我移动到坐标 x=100, y=64, z=-200"
  • "让我向前走3秒"
  • "让我跳跃并冲刺向那座山"

库存和物品

  • "详细检查我的库存"
  • "将我的钻石剑装备到手中"
  • "从我的库存中扔出5个泥土块"

方块交互

  • "挖掘坐标 x=10, y=65, z=20 的方块"
  • "在坐标 x=11, y=65, z=20 处放置一个石头方块"

实体交互

  • "附近有其他玩家吗?"
  • "在我周围20格内有哪些实体?"
  • "攻击 ID 为 12345 的僵尸"
  • "跟随名为 Steve 的玩家"

容器使用

  • "打开坐标 x=100, y=64, z=200 的箱子"
  • "从箱子里取出10个铁锭"
  • "将5个圆石放入箱子"
  • "关闭容器"

制作和交易

  • "我有什么可用的木制镐的配方?"
  • "使用库存中的木头制作4根木棍"
  • "查看附近的村民提供哪些交易"
  • "与村民交易以获得10个绿宝石"

交流

  • "向聊天发送一条问候消息"
  • "告诉大家我找到了钻石"

需求

  • Node.js 18+
  • 支持 MCP 的 AI 助手(如 Claude)
  • Minecraft Java 版服务器(版本 1.8 或更高)

注意:此工具已经过测试,并确认特别适用于原版 Minecraft 1.21。虽然它可能与其他版本或带有模组的服务器兼容,但不保证完全兼容。

许可证

MIT

服务配置

[{'mcpServers': {'minecraft-remote': {'args': ['-y', 'mcp-minecraft-remote@latest'], 'command': 'npx'}}}, {'mcpServers': {'minecraft-remote': {'command': 'mcp-minecraft-remote'}}}, {'mcpServers': {'minecraft-remote': {'args': ['/absolute/path/to/mcp-minecraft-remote/build/index.js'], 'command': 'node'}}}]

来源

Minecraft 远程控制工具 - MCP - HelloWorld