Turn Ghidra's headless decompiler into a searchable MCP service for AI-assisted reverse engineering. Upload a PE, ELF, or Mach-O binary, run a full static analysis, and let an MCP client navigate functions, decompiled code, strings, cross-references, call graphs, initialized memory, and a triage summary.
The server does not include an LLM and does not require an AI API key. It exposes analysis tools to whichever MCP client and model you choose.
Create local persistence directories and start the container:
mkdir -p data samples
sudo chown -R 10001:10001 data
docker run -d \
--name ghidra-mcp \
--restart unless-stopped \
-p 8080:8080 \
--memory 10g \
--memory-swap 10g \
--pids-limit 2048 \
--cap-drop ALL \
--security-opt no-new-privileges:true \
-v "$(pwd)/data:/data" \
-v "$(pwd)/samples:/data/samples:ro" \
<dockerhub-user>/ghidra-mcp-server:latest
The image runs as UID/GID 10001. Check readiness with:
curl http://localhost:8080/health
Configure a Streamable HTTP MCP client with:
{
"mcpServers": {
"ghidra": {
"type": "http",
"url": "http://localhost:8080/mcp"
}
}
}
Upload binaries with POST /upload as multipart form data in a field named
file. Uploading does not automatically start analysis; call
submit_analysis with the returned binary ID.
submit_analysis, get_job_status, cancel_job, list_binariesget_triage_reportlist_functions, get_function, search_code, list_strings,
get_xrefs, get_callgraphget_datadelete_binaryTwo prompt templates are included: reverse_engineer_binary and
find_capability.
The default configuration listens on 0.0.0.0:8080 without authentication.
Anyone who can reach the port can upload binaries, read cached analysis, and
delete cached binaries. Use it only on a trusted network, or set AUTH_TOKEN
and send Authorization: Bearer <token> with requests. Alternatively, publish
only 127.0.0.1:8080:8080 and use an SSH tunnel.
This service performs static analysis and never intentionally executes an uploaded sample. Treat uploaded binaries and all decompiler output as hostile content regardless.
| Variable | Default | Purpose |
|---|---|---|
AUTH_TOKEN | empty | Enables bearer authentication when set |
MCP_ALLOWED_ORIGINS | empty | Comma-separated browser origins; empty rejects all requests carrying Origin |
GHIDRA_HEADLESS_MAXMEM | 8G | Ghidra JVM heap |
DECOMPILE_THREADS | 12 | Parallel decompiler threads |
MAX_CONCURRENT_JOBS | 1 | Simultaneous analysis jobs |
CACHE_MAX_BYTES | 53687091200 | Analysis cache limit (50 GiB) |
SYMBOL_MAX_BYTES | 5368709120 | Public-symbol store limit (5 GiB) |
DISK_MIN_FREE_BYTES | 10737418240 | Free-space safety floor (10 GiB) |
MAX_UPLOAD_BYTES | 524288000 | Upload limit (500 MiB) |
SYMBOL_DOWNLOAD | 1 | Set to 0 to disable PDB downloads |
MEMORY_DUMP_MAX_BYTES | 536870912 | Maximum initialized-memory export per analysis |
MAX_DATA_BYTES | 4096 | Maximum bytes returned by one get_data call |
The defaults target a host with roughly 16 CPU cores and 14.5 GiB of RAM. Tune the memory and concurrency settings together for smaller systems.
All state is stored below /data, including uploads, Ghidra projects,
decompiled functions, indexes, logs, job metadata, and downloaded symbols.
Source code, Compose deployment, full configuration details, and development
instructions are in the poynt2005/ghidra-mcp-server GitHub repository.
Content type
Image
Digest
sha256:2cc1b995e…
Size
743.4 MB
Last updated
about 2 months ago
docker pull poynt2005/ghidra-mcp-server