Home›Java›Mods›Command-MCP
Command-MCP
ModsJava

Command-MCP

Java mod listed for Minecraft 1.20. Downloads from the MC Java Mods app on Android.

by limingzxc · on Modrinth

Expose your Minecraft server as an MCP (Model Context Protocol) server, letting AI assistants like Claude operate your server remotely — search and run…

⬇ Download on Modrinth
Command-MCP — screenshot 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

Requirements

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).

Option Default Description
enabled true on dedicated servers, false in client environments Whether the MCP HTTP server starts with the game.
host 127.0.0.1 Bind address. Keep 127.0.0.1 unless you know what you are doing.
port 8123 Bind port (0 = system-assigned).
authToken (empty) When non-empty, requests must send Authorization: Bearer <token> or X-Auth-Token: <token>.
datapackWrite true Allow write_datapack_file / delete_datapack_file to modify the world's datapacks folder.

MCP Tools

Tool Description
list_commands Search registered commands by name/alias/help text; returns usage templates.
execute_command Execute a command as console (OP level 4) and return captured output.
query_command Run a read-only query command (/list, /time query daytime, /data get, ...).
get_command_completions Tab-completion suggestions for a partial command, matching in-game behavior.
get_server_info Minecraft version, pack_format, datapack directory layout, loaded mods.
list_datapacks Datapacks in the world folder: type, enabled state, provided namespaces.
read_datapack_file Read a UTF-8 text file inside the world's datapacks folder.
write_datapack_file Create/overwrite a datapack file; auto-creates pack.mcmeta and parent directories.
delete_datapack_file Delete a file/directory inside the datapacks folder.
reload_datapacks Reload datapacks and wait, then report success or captured errors/warnings.

Security Notes

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.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

File checked by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more