MCP Minecraft Remote

by nacal
Verified

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Required runtime environment for the MCP server, supporting server connection and Minecraft interaction functionality.

MCP Minecraft 远程

此项目的灵感来自 arjunkmrm 的 mcp-minecraft。虽然原版仅支持本地Minecraft服务器连接,但这个项目是从头开始创建的,以添加对远程Minecraft服务器连接的支持。

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

特点

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

安装

快速安装(推荐)

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

按照 CLI 提示完成设置。

手动安装

# 从 npm 安装 npm 安装 -g mcp-minecraft-remote # 或克隆存储库 git clone https://github.com/nacal/mcp-minecraft-remote.git cd mcp-minecraft-remote # 安装依赖项 npm install # 构建项目 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 远程 MCP 配置添加到您的配置文件中:
{ \"mcpServers\": { \"minecraft-remote\": { command": "npx", 参数:[“-y”,“mcp-minecraft-remote@latest”] } }

如果你已经全局安装:

{ \"mcpServers\": { \"minecraft-remote\": { 命令: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 Edition 服务器(版本 1.8 或更高版本)

注意:此工具已经过测试和验证,可以专门用于vanilla Minecraft 1.21。虽然它可能适用于其他版本或模组化服务器,但不能保证兼容性。

许可证

MIT

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

允许AI助手连接到远程服务器上的Minecraft玩家并控制他们,通过自然语言命令实现导航、建造、采矿、库存管理、实体交互和聊天通信。

  1. Features
    1. Installation
      1. Quick Install (Recommended)
      2. Manual Installation
    2. Usage
      1. Using with Claude Desktop
      2. Important Server Requirements
      3. Available Tools
      4. Example Prompts
    3. Requirements
      1. License
        ID: 86ml5tqneo