LaurieWired/GhidraMCP

MCP Server for Ghidra

What is GhidraMCP?

GhidraMCP is a Model Context Protocol (MCP) server that lets AI assistants (LLMs) autonomously reverse-engineer software using Ghidra, the NSA's open-source reverse-engineering toolkit. It bridges the gap between an LLM and Ghidra's powerful binary-analysis capabilities.

How it works

It has two parts:

  1. A Ghidra plugin — installed inside Ghidra, it runs a small HTTP server (default http://127.0.0.1:8080/) that exposes Ghidra's analysis functions.
  2. A Python MCP server — connects to that HTTP server and translates MCP requests (from clients like Claude Code or VS Code) into Ghidra operations.

An MCP client (e.g., Claude Code) launches the Python server, which talks to the Ghidra plugin over HTTP. The LLM can then ask Ghidra to decompile functions, list methods/classes/imports, and even rename symbols — all autonomously.

Key features

  • Decompile and analyze binaries inside Ghidra
  • Automatically rename methods and data (symbol renaming)
  • List methods, classes, imports, and exports
  • Headless mode — works without the Ghidra GUI using PyGhidra, so it can import and analyze a binary on its own
  • Client-agnostic — works with any MCP client (VS Code, Claude Code, etc.)

Tech stack

  • Ghidra 12.1.4 (reverse-engineering framework)
  • Python 3.10+ with uv/uvx for the MCP server
  • PyGhidra for headless operation
  • Java 21 + Gradle for building the Ghidra extension
  • MCP (Model Context Protocol) for LLM communication

Why it matters

Reverse engineering is traditionally a slow, manual process. GhidraMCP lets an LLM drive Ghidra directly — asking questions like "what does this function do?" and getting decompiled output, then renaming symbols and iterating. This is a practical example of an AI agent using a specialized tool (Ghidra) to perform a complex technical task autonomously.

Use cases

  • Malware analysis and vulnerability research
  • Understanding unknown binaries or firmware
  • Automating symbol renaming and code annotation in large reverse-engineering projects
  • Letting an LLM assist a human analyst by querying Ghidra's data

Limitations (from the README)

  • Requires Ghidra 12.1.4 specifically
  • Headless mode needs Python 3.10–3.13 and the Ghidra extension installed
  • On macOS, the Ghidra decompiler must be built manually before headless use
  • The MCP server and Ghidra plugin must be pointed at each other (IP/port configuration)

Related

  • Project
  • Project
  • Project
  • Project