mcp-minecraft

mcp-minecraft

一个由 Mineflayer API 驱动的 Minecraft MCP 服务器。它允许实时控制 Minecraft 角色,使 AI 助手能够通过自然语言指令来建造结构、探索世界并与游戏环境互动。

Category
访问服务器

Tools

move-to-position

Move the bot to a specific position

look-at

Make the bot look at a specific position

jump

Make the bot jump

get-position

Get the current position of the bot

move-in-direction

Move the bot in a specific direction for a duration

list-inventory

List all items in the bot's inventory

find-item

Find a specific item in the bot's inventory

equip-item

Equip a specific item

place-block

Place a block at the specified position

dig-block

Dig a block at the specified position

get-block-info

Get information about a block at the specified position

find-block

Find the nearest block of a specific type

find-entity

Find the nearest entity of a specific type

send-chat

Send a chat message in-game

README

Minecraft MCP 服务器

⚠️ 重要兼容性警告:截至 2025 年 3 月 25 日,Minecraft 1.21.5 刚刚发布。此机器人目前不兼容 Minecraft 1.21.5。请使用 Minecraft 1.21.4,直到我们发布支持 1.21.5 的更新。

一个由大型语言模型和 Mineflayer API 驱动的 Minecraft 机器人。此机器人使用 模型上下文协议 (MCP) 来使 Claude 和其他支持的模型能够控制 Minecraft 角色。

<a href="https://glama.ai/mcp/servers/@yuniko-software/minecraft-mcp-server"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@yuniko-software/minecraft-mcp-server/badge" alt="mcp-minecraft MCP server" /> </a>

前提条件

  • Node.js
  • 一个正在运行的 Minecraft 游戏(下面的设置已使用 Microsoft Game Pass 中包含的 Minecraft 1.21.4 Java 版进行测试)
  • Claude Desktop

开始使用

此机器人旨在通过模型上下文协议 (MCP) 与 Claude Desktop 一起使用。

运行 Minecraft

创建一个单人游戏世界并将其开放到局域网(ESC -> 开放到局域网)。机器人将尝试使用端口 25565 和主机名 localhost 进行连接。这些参数可以在下一步的 claude_desktop_config.json 中配置。

MCP 配置

确保已安装 Claude Desktop。打开 File -> Settings -> Developer -> Edit Config。它应该打开安装目录。找到名为 claude_desktop_config.json 的文件并插入以下代码:

{
  "mcpServers": {
    "minecraft": {
      "command": "npx",
      "args": [
        "-y",
        "github:yuniko-software/minecraft-mcp-server",
        "--host",
        "localhost",
        "--port",
        "25565",
        "--username",
        "ClaudeBot"
      ]
    }
  }
}

仔细检查是否使用了正确的 --port--host 参数。确保完全重启 Claude Desktop 应用程序(应在 OS 托盘中关闭)。

运行

确保 Minecraft 游戏正在运行并且世界已开放到局域网。然后启动 Claude Desktop 应用程序,机器人应该加入游戏。

Claude Desktop 可能需要一些时间来启动 MCP 服务器。服务器已成功启动的标志是聊天旁边出现一个锤子图标。

image

您可以通过任何活动的 Claude Desktop 聊天向机器人发出任何命令。您还可以上传建筑物的图像并要求机器人建造它们😁

不要忘记提及机器人应该在 Minecraft 中做一些事情,因为这是运行 MCP 服务器的触发器。它会要求您提供权限。

使用 Claude 3.7 Sonnet 可能会给您带来一些有趣的结果。机器人代理会非常聪明🫡

用法示例:共享 Claude 聊天

可用命令

连接到 Minecraft 服务器后,Claude 可以使用以下命令:

移动

  • get-position - 获取机器人的当前位置
  • move-to-position - 移动到特定坐标
  • look-at - 使机器人看向特定坐标
  • jump - 使机器人跳跃
  • move-in-direction - 在特定方向上移动一段时间

物品栏

  • list-inventory - 列出机器人物品栏中的所有物品
  • find-item - 在物品栏中查找特定物品
  • equip-item - 装备特定物品

方块互动

  • place-block - 在指定坐标放置方块
  • dig-block - 在指定坐标挖掘方块
  • get-block-info - 获取有关方块的信息
  • find-block - 查找特定类型的最近方块

实体互动

  • find-entity - 查找特定类型的最近实体

通讯

  • send-chat - 在游戏中发送聊天消息

贡献

此应用程序仅在两天内完成,代码非常简单明了。非常感谢所有的重构提交、功能和测试贡献、问题和讨论!

欢迎提交拉取请求或打开问题以进行改进。以下是一些可以改进的领域:

  • 附加文档
  • 更强大的错误处理
  • 不同组件的测试
  • 新功能和命令

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选