mcp-mgba
An MCP server that exposes the mGBA Game Boy Advance emulator to any MCP-compatible client (Claude Desktop, Claude Code, etc.).
Lets your model read and write GBA memory, inject button presses, take screenshots, and step the emulator — all through a clean tool interface.

Claude driving an in-development homebrew side-scroller through mgba_press_buttons — Start to begin, A to confirm New Game, then Right to walk and A to jump. Each frame is captured via mgba_screenshot.
How it works
+------------------+ stdio +------------------+ TCP :8765 +------------------+
| MCP client | JSON-RPC | mcp-mgba | newline JSON | mGBA emulator |
| (Claude / etc.) | ===========> | (Node.js) | ============> | bridge.lua |
+------------------+ +------------------+ +------------------+Two pieces:
lua/bridge.lua— runs inside mGBA's scripting engine, opens a loopback TCP server on port 8765dist/index.js— Node.js MCP server, talks to the Lua bridge over TCP, exposes tools over stdio
Requirements
- mGBA 0.10 or newer (with Lua scripting)
- Node.js 22+ (for the MCP server)






