Mesen Expanded can expose debugger functionality through a Model Context Protocol (MCP) bridge for external tools and AI-assisted debugging workflows.
The emulator-side debugger integration is designed for local use. External clients connect through an MCP bridge rather than directly modifying emulator internals.
Current implementation details visible in the codebase:
- Default HTTP endpoint:
http://127.0.0.1:51234/mcp/ - Local-only binding by default
- Named-pipe bridge support for local tooling
There are two common ways to connect:
Use the MCPServer.exe bridge with tools that expect stdio transport.
Example:
codex mcp add mesen-debugger -- "path\\to\\MCPServer.exe" --stdioStart the MCP bridge and connect a client to:
http://127.0.0.1:51234/mcp/
Example:
claude mcp add --transport http mesen-debugger http://127.0.0.1:51234/mcp/- Mesen Expanded must be running
- The debugger must be available in the current build
- The MCP bridge executable must be present when using bridge-based workflows
Excluding Genesis, the MCP server currently has explicit structured debugger support for:
SNESNESGame Boy
These platforms currently have dedicated get_cpu_state and get_ppu_state handling in the MCP server implementation.
Other systems may still work with generic debugger-oriented tools, but they do not currently have the same explicit MCP-side structured state handlers.
These are debugger-oriented tools exposed by the MCP server and are not Genesis-specific:
debugger_statusget_memory_rangeset_memoryget_disassemblyget_trace_tailget_debug_eventsset_breakpointsstepresumepauseget_rom_info
For the currently supported non-Genesis platforms listed above, the MCP server also includes:
get_cpu_stateget_ppu_state
Genesis-specific tools are available in the implementation, but they are intentionally omitted from the non-Genesis support list above:
get_vdp_registersget_cramget_vsramget_vram_rangeget_genesis_backend_statecapture_genesis_snapshot
- The MCP endpoint is intended for localhost use only.
- Do not expose it to untrusted networks.
- Treat connected LLM clients as capable of reading emulator state and issuing debugger actions.
See DISCLAIMER.md for liability, data exposure, and third-party service notes.
If the MCP client cannot connect:
- Confirm the emulator is running.
- Confirm the MCP bridge is started when your workflow requires it.
- Confirm the client is pointed at
127.0.0.1:51234. - Confirm the build you are using includes MCP support.