mGBA MCP Server
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
Related MCP server: PokeMCP
Installation
# Install with uv
uv pip install -e .
# Or with pip
pip install -e .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.
{
"rom_path": "/path/to/game.gb",
"frames": 120,
"savestate_path": "/path/to/save.ss0"
}mgba_read_memory
Read memory at specified addresses.
{
"rom_path": "/path/to/game.gb",
"addresses": [49664, 65471],
"frames": 60
}mgba_read_range
Read a contiguous range of memory.
{
"rom_path": "/path/to/game.gb",
"start_address": 49664,
"length": 256,
"frames": 60
}mgba_dump_oam
Dump OAM (Object Attribute Memory) sprite data.
{
"rom_path": "/path/to/game.gb",
"savestate_path": "/path/to/save.ss0",
"frames": 60
}mgba_dump_entities
Dump entity/actor data from WRAM.
{
"rom_path": "/path/to/game.gb",
"entity_base": 49664,
"entity_size": 24,
"entity_count": 10,
"frames": 60
}mgba_run_lua
Execute a custom Lua script in the emulator.
{
"rom_path": "/path/to/game.gb",
"script": "callbacks:add('frame', function() if emu:currentFrame() > 60 then emu:screenshot('screenshot.png'); emu:quit() end end)",
"timeout": 30
}Claude Code Integration
Add to your Claude Code MCP settings:
{
"mcpServers": {
"mgba": {
"command": "uv",
"args": ["run", "--directory", "/path/to/mgba-mcp", "mgba-mcp"]
}
}
}Usage Example
Once configured, Claude Code can use commands like:
Use mgba_dump_oam to check sprite palettes in rom/working/penta_dragon_dx_FIXED.gbUse mgba_read_range to dump entity data at 0xC200 for 256 bytesMemory 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
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceA Model Context Protocol server that enables LLMs to interact with a GameBoy emulator, providing tools for controlling the GameBoy, loading ROMs, and retrieving screen frames.Last updated1331MIT
- FlicenseAqualityDmaintenanceEnables AI assistants to play Pokemon Fire Red through the mGBA emulator by providing tools for button inputs and screenshots. It allows for direct reading of real-time game state from RAM, including party information, player location, and battle status.Last updated103
- AlicenseAqualityAmaintenanceMCP server for the mGBA Game Boy Advance emulator. Read and write GBA memory, inject button presses, take screenshots, save/load state, and step the emulator through a Lua bridge.Last updated18391MIT
- AlicenseAqualityBmaintenanceMCP server for BizHawk, the multi-system emulator. Drive NES, SNES, GB/GBC/GBA, Genesis, N64, PSX, Saturn and more through one Lua bridge — memory r/w across named domains, joypad input, frame-advance, screenshot, save/load state.Last updated20304MIT
Related MCP Connectors
Generate authentic pixel art - sprites, animations, and tilesets - from any MCP client
Control Unreal Engine to browse assets, import content, and manage levels and sequences. Automate…
Live browser debugging for AI assistants — DOM, console, network via MCP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/struktured-labs/mgba-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server