
Ghidra BizHawk MCP
io.github.getaniraoPublished by GitHub account getaniraov1.1.0Updated Oct 30, 2026
Unified Ghidra + BizHawk MCP server for static analysis, P-code emulation, and retro ROM triage.
Overview
Local MCP server that drives Ghidra headless reverse engineering and BizHawk emulation, letting an assistant triage retro ROMs, decompile code and emulate…
- What you can do
- Triage and load ROMs: detect NES, SNES, GBA, NDS, Switch, PSX, Genesis, SMS or Dreamcast files and open a mapped Ghidra session
- Manage analysis sessions: import and analyze binaries, list and close workspaces, generate a Markdown workspace report
- Read and analyze code: decompile functions (paginated), list data types, cross-references, call graphs, bulk-decompile entry points
- Inspect assembly and bytes: disassemble ranges, dump listing hex/ASCII, search byte patterns, diff two loaded binaries
- Modify the program database: rename symbols, add comments, create structs, retype variables
- Emulate and fingerprint: run P-code slices with taint tracking or register breakpoints, compute function…
- When to use it
- Useful for reverse engineering and retro game or firmware analysis: identifying a ROM's platform, decompiling routines, tracing register values through emulated code, and carrying function names across binary versions. Also fits multi-binary comparison work where several Ghidra sessions stay open at once.
- Requirements
- Runs locally as a Python package (Python 3.10 or newer) over stdio. Requires a Ghidra 11.x or 12.x installation with JDK 17, set via the required GHIDRA_INSTALL_DIR variable; pyghidra is installed automatically. Live emulation needs BizHawk's EmuHawk, optionally set via BIZHAWK_EXE_PATH. MOCK_MODE=1 runs without Ghidra or BizHawk for testing. A Docker image is also provided.
Installation
In SourceWeft
- Open Ghidra BizHawk MCP in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
Ghidra BizHawk MCP
A unified MCP (Model Context Protocol) server bridging Ghidra's headless static analysis with BizHawk's live emulation — switch between decompiling a ROM and running it on real hardware in the same session.
GBA ROMs: If analyzing Game Boy Advance ROMs, install pudii/gba-ghidra-loader in your Ghidra installation for proper ROM header parsing, mirrored memory regions, and I/O register maps. The loader repository has pre-built
.gpafiles for Ghidra 11.x.
Prerequisites
Architecture
Security Model
The MCP server communicates with the MCP client exclusively over stdin/stdout — no HTTP or network listener. The only local TCP socket is a loopback-only connection (127.0.0.1:8766) between the server and BizHawk's built-in Lua socket server. This is used solely for live-emulation features and is not exposed to the network.
Hardware & Retro Ecosystem Integration
ghidra-bizhawk-mcp includes native out-of-the-box support for retro-reversing automation pipelines via Ghidra's static analysis, plus live emulation via BizHawk's multi-system emulator. The server bundles:
- Nintendo Entertainment System (NES) via
GhidraNes - Super Nintendo Entertainment System (SNES) via native 65816 memory maps
- Game Boy Advance (GBA) via
gba-ghidra-loader - Nintendo DS (NDS) via
NTRGhidra - Nintendo Switch via
ghidra-switch-loader - PlayStation 1 (PSX) via
ghidra_psx_ldr - Sega Genesis / Mega Drive via native 68000 memory maps
- Sega Master System / Game Gear via
Ghidra-SegaMasterSystem-Loader - Sega Dreamcast via native SuperH4 memory maps
Zero-Input Triage — Worked Example (GBA)
The primary entry point is triage_and_load_retro_rom. Call it with any ROM path and the server handles the rest:
Execution Chaining Flow
Instead of forcing your AI agent to spend cycles manually identifying architecture maps, register layouts, or memory segments, chain the automated ingestion pipeline:
- Invoke
triage_and_load_retro_romwith a target file path. - The server headlessly parses the binary file structure (
NES\x1a,NTR,NSO0,GBA, SNES title vectors,PS-X EXE,SEGA,TMR SEGA,SEGA ENTERPRISES), binds the matching Ghidra language module (6502:LE:16,ARM:LE:32:v4t,AARCH64:LE:64,65816:LE:24,MIPS:LE:32,68000:BE:32,Z80:16,SuperH4:LE:32), loads standard address memory blocks, and links automated signature cache arrays. - Use the integrated
emulate_sliceoremulate_slice_with_tainttools to analyze localized console loops — no physical console hardware or open GDB networking ports needed.
Triage Tool
Quick Start
1. Install
Or from source:
2. Set environment
3. Run
The server listens on stdin/stdout — pipe it to any MCP-compatible client.
Docker
The container bundles JDK 17, Ghidra 11.2, and the server — no host dependencies beyond Docker.
Configuration
Environment Variables
Claude Desktop
Add to your claude_desktop_config.json:
Cursor
Add to your Cursor MCP configuration:
Tools
Session management
Most tools accept an optional session_id parameter — omit it to use the most recently loaded session.
Read / Analysis
Write / Mutation
Assembly-level
Byte-sequence search
Binary diffing
Workspace Sessions
Each analyze_binary call creates a named session. Sessions keep their Ghidra project open independently, so multiple binaries can be loaded concurrently:
Deployment
Docker (multi-user / CI)
The Dockerfile bundles Ghidra 11.2 and JDK 17 in a slim Python 3.11 image. Bind-mount your binaries directory at runtime.
MCP Bundle (MCPB — Claude Desktop / Smithery)
Package as a portable .mcpb bundle for one-click install in Claude Desktop or publishing on Smithery.
Prerequisites: Install the MCPB CLI:
Build the bundle:
Or manually with mcpb:
The output ghidra-bizhawk-mcp.mcpb wraps the server with a manifest.json that prompts for GHIDRA_INSTALL_DIR (required) and optionally BIZHAWK_EXE_PATH at install time — no manual JSON editing.
Publishing to Smithery:
Smithery's publish API requires MCP-style tool schemas (inputSchema) and
object-form prompt arguments, which the MCPB schema forbids in manifest.json.
The build script therefore emits a second bundle whose manifest is patched from
mcpb/tool-schemas.json:
P-code micro-emulation
All run inside the pyhidra process via Ghidra's EmulatorHelper — no GDB/LLDB, no network ports, no debugger stubs. Works on ARM, x86, MIPS, and any Ghidra-supported architecture.
Worked example — breaking on a register condition
Suppose you're reversing a GBA ROM and want to find the first time r0 becomes zero inside a loop at 0x08000100:
This is especially powerful for identifying copy-loop bounds (R3 >= R4), null-pointer paths (R0==0), or switch-table targets (PC==0x).
Function fingerprinting / signature transfer
Persistent signature stash (server-side cache)
Workflow — fully automated persistence:
Try these prompts
After configuring your MCP client (see Configuration), ask your AI agent:
- "Load this GBA ROM and decompile the entry point."
- "What functions call 0x8001234 in this NDS binary?"
- "Triage this PSX EXE and trace r0 through the first 20 instructions."
- "Diff the two sessions I have open and show me changed functions."
Project Structure
How it works
pyhidra.start()boots Ghidra's JVM once at server startup- Each
analyze_binarycall opens a new Ghidra project in its own named session - Read/write tools route to the requested session via
session_id(or the active default) - Write tools apply changes directly to the Ghidra program database
- Sessions persist until explicitly closed — enabling multi-binary workflows and diffing
Source: README.md at commit 8892856
Tools
0Version history
1- v1.1.0LatestOct 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts