Repository navigation
Agent runtime
On top of the bridge tools (the agent's body: move, mine, look) the MCP server ships a runtime with what an autonomous agent needs across sessions:
- long-term memory: notes, places, container contents, events and skills, with full-text search;
- a persistent goal tree;
- a chunk-level world map with exploration by frontier;
- a crafting planner over the game's own recipes, vanilla and modded;
- background jobs that run multi-step actions without the model driving every tick.
Everything is stored per world in one SQLite file, ~/.mcpfabric/agent.db. The file is created the
first time an agent tool is called, not when the server starts. The full reference is
docs/AGENT.md.
-
agent_brief: where am I, what was I doing. -
goal_list, orgoal_addwith a checkabledoneWhenand concrete subgoals. -
recallbefore searching the world again.plan_craftbefore gathering. - Start a job (
collect_blocks,craft_item,travel_to,explore) and follow it withjob_status. -
observeafter arriving somewhere new.rememberwhat matters: bases, dangers, player requests. -
goal_updatewith an outcome, then the next goal.
travel_to, explore, collect_blocks and craft_item return at once; job_status long-polls and
job_cancel stops one. Only one job runs at a time (there is one body). A job belongs to the MCP
session that started it; closing the session cancels it, and every job stops after 31 minutes. Jobs
check health before each step and stop with a reason when it drops to the limit (6 by default).
While walking or mining a job also fights back against hostile mobs in melee range, except creepers.
| Variable | Default | Meaning |
|---|---|---|
MCPFABRIC_AGENT |
on |
0, false or off serves only the bridge tools |
MCPFABRIC_DATA_DIR |
~/.mcpfabric |
where agent.db lives |
MCPFABRIC_WORLD |
from the game | force a world id, for example to share memory between two saves |
Needs Node.js 22.16 or newer (node:sqlite with FTS5).
- The walker cannot swim, climb ladders, pillar up or dig tunnels; buried blocks are skipped.
- On 1.21.2+ multiplayer the client only sees recipes it has unlocked, so some crafts cannot be planned.
- Smelting and smithing steps are planned but not executed automatically.
mcpfabric is MIT licensed. Found a mistake? Open an issue or send a pull request.