Ghidra MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Ghidra MCP Serverlist all functions in the binary at /path/to/malware.exe"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🔍 Ghidra MCP Server
This project lets you use Ghidra in headless mode to extract rich binary analysis data (functions, pseudocode, structs, enums, etc.) into a JSON file, and expose it to LLMs like Claude via Model Context Protocol (MCP).
It turns Ghidra into an interactive reverse-engineering backend.
🚀 Features
Decompiles a binary using Ghidra headless mode
Extracts:
Function pseudocode, names, parameters, variables, strings, comments
Data structures (structs), enums, and function definitions
Outputs to
ghidra_context.jsonMCP server exposes tools like:
list_functions(),get_pseudocode(name)list_structures(),get_structure(name)list_enums(),get_enum(name)list_function_definitions(),get_function_definition(name)
Related MCP server: Ghidra MCP Server
⚙️ System Requirements
macOS (tested)
Python 3.10+
Ghidra 11.3.1+
Java 21 (Temurin preferred)
MCP client (e.g. Claude Desktop)
🧪 Installation & Setup
✅ 1. Install Java 21 (REQUIRED by Ghidra 11.3.1)
brew install --cask temurin@21Then set it:
export JAVA_HOME=$(/usr/libexec/java_home -v 21)
echo 'export JAVA_HOME=$(/usr/libexec/java_home -v 21)' >> ~/.zshrc
source ~/.zshrcCheck it:
java -versionShould say: openjdk version "21.0.x"...
✅ 2. Install Ghidra
Download and extract Ghidra 11.3.1
✅ 3. Set up the project
cd ghidra_mcp
gcc -Wall crackme.c -o crackme✅ 4. Install the server via MCP CLI
mcp install main.pyThis registers the MCP server so Claude or other clients can access it.
✅ 5. Run in dev mode (for testing)
mcp dev main.pyThis enables hot reload and developer logs.
🛰️ Tools Available
Tool | Description |
| Run Ghidra on a binary |
| All functions |
| Decompiled pseudocode |
| All structs |
| Details of a struct |
| All enums |
| Enum values |
| All function prototypes |
| Return type & args |
Sample Promot
Analyze the binary file located at using Ghidra installed at . First, set up the analysis context using both paths, then list all functions in the binary. Examine the main entry point function and provide a high-level overview of what the program does.
🧠 Common Issues & Fixes
❌ Ghidra fails with “unsupported Java version”
➡️ Fix: Install Java 21, not 17 or 24:
brew install --cask temurin@21
export JAVA_HOME=$(/usr/libexec/java_home -v 21)❌ spawn uv ENOENT (Claude Desktop can't find your UV binary)
➡️ Claude can't locate uv by name. To fix:
Run in your terminal:
which uvExample output:
/Users/yourname/.cargo/bin/uvOpen your Claude Desktop config file:
open ~/Library/Application\ Support/Claude/claude_desktop_config.jsonUpdate it like so:
{
"mcpServers": {
"ghidra": {
"command": "/Users/yourname/.cargo/bin/uv",
"args": [
"--directory",
"/Users/yourname/Documents/ghidra_mcp",
"run",
"main.py"
]
}
}
}Restart Claude Desktop. You should now see your custom MCP tools.
❌ The operation couldn’t be completed. Unable to locate a Java Runtime.
➡️ Fix: Java not installed or JAVA_HOME is unset. Follow setup instructions above.
📂 Project Structure
File | Purpose |
| MCP server with tools |
| Ghidra script that extracts JSON |
| Sample C binary |
| Compiled binary to test |
👨💻 Author
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityCmaintenanceEnables LLMs to autonomously reverse engineer binaries using Ghidra's capabilities including decompilation, function analysis, automatic renaming, and BSim integration for function similarity matching.1AGPL 3.0
- Alicense-qualityCmaintenanceBridges Ghidra's reverse engineering capabilities with AI tools through 179 specialized tools for automated binary analysis and documentation. It supports full read/write access for function decompilation, renaming, and cross-binary documentation transfer in both GUI and headless modes.Apache 2.0
- Alicense-qualityBmaintenanceA headless Ghidra server that enables AI agents to perform deep reverse-engineering tasks such as disassembly, decompilation, and patching via the Model Context Protocol. It supports extensive automation of analysis workflows in sandboxed environments through a catalog of over 200 specialized tools.119GPL 2.0
- Alicense-qualityAmaintenanceEnables AI assistants to analyze binaries, debug processes, and inspect kernel state using Ghidra, x64dbg, WinDbg, and ILSpyCmd.19Apache 2.0
Related MCP Connectors
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Run, build, and validate firmware on virtual hardware from your AI agent. Hardware knowledge corpus.
CVE lookups (NVD) and dependency-manifest audits (OSV) for AI agents. No API keys.
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Bamimore-Tomi/ghidra_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server