Headless Ghidra MCP server with P-code emulation and multi-console ROM triage.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
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.
| Dependency | Version | Required | Notes |
|---|---|---|---|
| Python | >= 3.10 | Yes | Runtime for the MCP server |
| Ghidra | 11.x or 12.x | Yes | Headless or GUI install; GHIDRA_INSTALL_DIR must point here |
| Java (JDK) | >= 17 | Yes | Bundled with Ghidra; needed for JVM bridge |
| pyghidra | >= 3.0 | Yes | Python-to-Ghidra bridge; installed automatically |
| BizHawk (EmuHawk) | Latest stable | No | Only needed for live emulation tools; BIZHAWK_EXE_PATH optional |
| Docker | Latest | No | Only needed for containerized deployment |
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.
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:
GhidraNesgba-ghidra-loaderNTRGhidraghidra-switch-loaderghidra_psx_ldrGhidra-SegaMasterSystem-LoaderThe primary entry point is triage_and_load_retro_rom. Call it with any ROM path and the server handles the rest:
Instead of forcing your AI agent to spend cycles manually identifying architecture maps, register layouts, or memory segments, chain the automated ingestion pipeline:
triage_and_load_retro_rom with a target file path.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.emulate_slice or emulate_slice_with_taint tools to analyze localized console loops β no physical console hardware or open GDB networking ports needed.| Tool | Description |
|---|---|
triage_and_load_retro_rom | Reads raw file magic bytes to detect NES, SNES, GBA, NDS, Switch, PSX, Genesis, SMS, or Dreamcast ROMs. Provisions a correctly-language-mapped Ghidra session and auto-restores cached function signatures. Returns platform, loader, architecture tag, and mapped memory blocks. |
Or from source:
The server listens on stdin/stdout β pipe it to any MCP-compatible client.
The container bundles JDK 17, Ghidra 11.2, and the server β no host dependencies beyond Docker.
| Variable | Required | Default | Description |
|---|---|---|---|
GHIDRA_INSTALL_DIR | Yes | β | Path to Ghidra installation (e.g. /opt/ghidra_11.2) |
BIZHAWK_EXE_PATH | No | β | Path to EmuHawk.exe for live emulation features |
MOCK_MODE | No | 0 | Set to 1 to run without Ghidra/BizHawk (for testing/CI) |
Add to your claude_desktop_config.json:
Add to your Cursor MCP configuration:
| Tool | Description |
|---|---|
analyze_binary | Import + analyze a binary, returns a session_id. Reuses the ID if provided, otherwise auto-generates. |
list_sessions | List all active workspaces with their session IDs, binary paths, and load times. |
close_session | Close a session and free its Ghidra project resources. |
Most tools accept an optional session_id parameter β omit it to use the most recently loaded session.
| Tool | Description |
|---|---|
decompile_function | Decompile a function by name or address. |
decompile_function_paginated | Decompile with line_start, line_end, max_tokens (token-budget truncation), and summarize (strips boilerplate locals + collapsing blank lines). Prevents context-window exhaustion. |
get_data_types | List all data types defined in the program. |
get_cross_references | Cross-references to/from an address. |
get_call_graph | Recursive call graph + callers for a function. |
analyze_and_decompile_entrypoints | Composite β bulk decompile all entry points (program entry, exports, main, _start, etc.) in one call. |
generate_workspace_report | Produce a Markdown summary of the active workspace β entry points, function count, custom symbols, recovered structures, renamed functions, comments. Replaces a GUI CodeBrowser window. |
| Tool | Description |
|---|---|
rename_symbol | Rename a function or label. Stored in the Ghidra project DB. |
add_comment | Attach a comment (plate, pre, post, eol, repeatable). |
create_struct | Create a custom structured data type from a JSON member layout [{offset, name, type}, ...]. Offsets are optional. |
retype_variable | Re-type a local variable or function parameter (e.g. undefined4* β MyStruct*). |
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/ghidra-retro-mcp)<a href="https://allmcps.com/mcp/ghidra-retro-mcp"><img src="https://allmcps.com/api/badge/ghidra-retro-mcp?style=directory" alt="Ghidra Retro MCP on AllMCPs" /></a>