SuperAPI AI Directory

mcp-retroarch

Control libretro cores via RetroArch's Network Control Interface: memory read/write, save states, screenshots, pause, frame advance and on-screen messages.

Open website

About this tool

mcp-retroarch is an MCP server that acts as a bridge between Claude (and any other MCP client) and RetroArch, communicating through RetroArch's built-in Network Control Interface (NCI, UDP port 55355).

Purpose: it lets AI models control a running libretro core, and works with any libretro core, including NES, SNES, Genesis, GB/GBC/GBA, PSX, N64, and more. Through this server, the model can perform memory reads and writes, save-state automation, screenshots, pause, frame advance, reset, and display on-screen messages.

Main capabilities: memory reads and writes, save-state automation, screenshots, pause / frame advance / reset, on-screen messages.

Usage: first you need to install and run RetroArch (any reasonably recent version) and enable network commands in it. There are two ways to enable it: in the GUI, go to Settings → Network → Network Commands → ON, and confirm that Network Cmd Port is 55355 (the default value); or via retroarch.cfg set network_cmd_enable = "true" and network_cmd_port = "55355". Once enabled, start any libretro core and game; NCI is always on once enabled, and no script needs to be loaded.

There are three options for installing mcp-retroarch: Option A — install from npm (recommended); Option B — use npx (no installation required); Option C — clone and develop. After installation, you need to register it in the MCP client, for example by editing claude_desktop_config.json and restarting Claude Desktop. More end-to-end examples can be found in docs/RECIPES.md.

Verified memory mapping characteristics: most libretro cores do not expose the system memory map to NCI; they only implement the CHEEVOS read API. Among the tested cores, only Mesen (NES) and Mupen64Plus-Next (N64) expose the system memory map, and both also provide CHEEVOS, sothis is strictly better. The system memory map is faithful to the real hardware: Mupen64Plus-Next preserves the N64's KSEG0 mirroring (0x80000000 reads as 0x0), and Mesen preserves the NES's WRAM mirroring (0x1000 reads as 0x0), which is helpful for people using it together with disassembly. CHEEVOS boundaries match the system's main RAM size: NES exposes 64 KB, SNES 128 KB, etc., and reads beyond the boundary fail with "no error message". When choosing a core for memory work, prefer a core with a system memory map if available.

Limitations and notes: calling the tools requires RetroArch to be running with network commands enabled; tools/list works even without a connection to RetroArch. If you need gamepad input for Game Boy Advance, check out mcp-mgba; for PCSX2 (memory + save states only, no input/screenshots), check out mcp-pine. The default target address is 127.0.0.1:55355, which can be overridden via RETROARCH_HOST / RETROARCH_PORT. You can use MCP Inspector for interactive browsing and invocation. If you modify src/, you need to build first (npm run build, or keep npm run dev running).