← all repositories
bethington/ghidra-mcp

245 tools to make AI actually useful for reverse engineering

A battle-tested MCP bridge that turns Ghidra from a manual slog into something an AI agent can drive—complete with opinionated naming enforcement and live debugging.

2.9k stars Python Coding AssistantsLLMOps · Eval
ghidra-mcp
Velocity · 7d
+13
★ / day
Trend
accelerating
star history

What it does

This is a Model Context Protocol server that wraps Ghidra’s reverse-engineering engine in 245 callable tools, letting AI agents and automation scripts decompile binaries, rename functions, trace data flow, set breakpoints, and even run P-code emulation. It works headless or inside Ghidra’s GUI, and speaks to Ghidra Server for shared projects.

The interesting bit

The author built this for daily use on real binaries, not demos, and it shows. v5.0 bakes naming conventions and type safety into the tool layer itself—auto-fixing count to dwCount on uint32 fields, rejecting no-op type changes, and scoring function documentation completeness on a 0–100 scale. The goal is eliminating the “four engineers, four naming styles” problem by making the tool the arbiter, not a style guide.

Key highlights

  • 245 MCP tools including write operations, P-code emulation, and live debugger integration via Ghidra’s TraceRmi framework
  • Batch operations claim 93% fewer API calls than one-at-a-time approaches
  • SHA-256 function hashing propagates documentation across binary versions automatically
  • Docker-ready headless mode for CI/CD pipelines
  • Cross-platform debugger bridge: dbgeng for Windows PE, gdb/lldb otherwise, with ASLR-aware address translation

Caveats

  • Requires Java 21, Maven 3.9+, and Ghidra 12.1; Jython extension must be installed manually for .py script support
  • Ghidra Server version must be 12.1, 12.0.5, or newer compatible—older shared servers need upgrading first
  • MCP tool names are normalized to lowercase/underscores for Copilot CLI compatibility, which can make nested paths like debugger_status_2 slightly opaque

Verdict

Worth a look if you’re doing serious binary analysis and want AI agents that can actually modify state rather than just read it. Skip it if your Ghidra workflow is already scripted to satisfaction or you can’t stomach the Java 21 + Maven toolchain.

Frequently asked

What is bethington/ghidra-mcp?
A battle-tested MCP bridge that turns Ghidra from a manual slog into something an AI agent can drive—complete with opinionated naming enforcement and live debugging.
Is ghidra-mcp open source?
Yes — bethington/ghidra-mcp is open source, released under the Apache-2.0 license.
What language is ghidra-mcp written in?
bethington/ghidra-mcp is primarily written in Python.
How popular is ghidra-mcp?
bethington/ghidra-mcp has 2.9k stars on GitHub and is currently accelerating.
Where can I find ghidra-mcp?
bethington/ghidra-mcp is on GitHub at https://github.com/bethington/ghidra-mcp.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.