| name | minecraft-async |
| description | Manage a preinstalled local Minecraft Java client asynchronously for CTF and automation workflows. Use when Codex needs to launch Minecraft in offline mode with alternate usernames, inspect Minecraft logs, focus or type into the X11 game window, send chat or slash commands quickly, or join a multiplayer server by launching the installed client directly instead of relying on the official launcher. |
OpenCROW I/O - Minecraft Async
Prefer the opencrow-minecraft-mcp server for status, launch, chat, commands, screenshots, and log reads. Fall back to scripts/mcx only when you need to inspect or debug the backend directly.
MCP First
- Use
toolbox_info, toolbox_verify, and toolbox_capabilities first.
- Use the typed Minecraft operations:
minecraft_status
minecraft_launch
minecraft_join_server
minecraft_join_world
minecraft_focus
minecraft_send_text
minecraft_chat
minecraft_command
minecraft_screenshot
minecraft_read_log
minecraft_stop
- Treat the MCP server as the main interface and
scripts/mcx as the implementation fallback.
Use scripts/mcx to control the already-installed Minecraft Java client under ~/.minecraft when you are operating outside MCP.
Workflow
- Check
status to confirm the install, versions, X11 display, and any running session.
- Launch with the
direct backend for offline usernames against the existing install.
- Use
join-server or join-world when you need the client to open directly into a target.
- Use
focus, chat, command, or send-text for fast in-game actions.
- Capture a screenshot when the visual state matters.
- Inspect
latest.log and the managed launcher log when something fails.
- Stop the managed session explicitly when done.
Commands
scripts/mcx status
scripts/mcx launch --username ra13118 --version 1.21.8
scripts/mcx join-server --username ra13118 --server dyn-01.midnightflag.fr:13118 --version 1.21.8
scripts/mcx join-world --username ra13118 --world NewWorld --version 1.21.8
scripts/mcx chat --text 'hello from Codex'
scripts/mcx command --text 'tp @s 0 100 0'
scripts/mcx send-text --text 'seed?'
scripts/mcx screenshot --output /tmp/minecraft-state.png
scripts/mcx read-log --which latest --tail 80
scripts/mcx stop
Backends
- Prefer the default
direct backend. It launches the installed client from ~/.minecraft/versions, libraries, and assets without the official launcher and supports offline usernames.
- Use
--backend cmd-launcher only when cmd-launcher is already installed and you deliberately want its instance model. Read references/backends.md first.
- Treat
join-server and join-world as launch-time operations. They use direct quick-play arguments and are more reliable before the client is already in-game.
Example Workflows
Connect To A Server
scripts/mcx join-server \
--session server-demo \
--username ra13118 \
--version 1.21.8 \
--server dyn-01.midnightflag.fr:13118
After the client loads:
scripts/mcx screenshot --output /tmp/server-state.png
scripts/mcx chat --text 'hello'
scripts/mcx command --text 'trigger ready'
Enter A Local World And Teleport
First inspect save-folder names:
scripts/mcx status
Then launch directly into the world and teleport:
scripts/mcx join-world \
--session world-demo \
--username ra13118 \
--version 1.21.8 \
--world NewWorld
When the world finishes loading:
scripts/mcx command --text 'tp @s 52 -64 193'
scripts/mcx screenshot --output /tmp/world-teleport.png
The --world value should match the save directory name under ~/.minecraft/saves.
Troubleshoot A Disconnect Or Bad State
scripts/mcx read-log --which both --tail 120
scripts/mcx screenshot --output /tmp/minecraft-error-state.png
Use the screenshot for visual diagnosis and the logs for protocol or world-load failures.
Operational Rules
- Use one managed session name per task flow if you need multiple launches; otherwise keep the default
default session.
- Use
status before join-world so you can copy the exact save-folder name.
- Read
read-log --which both --tail 120 before retrying a failed launch.
- Use
command for slash commands and chat for normal messages instead of send-text when possible.
- Use
screenshot when the visual state matters. It captures the current game window to a local PNG file.
- Expect X11 window control to require a live
DISPLAY; if no display is available, limit work to launch and log inspection.
- If a client is already running and you need a different offline username or initial server, stop it and relaunch.
References