BizHawk Emulator MCP
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., "@BizHawk Emulator MCPTake a screenshot of the current frame"
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.
BizHawk Emulator MCP
Deterministic BizHawk control over MCP for Game Boy, Mega Drive/Genesis, NES, and SNES.
What is this?
This project exposes BizHawk as an MCP server. It sends input, frame-step, screenshot, reset, savestate, and memory-read commands through a portable Lua bridge that exchanges atomic files with Python. JSON scenarios make emulator checks repeatable without requiring a BizHawk plugin or a socket service.
The package does not include BizHawk or ROMs. Use legally obtained ROMs and install BizHawk separately.
Related MCP server: mcp-retroarch
Quick start
The supported deployment is a normal Python installation plus one project home shared by the MCP client and BizHawk.
git clone https://github.com/KanonZombie/emulator-mcp.git
Set-Location emulator-mcp
python -m venv .venv
& .\.venv\Scripts\python.exe -m pip install .
& .\.venv\Scripts\emulator-mcp.exe init .emulator-mcp
& .\.venv\Scripts\emulator-mcp.exe --versioninit creates the portable bridge and empty runtime directories:
.emulator-mcp/
bizhawk/bridge.lua
runtime/gb/
runtime/md/
runtime/nes/
runtime/snes/The command is safe to run again after upgrading the package; it refreshes the bridge and keeps existing runtime files.
Start BizHawk
Open a legally obtained ROM in BizHawk.
Open
Tools > Lua Console.Load
.emulator-mcp/bizhawk/bridge.lua.Leave the Lua script running. BizHawk stays paused between commands.
The bridge detects the loaded core and selects its runtime automatically:
BizHawk core | MCP target | Buttons |
Game Boy / Game Boy Color |
| A, B, Start, Select, D-pad |
Genesis / Mega Drive |
| A, B, C, X, Y, Z, Mode, Start, D-pad |
NES |
| A, B, Start, Select, D-pad |
SNES |
| A, B, X, Y, L, R, Start, Select, D-pad |
Run one BizHawk instance per active target. Each instance must load the bridge
from the same .emulator-mcp directory configured for the MCP client.
Run directly from a checkout
For local development, you can use the repository as the project home without
running init. In PowerShell, set the environment variable before launching
BizHawk. Replace these example paths with the locations on your machine:
$env:EMULATOR_MCP_HOME = "C:\path\to\emulator-mcp"
& "C:\path\to\BizHawk\EmuHawk.exe" `
"--lua=C:\path\to\emulator-mcp\bizhawk\bridge.lua" `
"C:\path\to\roms\game.gb"This starts BizHawk with the Game Boy ROM and the repository bridge. Runtime
files are written under runtime/gb/, which is ignored by Git. The variable
only applies to the current PowerShell session; configure the same
EMULATOR_MCP_HOME in the MCP client if it is launched separately.
Configure an MCP client
Use absolute paths. Replace both placeholders in this example with the paths on the machine that runs the client:
{
"mcpServers": {
"bizhawk": {
"command": "C:\\path\\to\\emulator-mcp\\.venv\\Scripts\\emulator-mcp.exe",
"env": {
"EMULATOR_MCP_HOME": "C:\\path\\to\\emulator-mcp\\.emulator-mcp"
}
}
}
}EMULATOR_MCP_HOME is the authoritative project home. The Python server and
the Lua bridge must point to the same directory. If the command is installed
with pipx, use emulator-mcp as the command and keep the same environment
variable.
Verify the connection
These commands use the same implementation as the MCP tools and require the bridge to be running in BizHawk:
& .\.venv\Scripts\emulator-mcp.exe --target gb --test bridge-info
& .\.venv\Scripts\emulator-mcp.exe --target gb --test status
& .\.venv\Scripts\emulator-mcp.exe --target nes --test buttons
& .\.venv\Scripts\emulator-mcp.exe --target snes --test tap START 8 2
& .\.venv\Scripts\emulator-mcp.exe --target snes --test screenshot titlebridge-info should report bridge version 1.1.0. A timeout normally means
that the Lua script is not running or EMULATOR_MCP_HOME points to a different
directory.
CLI command reference
With no arguments, the installed executable starts the stdio MCP server. With
--test, it runs one diagnostic command and prints its result.
Process commands
Command | Arguments | Description |
| none | Start the MCP server over stdio. |
| none | Show short help; |
| none | Print the package version. |
|
| Copy |
| see below | Run a diagnostic against |
init is idempotent: it refreshes the copied bridge without removing runtime
files. Use this prefix for the diagnostic commands:
& .\.venv\Scripts\emulator-mcp.exe --target gb --test COMMAND [ARGUMENTS]Emulator test commands
Command | Arguments and defaults | Description |
| none | Return system, frame, and screen size. |
| none | Return bridge version, detected system, and capabilities. |
| none | Return BizHawk button names and current states. |
|
| Read a memory range and return its bytes as uppercase hexadecimal. Addresses accept decimal or |
|
| Advance neutral input; frames are clamped to 1--600. |
|
| Tap a button; hold is clamped to 1--120 and release to 1--600. |
|
| Hold a button; frames are clamped to 1--120. |
|
| Release all buttons; frames are clamped to 1--600. |
|
| Reboot and settle with neutral input; frames are clamped to 1--600. |
|
| Legacy alias for |
|
| Save a state under the selected target runtime. |
|
| Load a state from the selected target runtime. |
|
| Alias for |
|
| Alias for |
|
| Save a screenshot under the selected target runtime. |
|
| Capture Game Boy DMG GPU data; target must be |
|
| Run a JSON scenario against the selected target. |
|
| Run the GB and Mega Drive entries in a pair scenario. |
|
| Rebuild a pair contact sheet from an existing summary. |
|
| Rebuild crops, diffs, and the pair contact sheet. |
gb-gpu-snapshot --no-render skips diagnostic PNG panels. Pair commands use
the pair file's GB/MD entries; the target option is not needed.
& .\.venv\Scripts\emulator-mcp.exe --target md --test status
& .\.venv\Scripts\emulator-mcp.exe --target gb --test tap A 8 2
& .\.venv\Scripts\emulator-mcp.exe --target md --test read-memory 0xFFE75E 2 "M68K BUS"
& .\.venv\Scripts\emulator-mcp.exe --target gb --test read-memory 0xC000 16 "System Bus"
& .\.venv\Scripts\emulator-mcp.exe --target gb --test save-state title_screen
& .\.venv\Scripts\emulator-mcp.exe --test run-pair-scenario scenarios/pairs/title_start.jsonMemory read examples
read-memory uses the exact BizHawk memory-domain name. These examples read
the main RAM and video memory for each supported console:
Mega Drive / Genesis
# Main 68K RAM: bus address FF0000--FFFFFF
& .\.venv\Scripts\emulator-mcp.exe --target md --test read-memory 0xFFE75E 16 "M68K BUS"
# VDP video RAM: domain-relative address 0000--FFFF
& .\.venv\Scripts\emulator-mcp.exe --target md --test read-memory 0x0000 16 "VRAM"Game Boy / Game Boy Color
# Work RAM (WRAM): CPU address C000--DFFF
& .\.venv\Scripts\emulator-mcp.exe --target gb --test read-memory 0xC000 16 "System Bus"
# Video RAM (VRAM): CPU address 8000--9FFF
& .\.venv\Scripts\emulator-mcp.exe --target gb --test read-memory 0x8000 16 "System Bus"For Mega Drive, 0xE75E in a RAM Watch RAM domain corresponds to 0xFFE75E
in M68K BUS. Sign-extended values such as 0xFFFFE75E are normalized to the
same bus address. Memory reads return uppercase hexadecimal bytes and do not
advance the emulator frame.
MCP tools
Generic tools accept target="gb", "md", "nes", or "snes":
Tool | Parameters | Description |
|
| Return system, frame, and screen size. |
|
| Return bridge version and capabilities. |
|
| Return BizHawk button names and states. |
|
| Read a memory range and return uppercase hexadecimal bytes. Maximum length is 64 KiB. |
|
| Advance neutral input; frames 1--600. |
|
| Tap one button; hold 1--120 and release 1--600. |
|
| Hold one button; frames 1--120. |
|
| Release all buttons; frames 1--600. |
|
| Reboot and settle; frames 1--600. |
|
| Save a screenshot and return its path. |
|
| Save a named state. |
|
| Load a named state. |
|
| Alias for saving a named state. |
|
| Alias for loading a named state. |
|
| Run a JSON scenario against a target. |
Additional tools cover Game Boy GPU snapshots and GB/Mega Drive pair scenarios:
Tool | Parameters | Description |
|
| Capture DMG GPU data and optionally render PNG panels. Only target |
|
| Legacy short alias for the Game Boy snapshot tool. |
|
| Run the GB and Mega Drive scenarios in a pair definition. |
|
| Rebuild a pair contact sheet. |
|
| Rebuild crops, visual diffs, and the contact sheet. |
The original Game Boy-only MCP names remain available as legacy aliases:
Tool | Parameters | Description |
| none | Alias for |
| none | Alias for |
|
| Alias for |
|
| Alias for |
|
| Hold a Game Boy button; frames 1--120. |
|
| Alias for |
|
| Alias for |
|
| Legacy tap alias with two release frames. |
|
| Alias for |
|
| Save a named Game Boy state. |
|
| Load a named Game Boy state. |
|
| Save a named Game Boy baseline. |
|
| Load a named Game Boy baseline. |
|
| Legacy Game Boy memory-read alias. |
|
| Run a list of scenario operations against Game Boy. |
|
| Run a JSON scenario against Game Boy. |
Scenario operations
The steps array accepts one operation object per sequence:
Operation | Fields | Description |
|
| Tap a button. |
|
| Legacy tap spelling. |
|
| Hold a button. |
|
| Release all buttons for that many frames. |
|
| Advance neutral frames. |
|
| Capture a named screenshot in the run directory. |
|
| Capture a named Game Boy GPU snapshot. |
| string or | Capture a GPU snapshot with options. |
Scenarios can use start.mode values none, reset, or load_state, plus
the legacy top-level load_state and optional save_state_after fields.
Input semantics
tapholds one button and adds neutral frames before/after it.holdholds one button without an automatic final release.releasereleases every known button for the requested number of frames.stepadvances with neutral input.resetreboots the core and advances neutral settling frames.
Frame counts are bounded by both the server and the bridge. Button names are
case-insensitive. Memory reads return an uppercase hex field and do not
advance the emulator frame. For Mega Drive, use the exact M68K BUS domain;
the sign-extended address 0xFFFFE75E is normalized to bus address
0xFFE75E, corresponding to offset 0xE75E in the main RAM domain.
Scenarios
Scenarios are plain JSON. Paths are resolved relative to the scenario file for pair scenarios and relative to the current directory for direct CLI use.
{
"id": "nes.title_start",
"description": "Boot and press Start",
"start": { "mode": "reset", "settle_frames": 60 },
"steps": [
{ "step": 300 },
{ "screenshot": "title" },
{ "tap": "START", "hold_frames": 8, "release_frames": 2 },
{ "step": 60 },
{ "screenshot": "after_start" }
],
"save_state_after": "after_start"
}Run a scenario with:
& .\.venv\Scripts\emulator-mcp.exe --target nes --test run-scenario scenarios/nes/title_start.jsonSupported starts are none, reset, and load_state. Run artifacts are
written below .emulator-mcp/runtime/<target>/runs/ and are intentionally
ignored by Git.
Configuration
Variable | Purpose |
| Absolute project home shared by Python and BizHawk. |
| Optional Game Boy runtime directory override. |
| Optional Mega Drive runtime directory override. |
| Optional NES runtime directory override. |
| Optional SNES runtime directory override. |
| Legacy Game Boy runtime override. |
Prefer EMULATOR_MCP_HOME; the target-specific variables exist for
compatibility and isolated runtime layouts. Empty overrides are ignored.
Project structure
.github/
workflows/
bizhawk/
docs/
ai/
scenarios/
gb/
md/
nes/
pairs/
snes/
server/
tests/
AGENTS.md
LICENSE
README.md
pyproject.toml
requirements.txtGenerated directories are deliberately absent from the tree: .venv/,
build/, dist/, runtime/, and .emulator-mcp/ stay local.
Development and release checks
python -m venv .venv
& .\.venv\Scripts\python.exe -m pip install .
& .\.venv\Scripts\python.exe -m unittest discover -s server/tests -v
& .\.venv\Scripts\python.exe -m pip wheel . --no-deps -w distThe unit tests do not require an emulator. For a BizHawk release smoke test, provide the executable and local ROMs explicitly:
& .\.venv\Scripts\python.exe server/tests/bizhawk_smoke.py `
--bizhawk "C:\\path\\to\\BizHawk\\EmuHawk.exe" `
--rom gb="C:\\path\\to\\roms\\game.gb" gbNever commit ROMs, savestates, screenshots, logs, command/response files, virtual environments, or generated build output. Check the result before sharing changes:
git status --short --ignoredTroubleshooting
Timeout: reload and run
.emulator-mcp/bizhawk/bridge.lua, then verify that the MCP client'sEMULATOR_MCP_HOMEis the same absolute directory.Old or unknown command: reinstall the package in the MCP client's Python environment, run
emulator-mcp init .emulator-mcpagain, and reload the Lua script in BizHawk. A running MCP client may also need to be restarted.Unsupported system: open a GB/GBC, Genesis, NES, or SNES ROM before loading the bridge.
Wrong buttons: call
emulator_buttons; BizHawk exposes the core's exact names.Missing state: states are target-specific and live under that target's runtime directory.
Documentation
Resource | Description |
Repository layout, commands, style, and contribution rules. | |
Package metadata, dependencies, and CLI entry point. | |
Portable BizHawk file bridge. | |
MCP tools, CLI, scenarios, and runtime protocol. | |
Unit tests and optional BizHawk smoke runner. | |
Target-specific and paired JSON flows. |
Contributing
Keep changes focused, add one regression test for non-trivial behavior, run the unit tests and wheel build, and keep emulator artifacts outside version control. Pull requests should include the exact commands run and any relevant BizHawk smoke-test output.
License
MIT. See LICENSE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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/KanonZombie/emulator-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server