Skip to main content
Glama

MCP Minecraft 遥控器

该项目灵感源自 arjunkmrm 的mcp-minecraft 。原版仅支持本地 Minecraft 服务器连接,而本项目则从零开始,旨在支持连接到远程 Minecraft 服务器。

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

特征

  • 通过 AI 助手连接并控制 Minecraft 玩家

  • 导航、挖掘、建造并与 Minecraft 世界互动

  • 与服务器上的其他玩家聊天

  • 检查库存、玩家位置和服务器信息

  • 高级运动控制,包括跳跃、潜行和冲刺

  • 实体交互包括攻击和跟随

  • 容器使用(箱子、熔炉等)

  • 物品制作和村民交易

  • 详细的库存管理

Related MCP server: Minecraft Server MCP

安装

快速安装(推荐)

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 。这允许机器人无需身份验证即可连接到 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的僵尸”

  • “关注名为史蒂夫的玩家”

容器使用

  • “打开位于坐标 x=100, y=64, z=200 的宝箱”

  • “从箱子里拿出10块铁锭”

  • “将 5 块鹅卵石放入箱子中”

  • “关闭容器”

制作与交易

  • “有哪些木镐的制作配方?”

  • “用我库存中的木材制作 4 根木棍”

  • “查看附近村民提供的交易”

  • “与村民交易获得10颗绿宝石”

沟通

  • “向聊天室发送问候消息”

  • “告诉大家我找到了钻石”

要求

  • Node.js 18+

  • 支持 MCP 的 AI 助手(例如 Claude)

  • Minecraft Java 版服务器(1.8 或更高版本)

注意:此工具已测试并验证,仅支持原版 Minecraft 1.21。虽然它也能兼容其他版本或修改过的服务器,但兼容性无法保证。

执照

麻省理工学院

Available Tools

27 tools
attackEntityC

Attack a specific entity

Inputs: entityId (required).

checkInventoryB

Check the items in the player inventory

Inputs: no named parameters.

closeContainerA

Close the currently open container

Inputs: no named parameters.

connectToServerC

Connect to a Minecraft server with the specified credentials

Inputs: host (required), username (required), port, password, +1 more.

craftItemB

Craft an item using available materials

Inputs: itemName (required), count.

depositItemB

Put items into an open container

Inputs: itemName (required), amount.

digBlockB

Dig a block at the specified coordinates

Inputs: x (required), y (required), z (required).

disconnectFromServerA

Disconnect from the Minecraft server

Inputs: no named parameters.

equipItemA

Equip an item from inventory to hand or armor slot

Inputs: itemName (required), destination.

followEntityC

Follow a specific entity

Inputs: entityId (required), distance.

getNearbyEntitiesB

Get a list of all entities nearby

Inputs: range.

getNearbyPlayersA

Get a list of players nearby

Inputs: no named parameters.

getPositionA

Get the current position of the player in the Minecraft world

Inputs: no named parameters.

getRecipesC

Get a list of available crafting recipes

Inputs: filter.

getServerInfoA

Get information about the currently connected server

Inputs: no named parameters.

inventoryDetailsB

Get detailed information about inventory items

Inputs: no named parameters.

listTradesB

List available trades from a nearby villager

Inputs: villagerName, range.

lookAtB

Make the player look in a specific direction or at coordinates

Inputs: x (required), y (required), z (required).

moveControlC

Control the player with basic movement commands

Inputs: action (required), duration.

moveToB

Move the player to a specific location

Inputs: x (required), y (required), z (required).

openContainerB

Open a container (chest, furnace, etc.) at specific coordinates

Inputs: x (required), y (required), z (required).

placeBlockC

Place a block at the specified location

Inputs: x (required), y (required), z (required), itemName (required).

sendChatB

Send a chat message to the Minecraft server

Inputs: message (required).

tossItemC

Throw items from inventory

Inputs: itemName (required), amount.

tradeWithVillagerB

Trade with a nearby villager

Inputs: tradeIndex (required), villagerName, count.

useOnEntityB

Use held item on a specific entity

Inputs: entityId (required).

withdrawItemB

Take items from an open container

Inputs: itemName (required), amount.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.9/5.0

    Scored across 27 tools

    Disambiguation4/5

    Most tools target distinct actions (e.g., attack vs. follow vs. use on entity). The only minor overlap is between getNearbyEntities and getNearbyPlayers, but descriptions clarify the latter is a subset.

    Naming Consistency4/5

    The vast majority follow a verb_noun pattern (e.g., checkInventory, digBlock). One outlier is inventoryDetails, which should be getInventoryDetails for consistency.

    Tool Count3/5

    27 tools is high but justifiable for comprehensive Minecraft control. It sits between the borderline heavy (16-25) and excessive (25+), but each tool serves a distinct purpose.

    Completeness2/5

    Major actions are covered, but notable gaps exist: no tool to inspect container contents (only deposit/withdraw), and no way to use items on blocks (only entities). This can hinder essential workflows.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers