AgentDecompile
Connect AI to Ghidra
Run an MCP server that talks to your Ghidra project. List functions, decompile code, rename symbols, and recover source you can rebuild.
AgentDecompile exposes live Ghidra state through the open Model Context Protocol (MCP), so agents work from functions, references, memory, and decompilation instead of guessing from filenames.
Quick start · Usage guide · Tool list · Docs site · Doc index
Pointing an AI agent at this repository? Start at entrypoint/README.md: client setup, the operating rules, the curated tool stack, and what a finished result is allowed to claim.
flowchart TD
A[MCP client] --> B[mcp-agentdecompile or agentdecompile-mcp]
A --> C[agentdecompile-server streamable-http]
B --> D[AgentDecompile runtime]
C --> D
D --> E[PyGhidra and Ghidra projects]
D --> F[75 canonical tools, 71 advertised, 4 GUI-only]
D --> G[Corpus pipeline]
What it does
- Analyze with agents — MCP tools read live Ghidra state (functions, xrefs, memory, decompilation) instead of guessing from file names.
- Recover rebuildable C — The reconstruct pipeline only promotes functions that compile and pass objdiff with zero differences. Everything else stays in advisory folders with honest labels.
- Run your way — Stdio for desktop MCP clients, HTTP at
/mcp for scripts and remote use, optional browser UI when you start the server locally.
Verified C requires compile plus objdiff 0; terminal recovery additionally requires a fresh whole-image byte-identical rebuild, with C+assembly-floor and max-C variants separately measured.
Source lives at github.com/bodencrouch/AgentDecompile. The published container image is still docker.io/bolabaden/agentdecompile-mcp. The Pages site is bodecloud.github.io/AgentDecompile.
Installation
Pick one start path. Use stdio if your editor or Claude Desktop will spawn the server. Use HTTP if you want a URL you can point the CLI or another client at. Use Docker if you want Ghidra and the server in one image.
1. Stdio (desktop MCP clients)
uv run mcp-agentdecompile
# or, without a local checkout:
uvx --from git+https://github.com/bodencrouch/AgentDecompile mcp-agentdecompile
Success: the MCP client stays connected and can call tools/list.
2. HTTP / uvx
uv run agentdecompile-server -t streamable-http
# or:
uvx --from git+https://github.com/bodencrouch/AgentDecompile agentdecompile-server -t streamable-http
The MCP endpoint is http://127.0.0.1:8080/mcp. / and /api are metadata only. /api/mcp is not supported.
uv run agentdecompile-cli --server-url http://127.0.0.1:8080/mcp tool --list-tools
Current recovery operations: reuse the existing listener on 8080. Inspect
GET /api/v1/actions and submit work through the advertised catalog.
Do not start a second server, Vite on 5174, a watcher or an alternate port.
AGENTS.md owns process/mission rules. Startup commands above are
installation reference, not instructions to replace an active owner.
For a browser IDE, set VITE_AGENTDECOMPILE_WEB_IDE_URL while building or
running Vite and expose the same origin to the dashboard process as either
AGENTDECOMPILE_WEB_IDE_URL or VITE_AGENTDECOMPILE_WEB_IDE_URL. Embedding
also requires VITE_AGENTDECOMPILE_WEB_IDE_EMBED=1 and a browser IDE whose
frame policy permits this dashboard origin; otherwise the workbench keeps the
external browser-IDE link as the honest fallback.
Success: the CLI prints the advertised tool list.
From source:
git clone https://github.com/bodencrouch/AgentDecompile.git
cd AgentDecompile
uv sync
export GHIDRA_INSTALL_DIR=/path/to/ghidra
3. Docker
docker run --rm \
--add-host host.docker.internal:host-gateway \
-p 8080:8080 \
docker.io/bolabaden/agentdecompile-mcp:latest
Then point a client at http://127.0.0.1:8080/mcp. For a client that spawns stdio:
docker run --rm -i \
--add-host host.docker.internal:host-gateway \
--entrypoint /ghidra/venv/bin/agentdecompile-server \
docker.io/bolabaden/agentdecompile-mcp:latest \
-t stdio
.NET/IL decompilation needs ilspycmd separately (dotnet tool install -g ilspycmd).
First-run environment