Skip to content

Installation

denfry edited this page Oct 5, 2026 · 1 revision

Installation

1. Pick the right jar

One jar per Minecraft version and loader, from Modrinth.

Line Minecraft versions Java
1.21.x 1.21.1 to 1.21.11 21
26.x 26.1.2 (also installs on 26.1 to 26.1.1), 26.2, 26.3 25
  • Fabric: needs Fabric Loader 0.19.5 or newer and the matching Fabric API.
  • NeoForge: all versions except 1.21.2 (NeoForge shipped no usable build for it). The minimum NeoForge build for each Minecraft version is in the README. 1.21.6, 1.21.7, 1.21.9 and 26.3 only have beta NeoForge builds.

Jar names: mcpfabric-<version>+<minecraft>.jar (Fabric) and mcpfabric-neoforge-<version>+<minecraft>.jar (NeoForge).

2. Put it in mods/

  • Client (the AI plays as you): the mods/ folder of your instance.
  • Dedicated server (the AI administers): the mods/ folder of the server.
  • Both at once is fine. The mod adapts to the side it runs on.

3. Start the game once and copy the token

The first launch creates config/mcpfabric.config.json and logs

[mcpfabric] ready - bridge http://127.0.0.1:25599 (token: .../config/mcpfabric.config.json)

Open that file and copy token. It is deliberately not printed to the log. Treat it like a password: anyone who has it can control your game.

4. Build the MCP server

You need Node.js 22.16 or newer.

git clone https://github.com/denfry/mcpfabric
cd mcpfabric/mcp-server
npm ci
npm run build

Next: Connecting an MCP client.

Mod configuration

config/mcpfabric.config.json:

{
  "host": "127.0.0.1",
  "port": 25599,
  "token": "generated automatically",
  "requireAuth": true,
  "callTimeoutMs": 8000,
  "enableWorldWrite": true,
  "enableCommands": true,
  "enablePlayerControl": true,
  "enableVision": true
}
Key Meaning
host, port where the bridge listens. Keep host on 127.0.0.1.
token bearer token the MCP server must send. Generated on first run.
requireAuth true by default. Setting it to false removes the only authentication on an operator-level bridge.
callTimeoutMs how long one call may block the game thread before it is cancelled.
enableWorldWrite, enableCommands, enablePlayerControl, enableVision capability locks, see Capability locks and security.

Clone this wiki locally