Skip to main content
Glama
Minecraft Server MCP

Minecraft Server MCP

by zkonikishi

Minecraft Server MCP

单仓库维护的 Minecraft Java 版机器人 MCP 服务。MCP 工具层在 src,游戏运行层源码在 game-runtime,它是 Minecraft Server MCP 的一部分,不是独立安装或发布的包;不需要克隆另一个项目。保留源项目许可与署名,独立仓库不等于从零编写协议栈。

安装与运行

使用 Node.js 24.12+(24.x)和 npm,从仓库根目录运行:

npm ci
node dist/main.js --host 127.0.0.1 --port 25565 --version 26.3 --username MyBot

通过 MCP 客户端的 stdio 配置启动同一条 node 命令;将入口替换为实际绝对路径。运行会尝试连接指定服务器。示例默认为离线身份,正版服使用 --auth microsoft。不要提交认证缓存。

Related MCP server: minecraft-mcp-server

版本和验收

原生目标 Java 26.3(协议 777)。2026-12-01 在隔离的原版 26.3 实服上通过 MCP 登录、出生、读取坐标、背包与游戏模式,无代理。工具发现返回 48 项;不等于每项工具均已实服验收,也不代表所有 Paper 插件或客户端模组兼容。

npm run build
npm test
node scripts/native-26.3-smoke.mjs <测试服本机端口>

上面的实服测试要求已运行的隔离服允许离线测试账号 McpSmoke263。旧 26.2 回归与历史说明见 迁移前文档,其中的旧 fork 安装命令不再适用。行为模式见 说明。

来源与修改

  • MCP 层来自 zkonikishi/Minecraft-MCP-Server 87bef6941f5b5cad0abf42fdee3491aae745194b(Apache-2.0,见 LICENSE)。

  • 游戏运行层沿用的代码来自 zkonikishi/Mineflayer f9e7db4447afda7838f08aa13430ec768738c178(MIT,见 game-runtime/LICENSE)。

  • 26.3 机器人适配参考 Mineflayer PR 4206,取自 ad4af12611fd55309bb387b2b416212bffb0eddf:移植挖掘、挥手、实体移动等逻辑,仅在 26.3 使用新的传送确认与物理调度。

  • 原生数据来自 suisarbre/minecraft-data;数据许可与来源见 vendor/minecraft-data/SOURCE.md。协议、区块与物理依赖按提交锁定,仍使用外部库。

  • 项目参考:VitaminMCP(服务端事件交叉验证);MCPFabric(长任务);aomarai/minecraft-mcp(版本和权限测试矩阵)。它们不是运行依赖。

Available Tools

48 tools
apply-behavior-defaultsB

Request role game mode again after an administrator grants permission; does not grant OP

Inputs: no named parameters.

can-craftB

Check if the bot can craft a specific item with current inventory

Inputs: itemName (required).

click-window-slotB

Click a slot in the currently open Minecraft window

Inputs: slot (required), mode, mouseButton.

close-current-windowB

Close the currently open Minecraft window

Inputs: no named parameters.

craft-itemC

Craft an item using a crafting recipe

Inputs: outputItem (required), amount.

deposit-to-containerC

Deposit an item from the bot inventory into a container block

Inputs: x (required), y (required), z (required), itemName (required), +1 more.

detect-gamemodeB

Detect the gamemode on game

Inputs: no named parameters.

dig-blockC

Dig a block at the specified position

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

drop-itemC

Drop an item from the bot's inventory by name

Inputs: itemName (required), count.

drop-selected-itemA

Drop the item currently held in the bot's main hand

Inputs: count.

equip-itemC

Equip a specific item

Inputs: itemName (required), destination.

find-blocksC

Find one or more nearby blocks of a specific type

Inputs: blockType (required), count, maxDistance.

find-entityC

Find the nearest entity of a specific type

Inputs: type, maxDistance.

find-itemC

Find a specific item in the bot's inventory

Inputs: nameOrType (required).

fly-toC

Make the bot fly to a specific position

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

get-behavior-profileA

Read AI role, owner, desired and observed game mode; permissions are NOT verified

Inputs: no named parameters.

get-block-infoC

Get information about a block at the specified position

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

get-bot-viewA

Return an experimental first-person PNG of loaded block collision geometry, not a textured client screenshot. No entities, GUI or custom models. Does not move the bot.

Inputs: fov, width, distance.

get-player-stateA

Read health, food, oxygen, experience, position, effects, held item, and game mode

Inputs: no named parameters.

get-positionA

Get the current position of the bot

