Cross-platform MCP server for inspecting and controlling NES iNES ROMs. Exposes CPU stepping, breakpoints, memory, controller input, frame execution and inline screen captures over the Model Context Protocol.
Install
No framework information available.
README
Nes.Mcp
Nes.Mcp is a cross-platform .NET MCP server for inspecting and controlling NES ROMs in iNES format.
The first backend is a pure managed, vendored copy of the MIT-licensed ADNES emulator core, wrapped with a synchronous debug session. The MCP server exposes CPU stepping, frame execution, deterministic controller input timelines, breakpoints/watchpoints, CPU memory reads/writes, PPU/OAM inspection, symbols, lightweight disassembly, savestates, write tracing, screen-region probes, and PNG screen capture.
Build
Requirements:
- .NET 10 SDK
From the repo root:
dotnet build nes-debug-mcp.slnx
Run
From the repo root:
dotnet run --project src/Nes.Debug.Mcp/Nes.Debug.Mcp.csproj
Connect An MCP Client
Use stdio transport. For development against this local checkout:
{
"mcpServers": {
"nes_debug": {
"command": "dotnet",
"args": [
"run",
"--no-restore",
"--project",
"/home/jmn/Repos/NesMcp/src/Nes.Debug.Mcp/Nes.Debug.Mcp.csproj"
],
"startup_timeout_sec": 60,
"tool_timeout_sec": 60
}
}
}
Once the tool is packed and published, the path-independent form should be:
{
"mcpServers": {
"nes_debug": {
"command": "dnx",
"args": ["Nes.Mcp", "--yes"]
}
}
}
Tools
Implemented tools:
load_romsave_stateload_stateresetstep_instructionstep_overstep_outrun_frameset_controllerset_joypadpress_buttonsrun_input_timelinecontinue_until_breakrun_until_conditionset_breakpointclear_breakpointlist_breakpointsset_watchpointset_watchpoint_rangeclear_watchpointlist_watchpointsget_stateread_registersread_memorywrite_memorydisassembleload_symbolsresolve_symbolread_symboldump_oamread_ppu_statecapture_screenfind_last_writerfind_last_writerstrace_until_writetrace_until_write_rangeread_screen_regiondump_tilemapdump_tileset
See docs/mcp-tools.md for schemas and examples.
Current Limitations
- The initial backend supports the mappers implemented by ADNES: NROM, MMC1, UxROM, and CNROM.
- Debug stepping, conditional breakpoints, and watchpoints are implemented in the managed session loop.
- Disassembly is intentionally small and currently covers the opcodes most useful for first smoke/debug work; unknown opcodes are returned as
.db. - Symbol parsing is intentionally simple:
BANK:ADDR NameandADDR Namelines with;or#comments. - Savestates capture CPU registers, CPU RAM, PPU state, OAM, pattern tables, nametables/palette memory, and framebuffer. Mapper-specific bank-register state is not yet a stable cross-mapper format, so savestates are best treated as frame-boundary debug snapshots.
Validate
dotnet test nes-debug-mcp.slnx -m:1
git diff --check
Third-Party Code
The emulator core under src/Nes.Debug.Emulator/Adnes/ is vendored from ADNES by Eric Nusbaum and is MIT licensed. See src/Nes.Debug.Emulator/ADNES-LICENSE.txt.
Changes from Previous Version
Adoption Assessment
Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.