MCAPIBridge: Crafting IO Ports, Custom Screens, and TCP Script Automation
A MCAPIBridge guide. Covers MCAPIBridge 1.21.1-Beta-1.0.1 on Minecraft 1.21.1.
Drawing inspiration from the classic Minecraft Pi Protocol and RaspberryJuice, MCAPIBridge exposes live worlds, entities, and player states to external code over a local TCP socket while grounding in-world hardware around two craftable blocks.
Crafting IO Ports and Custom Screens
Before linking external Python or text-socket scripts to physical builds, assemble the mod's two interface blocks on a
Crafting Table:
Iron Ingot x2 +
Redstone Dust + stone tool materials x3 ->
IO Port x4
Glass Pane x3 +
Redstone Dust x2 +
Glowstone Dust +
Iron Ingot x3 ->
Custom Screen x6
Each batch of
IO Port blocks uses cheap stone-tier cobble or blackstone alongside iron and
Redstone Dust, letting you wire multiple hardware endpoints into redstone rooms early on.
Custom Screen yields six illuminated display blocks per craft from
Glass Pane sheets,
Glowstone Dust,
Iron Ingot framing, and
Redstone Dust, making multi-block display walls affordable in survival.
Connecting Scripts and Controlling the World
Under the hood, the mod opens a multithreaded local TCP server on port 4711 speaking a line-based text protocol so several external scripts can run side by side:
- Place or query blocks across the Overworld, the Nether, and the End, update sign text dynamically, or dispatch operator-level server commands.
- Spawn entities with exact yaw and pitch angles, launch projectiles via velocity vectors, toggle entity gravity off for straight trajectories, scan nearby entities within a chosen radius, or emit custom particle bursts.
- Read and modify player health, hunger, game mode, survival flight, invulnerability, movement speeds, and inventory slots, while listening to live chat, raycasting long-distance right-click interactions, and binding custom macro keys in the Controls menu.