Перейти к содержимому

Command-MCP

Expose your Minecraft server as an MCP (Model Context Protocol) server, letting AI assistants like Claude operate your server remotely — search and run commands, use in-game Tab completion, and build datapacks, all through a standard MCP client.

Fabric
Загрузчики
Fabric
Скачиваний на Modrinth
67
Подписчиков на Modrinth
0
версия
1
Обновлён
15 августа 202615 авг.
Опубликован
в 2026

Коротко о моде

Работает на Fabric
Для Minecraft 1.20.1
Ставится только на сервер; игрокам ставить не нужно
Последняя версия — 1.0.0 от 15 августа 2026
Лицензия GPL-3.0-only — бесплатно
Где нужен
В игрене нуженНа сервереобязателен

Ставится только на сервер; игрокам ставить не нужно

Версии игры1.20.1
Перевода пока нет — показываем оригинал на английском

Command MCP

Expose your Minecraft server as an MCP (Model Context Protocol) server, so AI assistants such as Claude can operate your server remotely: search and run commands, use in-game Tab completion, and build datapacks — all through a standard MCP client.

Built for Fabric with zero additional dependencies: the MCP server uses Streamable HTTP transport (POST/GET/DELETE /mcp) with JSON-RPC 2.0, implemented on the JDK's built-in HttpServer and Minecraft's bundled Gson.

Features

  • Command access — search registered commands (vanilla and mods), execute commands as console (OP level 4) on the server main thread with captured output, run read-only queries, and get Tab-completion suggestions that match in-game behavior.
  • Datapack workflow — inspect server info (version, pack_format, directory layout), list datapacks, read/write/delete datapack files, and reload with full error reporting (.mcfunction syntax errors, JSON errors, incompatible pack_format).
  • Session management — Mcp-Session-Id based sessions with idle timeout, SSE keepalive streams, and optional Authorization: Bearer token auth.
  • In-game awareness — chat notifications when an AI client connects or disconnects.
  • Safe defaults — binds to 127.0.0.1 only; datapack file writes can be disabled.

Requirements

  • Minecraft 1.20.1
  • Fabric Loader >= 0.19.3
  • Fabric API
  • Java >= 17

Getting Started

  1. Drop the mod jar into your mods folder and start the game/server.
  2. The MCP server starts automatically:

    • Dedicated servers: enabled by default.
    • Single-player / client: disabled by default; set enabled=true in the config to turn it on.
  3. Point your MCP client at http://127.0.0.1:8123/mcp (Streamable HTTP).

Example Claude Desktop configuration:

{
  "mcpServers": {
    "minecraft": {
      "type": "http",
      "url": "http://127.0.0.1:8123/mcp",
      "headers": {
        "Authorization": "Bearer <your-token>"
      }
    }
  }
}

Configuration

Config file: config/command-mcp.properties (created with defaults on first launch).

OptionDefaultDescription
enabledtrue on dedicated servers, false in client environmentsWhether the MCP HTTP server starts with the game.
host127.0.0.1Bind address. Keep 127.0.0.1 unless you know what you are doing.
port8123Bind port (0 = system-assigned).
authToken(empty)When non-empty, requests must send `Authorization: Bearer orX-Auth-Token: `.
datapackWritetrueAllow write_datapack_file / delete_datapack_file to modify the world's datapacks folder.

MCP Tools

ToolDescription
list_commandsSearch registered commands by name/alias/help text; returns usage templates.
execute_commandExecute a command as console (OP level 4) and return captured output.
query_commandRun a read-only query command (/list, /time query daytime, /data get, ...).
get_command_completionsTab-completion suggestions for a partial command, matching in-game behavior.
get_server_infoMinecraft version, pack_format, datapack directory layout, loaded mods.
list_datapacksDatapacks in the world folder: type, enabled state, provided namespaces.
read_datapack_fileRead a UTF-8 text file inside the world's datapacks folder.
write_datapack_fileCreate/overwrite a datapack file; auto-creates pack.mcmeta and parent directories.
delete_datapack_fileDelete a file/directory inside the datapacks folder.
reload_datapacksReload datapacks and wait, then report success or captured errors/warnings.

Security Notes

  • The server executes commands at OP level 4 — treat MCP access as full server access.
  • By default the server only listens on 127.0.0.1. If you expose it over a network, always set an authToken.
  • Set datapackWrite=false to keep the datapack tools read-only.

Development

./gradlew build

The built jar lands in build/libs/.

License

Released under the GPL-3.0 license. If you use this code in your project, your project must also be open-sourced under a compatible license.

Частые вопросы

Как установить Command-MCP?

Установите Fabric под свою версию Minecraft, скачайте Command-MCP под ту же версию и загрузчик, положите файл в папку mods и запустите игру с профилем загрузчика.

Для каких версий Minecraft есть Command-MCP?

У Command-MCP есть сборки для Minecraft 1.20.1.

Нужен ли Command-MCP на сервере?

Ставится только на сервер; игрокам ставить не нужно

Лицензия и источник
GNU General Public License v3.0 onlyможно использовать и распространять; изменённые версии — под той же лицензией и с исходным кодом
Оригинал — Modrinth↗Файлы — без изменений, проверены по SHA-512Это ваш мод? Правообладателям

Сайт использует cookie: необходимые — для входа и темы, а также счётчики посещений Яндекс Метрика и LiveInternet — по ним мы видим, как пользуются сайтом. Рекламных cookie у нас нет. Подробнее