MineAgent is a Fabric client mod plus a tiny MCP bridge for controlling the live Minecraft Java client from Codex.
This avoids the Mineflayer protocol-version problem by running commands inside the real Fabric client instead of logging in a separate bot.
.\gradlew.bat buildThe mod jar is written to:
build/libs/mineagent-0.2.0.jar
- Put the jar in the Fabric client's
modsfolder. - Start Minecraft
26.1.2with Fabric. - Open a world or LAN/server session.
- The mod listens on
http://127.0.0.1:17890. - Open
http://127.0.0.1:17890/for the Web control panel.
Add this to C:\Users\opevi\.codex\config.toml:
[mcp_servers.mineagent]
command = 'C:\nvm4w\nodejs\node.exe'
args = ['E:\Coding\MCmod\MineAgent\mcp\mineagent-mcp.js']
startup_timeout_sec = 30Then restart Codex.
get_statussend_chatrun_commandlook_atmove_inputkey_signallist_keybindingsrelease_all_keysbaritone_stopstop_allread_chatfawe_commandfawe_pos1fawe_pos2fawe_pos_selectfawe_setfawe_wallsfawe_replacefawe_undofawe_redojumpselect_hotbar_slotget_blockplace_blockplace_signget_inventorywait_for_inventoryget_containerwait_for_containerclick_slotcontainer_clickclick_slot_by_itemcraft_itemcontainer_buttonbaritone_statusbaritone_commandbaritone_gotocombat_setcombat_statuscombat_stopget_packet_logget_screenshotrun_survival_macrosurvival_macro_status
For survival gameplay, prefer the physical tools (look_at, key_signal, place_block, craft_item, Baritone wrappers, and the wait helpers). Keep run_command for explicit testing/admin work.
If Baritone is installed in the same Fabric client, use baritone_command for commands such as goto, mine, follow, and stop. The # prefix is added automatically.
If FAWE or WorldEdit is available on the server, use the fawe_* tools for selection edits. Follow with read_chat to inspect command success or error feedback.
wait_for_inventory and wait_for_container run on the MCP side and poll the live client until a simple item/title condition is met or the timeout expires. Timeout results return ok:false with the last observed snapshot so an agent can decide what to do next.
combat_set enables an explicit Combat mode for private testing. It can target by entity id or display-name substring, bunny hop toward the target, wait for attack cooldown, attempt falling-window critical hits, sprint tap, and select the best sword in the hotbar. Use combat_stop or stop_all to disable it.
The Web control panel exposes Combat, stop controls, snapshots, inventory/chat/packet tools, key signals, Baritone, FAWE, remote sign placement, and GUI item clicking without requiring raw JSON input.