Inputs: no named parameters.

get-recipeC

Get detailed information about a specific recipe

Inputs: itemName (required).

inspect-held-itemA

Inspect the complete metadata of the main-hand item

Inputs: no named parameters.

inspect-itemB

Inspect an inventory item including display name, lore, NBT, components, enchantments, and durability

Inputs: slot, itemName.

inspect-window-slotA

Inspect display name, lore, NBT, data components, enchantments, and durability for an item in the current window

Inputs: slot (required).

interact-entityB

Attack, activate, or use the held item on a nearby entity selected by id or name

Inputs: action (required), name, entityId, maxDistance.

jumpB

Make the bot jump

Inputs: no named parameters.

list-containerC

List items in a container block at a position

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

list-current-windowB

List the currently open Minecraft window slots

Inputs: includeEmpty.

list-inventoryA

List all items in the bot's inventory

Inputs: no named parameters.

list-nearby-entitiesC

List nearby players, mobs, objects, and dropped items with ids and distances

Inputs: type, maxDistance.

list-recipesA

List all available crafting recipes the bot can make with current inventory

Inputs: outputItem.

look-atC

Make the bot look at a specific position

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

maid-follow-ownerC

Start or stop following the bound owner; no automatic chat command execution

Inputs: enabled (required), distance.

move-in-directionC

Move the bot in a specific direction for a duration

Inputs: direction (required), duration.

move-to-positionC

Move the bot to a specific position

Inputs: x (required), y (required), z (required), range, +1 more.

move-window-slotB

Move a complete item stack between two slots in the current window

Inputs: sourceSlot (required), destinationSlot (required).

open-block-windowC

Open an interactive block window such as a chest, barrel, anvil, or grindstone

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

pickup-nearest-itemB

Move to the nearest dropped item entity and wait for pickup

Inputs: range, waitMs, timeoutMs, maxDistance.

place-blockC

Place a block at the specified position

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

quick-move-window-slotB

Shift-click a slot in the current window to transfer it between the GUI and player inventory

Inputs: slot (required).

read-chatC

Get recent chat messages from players

Inputs: count.

run-command-and-waitB

Run a slash command as the bot and wait for a matching chat or command response

Inputs: command (required), match, timeoutMs.

send-chatA

Send a chat message in-game

Inputs: message (required).

set-quickbar-slotC

Switch the selected hotbar slot

Inputs: slot (required).

smelt-itemC

Smelt items using a furnace-like block

Inputs: x (required), y (required), z (required), fuelItem (required), +5 more.

use-held-itemB

Use or release the held item in the main hand or offhand

Inputs: offhand, durationTicks.

wait-ticksA

Wait for a precise number of Minecraft client ticks before the next test assertion

Inputs: ticks (required).

withdraw-from-containerB

Withdraw an item from a container block into the bot inventory

Inputs: x (required), y (required), z (required), itemName (required), +1 more.

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 48 tools

    Disambiguation2/5

    Core domains are distinct, but several tools have blurred boundaries: inspect-item vs inspect-held-item vs inspect-window-slot, list-container vs list-current-window, and deposit/withdraw vs move-window-slot/quick-move-window-slot provide overlapping container and window paths. get-position also duplicates part of get-player-state, and interact-entity overlaps with use-held-item in context.

    Naming Consistency4/5

    All tools use lowercase hyphen-separated names, mostly verb-first or verb-object patterns such as get-position, move-to-position, and list-inventory. Minor deviations like maid-follow-owner, jump, and look-at are still readable and do not break the overall convention.

    Tool Count2/5

    At 48 tools, the server is far above the typical appropriate range even for a broad Minecraft bot domain. Many window/container and inspection tools could be consolidated without losing capability, making the surface feel heavy.

    Completeness4/5

    The surface covers movement, blocks, inventory, chat, commands, crafting, smelting, containers, GUI windows, entities, item use, player state, and waiting. A few niche actions such as sleeping, respawning, or explicit eating are absent, but most core workflows are supported.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables controlling a semi-autonomous Minecraft bot via MCP, supporting tasks like movement, combat, farming, and chatting.
      -
    • F
      license
      Not graded
      quality
      C
      maintenance
      Enables LLMs to control a Minecraft bot and interact with the game through MCP tools, including observing state, moving, mining, crafting, building, farming, managing inventory, enchanting, and chatting in-game.
      1
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables MCP-capable AI clients to control a Minecraft bot in a Java world, providing tools for movement, observation, inventory, chat, crafting, mining, and placing.
      5
      MIT