mesen-probe
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
mesen-probe
Extension for mesen-for-ai, the MCP server that drives Mesen headlessly. mesen-probe adds what a ROM hacking or translation workflow needs and the original does not offer, without copying the original: it runs on top of it.
What it adds
Tool | Purpose |
| SNES savestates as standard Mesen |
| Read-only memory types for VRAM (64 KiB), palette (512 bytes, BGR555) and OAM (544 bytes). Addresses are byte offsets. Writes are rejected. |
| Writes a memory region (default: all of it) to a binary file and returns its SHA-256. |
| Writes the Code/Data Logger as raw bytes, one per ROM byte (flags |
|
|
| Confirms that the extension is loaded in the session. |
Windows launcher | Each session gets an isolated portable Mesen home (hardlinked |
All tools of mesen-for-ai remain available. Savestates and video memory are implemented for SNES; other consoles return an error.
Related MCP server: mcp-bizhawk
How it works
mesen-for-ai has no extension points, so patches/ holds two small patches against it: bridge.lua loads the Lua file named by MESEN_BRIDGE_EXTENSION and gives it an API table, and SessionManager starts Mesen through an overridable _spawn. The extension is src/mesen_probe/probe.lua; the Python side subclasses the original daemon and session manager. See patches/README.md.
Setup
Get MesenCE (the emulator) and mesen-for-ai.
Check out mesen-for-ai at the commit in
patches/BASEand apply the patches, leaving them uncommitted:git -C /path/to/mesen-for-ai checkout "$(cat patches/BASE)" git -C /path/to/mesen-for-ai apply --ignore-whitespace patches/*.patchInstall mesen-probe, preferably in a virtual environment (the sources in
src/are installed as the packagemesen_probe), point it at the patched mesen-for-ai, and start the server:pip install -e . export MESEN_FOR_AI_DIR=/path/to/mesen-for-ai export MESEN_BIN=/path/to/Mesen # Mesen.exe on Windows python -m mesen_probe.daemon
mesen-probe refuses to start if mesen-for-ai is missing or not patched. The server speaks MCP over stdio; an example .mcp.json entry is:
{
"mcpServers": {
"mesen": {
"command": "/path/to/venv/bin/python",
"args": ["-m", "mesen_probe.daemon"],
"env": {
"MESEN_FOR_AI_DIR": "/path/to/mesen-for-ai",
"MESEN_BIN": "/path/to/Mesen"
}
}
}
}Tests
MESEN_FOR_AI_DIR=/path/to/mesen-for-ai MESEN_BIN=/path/to/Mesen python -m unittest discover -s tests -vEmulator tests run on a synthetic SNES ROM generated in memory by tests/support.py, so no game is needed; they are skipped without MESEN_BIN. The tests that check the patches need MESEN_FOR_AI_DIR.
Limitations
Savestates are tied to one ROM build and one Mesen version.
A frame captured right after a reset can still show boot output; step past the boot first.
At maximum speed Mesen skips rendering frames based on wall-clock time (
SnesPpu.cpp,_skipRender), so a capture can show the previous frame while the emulated state has moved on. The Windows launcher disables it (Snes.DisableFrameSkippingin the sessionsettings.json); the Linux path uses mesen-for-ai's own shell runner, which does not, so captures taken there are not reproducible pixel for pixel. Memory dumps (WRAM, VRAM, CGRAM, OAM) are never affected.The patches are made against one upstream commit; a newer mesen-for-ai may need them adjusted.
License
The code of mesen-probe is released under the MIT License; see LICENSE. The two files in patches/ are the exception: they are modifications of mesen-for-ai, which is licensed under GPL-3.0-only, so they stay under that license (see patches/LICENSE). mesen-for-ai is by paulomanrique; see its repository for its license and credits.
mesen-probe imports and extends mesen-for-ai, which is GPL-3.0-only, and the MIT License is compatible with it. Whoever distributes mesen-probe together with, or combined with, mesen-for-ai distributes a combined work and has to meet the GPL for that combination.
Never commit ROMs, BIOS images, savestates or any other copyrighted game material.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Drive your retro handheld console: find your games, launch, save, set volume, get cheat codes.
Programmatic headless browser sessions: create, interact, browse, and extract - rendered in a real
Securely control computers you explicitly pair through files, terminals, processes, screenshots, desktop UI/input, clipboard, browser automation, diagnostics, and document tools.
Unofficial Browserless MCP — wraps the Browserless headless-Chromium REST API (browserless.io)
Related MCP Servers
- FlicenseAqualityDmaintenanceEnables programmatic control of the mGBA emulator for Game Boy, Game Boy Color, and Game Boy Advance games, including screenshot capture, memory reading, sprite data dumping, and custom Lua script execution for automated testing and game analysis.66-
- AlicenseAqualityCmaintenanceMCP 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.2051 npm6MIT
- AlicenseCqualityCmaintenanceEnables MAME reverse engineering tasks including memory access tracing, input injection, ROM auditing, and IO-port discovery for arcade-to-SNES porting.253GPL 2.0
- AlicenseCqualityCmaintenanceMCP server that launches Mesen/MesenCE headlessly and exposes the emulator's debugger-face Lua API over MCP JSON-RPC, enabling AI agents to load ROMs, step frames, inspect memory/registers, manage breakpoints/watches, trace execution, and export Code/Data Logger maps for SNES, NES, PC Engine, and Game Boy Advance.221GPL 3.0