FRED-80 has an MCP (Model Context Protocol) server built into the engine itself. Point Claude, Gemini, or any MCP-capable assistant at a running FRED-80 process and it can read your sprites, watch for Lua errors, press buttons in your live cart, and edit code — without you copy-pasting a single screenshot.
Normally, getting an AI assistant to help with a game means describing what's on screen, pasting error messages by hand, and never being quite sure the assistant is looking at the same state you are. FRED-80's MCP server closes that loop: the assistant can query the engine directly and act on it — the same running process you're looking at, not a description of it.
FRED-80 speaks MCP over a local TCP socket. Most AI hosts only know how to spawn a
process over stdio -- --mcp-bridge is a mode built into fred-80 itself that relays
between the two, so no separate script or Python interpreter is needed on any platform.
This needs a local/desktop AI host -- one that can spawn a process on the
same machine FRED-80 is running on, e.g. Claude Desktop, Claude Code, Codex CLI, or Gemini CLI. A browser-based
assistant (chat.openai.com, claude.ai in a tab, etc.) cannot reach 127.0.0.1 from your machine and
will never be able to connect to this, no matter how the config is set up -- that's not a bug to work around,
it's what "local only" above means.
$ export FRED80_MCP_TOKEN=some-long-random-string
$ ./fred-80
> :: Windows (cmd)
> set FRED80_MCP_TOKEN=some-long-random-string
> fred-80.exe
The MCP server listens on 127.0.0.1:8090 and only accepts connections that present this token. macOS and Linux since the start; Windows support (Winsock2) landed in 0.8.200, verified compiling and linking clean through the real mingw-w64 cross-toolchain -- not yet confirmed on actual Windows hardware, so treat it as recently-added rather than battle-tested. Amiga/Apollo hardware transport is still a separate, later, opt-in phase and remains stubbed for now. On Windows specifically: the GUI build has no console, so the auto-generated token (if you didn't set one yourself) is written to fred80.log next to the exe instead of the terminal -- check there if you launched without setting FRED80_MCP_TOKEN first. Add --headless to run with no window at all (everything, including screenshot, already reads the internal framebuffer rather than the displayed window, so nothing else changes) -- useful for pure AI-automation with no one watching.
fred-80 --mcp-bridge{
"mcpServers": {
"fred80": {
"command": "/path/to/fred-80",
"args": ["--mcp-bridge"],
"env": { "FRED80_MCP_TOKEN": "some-long-random-string" }
}
}
}
--mcp-bridge connects to an already-running fred-80 instance (the one you launched in step 1 -- it never starts a second engine of its own) and relays stdin/stdout to its MCP socket, exactly like a real MCP host expects. This is the same binary either way -- there's nothing extra to download or install, on any platform. Prefer a Python-based setup instead? tools/mcp_bridge.py in the repo still works identically, speaking the same wire protocol.
Open a cart and describe what you want. The assistant reaches for screenshot, sprite_get, or get_error_log the same way it reaches for any other tool — no special prompting required.
A real tool-call sequence — no hand-waving. The assistant closes the loop itself: draw, run, look, fix.
A different session — composing a soundtrack and shipping a finished cart, without ever opening the TOMMY tab by hand.
Everything the engine already does for a human in the editor, exposed the same way to an assistant.
engine_pingget_telemetryget_error_logget_paletteget_game_statelist_globalsdocs_searchcheck_a6000_perfsprite_get / sprite_setsprite_drawsprite_fill_rectsprite_hitbox_setsprite_exportmap_loadmap_get / map_setmap_drawmap_exportiso_set / iso_getiso_fill_heightiso_infovoxel_get / voxel_setvoxel_fill_planevoxel_fill_rowvoxel_rebuild_hullvoxel_infosfx / musicnotesnd_load / snd_playaud_pattern_getaud_pattern_set_noteaud_pattern_drawaud_pattern_set_channelaud_pattern_set_stepsaud_song_get / aud_song_setpoly_buildmesh_load / tex_loadcollider_mesh_add / _removecollider_box_add / _removecollider_clearmove_and_slideraycast3dworld_place / world_list / world_removecart_create / cart_opencart_read_sheet / cart_write_sheetcart_list_sheetscart_search_symbolcart_exportreload_cartinject_inputscreenshotEvery tool is tagged by how much it can change, so a host can reason about — or ask you to confirm — anything beyond a read.
Read-only. Screenshots, sprite/palette/error readback, fps and frame timing. Can't change anything.
Changes cart state — sprite pixels, tilemap cells, voxels, a played sound, an injected button press. Reversible by re-editing or re-running.
reload_cart restarts the cart from a fresh Lua state — all in-memory runtime state (score, position) is lost, same as pressing F5. cart_open discards whatever cart was previously open in the editor, same as the manual HOME flow.
The server only binds to 127.0.0.1 and requires a bearer token set by whoever launches FRED-80 —
it's not reachable over the network, and there's nothing to configure beyond the token. execute_lua_eval
(arbitrary Lua from the assistant) is deliberately not shipped yet — it needs real sandboxing first.
Full tool schemas and parameters
Every tool listed here has a full parameter reference, defaults, and gotchas documented alongside the rest of the Lua API.