Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mGBA MCP Serverdump sprite data from my Pokemon ROM after 60 frames"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mgba-mcp
MCP (Model Context Protocol) server for mGBA emulator - enables programmatic control of Game Boy, Game Boy Color, and Game Boy Advance emulation.
Features
Headless execution - Runs via xvfb for automated testing
Screenshot capture - Get PNG screenshots at any frame
Memory reading - Read individual addresses or memory ranges
OAM dumping - Dump all 40 sprite entries with position, tile, flags, and palette
Entity dumping - Read game entity/actor data from WRAM
Custom Lua scripts - Execute arbitrary Lua code in the emulator
Savestate support - Load savestates for reproducible testing
Installation
Requirements
Python 3.11+
mGBA (mgba-qt) installed and in PATH
xvfb-run (for headless operation on Linux)
MCP Tools
mgba_run
Run a ROM for a specified number of frames and capture a screenshot.
mgba_read_memory
Read memory at specified addresses.
mgba_read_range
Read a contiguous range of memory.
mgba_dump_oam
Dump OAM (Object Attribute Memory) sprite data.
mgba_dump_entities
Dump entity/actor data from WRAM.
mgba_run_lua
Execute a custom Lua script in the emulator.
Claude Code Integration
Add to your Claude Code MCP settings:
Usage Example
Once configured, Claude Code can use commands like:
Memory Addresses (Game Boy)
Common memory regions:
0x8000-0x9FFF- VRAM (tile data)0xC000-0xDFFF- WRAM (work RAM)0xFE00-0xFE9F- OAM (sprite attributes)0xFF00-0xFF7F- I/O registers0xFF80-0xFFFE- HRAM (high RAM)
License
MIT