GhidraMCP
An embedded MCP server for Ghidra, exposing program data and reverse engineering functionalities.
Ghidra integration for the Model Context Protocol (MCP)
A Ghidra extension that runs an embedded MCP server to expose Ghidra program data and functionalities via tools.
✨ Features
GhidraMCP provides comprehensive MCP tools for reverse engineering workflows:
Core Analysis
- Analyze RTTI - Microsoft RTTI structure analysis with type detection and demangling
- Decompile Code - Function decompilation to C-like pseudocode with P-code analysis
- Demangle Symbols - C++ symbol demangling with multiple format support
- Execute Scripts - Run Ghidra scripts within the analysis environment
Management Operations
- Manage Data Types - Create and update structures, enums, unions, typedefs, and categories
- Manage Functions - Create, update, and manage function definitions and prototypes
- Manage Memory - Read/write bytes, manage segments, and analyze memory layout
- Manage Project - Navigate addresses, manage bookmarks, and control project settings
- Manage Symbols - Create, rename, and organize symbols with namespace support
Read Operations
- Read Data Types - Browse and query program data types with filtering and pagination
- Read Functions - Enumerate functions with detailed metadata and filtering
- Read Memory Blocks - View memory segments, permissions, and properties
- Read Symbols - Browse symbols with type and namespace filtering
Delete Operations
- Delete Bookmark - Remove bookmarks by address or category
- Delete Data Type - Remove data type definitions from the program
- Delete Function - Remove function definitions and associated data
- Delete Symbol - Remove symbols by name, ID, or address
Discovery & Search
- List Analysis Options - View available analysis options and settings
- List Programs - Discover open and closed programs in the project
- Find References - Locate code and data references
- Search Memory - Pattern search with hex, string, binary, and regex support
Utilities
- Batch Operations - Execute multiple tool operations in a single transaction with automatic rollback on failure
- Undo/Redo - Transaction-based undo/redo operations
🚀 Installation
- Download the latest release
zipfile from the Releases page. - In Ghidra, go to
File->Install Extensions.... - Click the
+button (Add extension) in the top right corner. - Navigate to the downloaded
zipfile and select it. - Ensure the
GhidraMCPextension is checked in the list and clickOK. - Restart Ghidra.
▶️ Usage
- Ensure Ghidra is running with the GhidraMCP extension active.
- Configure the MCP server settings (see 'Configuration' below).
- Ensure your MCP Client is configured to connect to the GhidraMCP server (see 'Configuring an MCP Client' below).
[!WARNING] > Script Error Dialogs: Some tools that execute Ghidra scripts may trigger GUI error dialogs via
Msg.showError. These dialogs must be manually closed, or the server will hang and become unresponsive.
[!TIP] > Missing fileName Parameter: When tools request a
fileNameparameter, use thelist_open_filestool to see available programs. Most tools provide this context automatically on failed calls.
⚙️ Configuration
The GhidraMCP server can be configured through Ghidra's application-level settings:
- In Ghidra, go to Browser → Edit → Tool Options.
- In the left panel, expand Miscellaneous and select GhidraMCP HTTP Server.
- Configure the following options:
- Server Port: The port number for the MCP server (default: 8080)
- Auto-start Server: Whether to automatically start the server when Ghidra launches
- Click OK to save your settings.
[!NOTE] > Port Configuration: If you change the default port (8080), you must update your MCP client configuration accordingly (see 'Configuring an MCP Client' below).
🛠️ Building from Source
- Clone the repository:
git clone https://github.com/themixednuts/GhidraMCP.git - Navigate to the project directory:
cd GhidraMCP - Ensure you have Apache Maven and a JDK (compatible version, e.g., JDK 21 or later recommended for modern Ghidra development) installed.
- Copy the following required JAR files from your Ghidra installation directory
into the
lib/directory of this project. Create thelib/directory if it doesn't exist:Ghidra/Features/Base/lib/Base.jarGhidra/Features/Decompiler/lib/Decompiler.jarGhidra/Framework/Docking/lib/Docking.jarGhidra/Framework/Generic/lib/Generic.jarGhidra/Framework/Project/lib/Project.jarGhidra/Framework/SoftwareModeling/lib/SoftwareModeling.jarGhidra/Framework/Utility/lib/Utility.jarGhidra/Framework/Gui/lib/Gui.jarGhidra/Features/MicrosoftCodeAnalyzer/lib/MicrosoftCodeAnalyzer.jarGhidra/Features/MicrosoftDemangler/lib/MicrosoftDemangler.jarGhidra/Features/MicrosoftDmang/lib/MicrosoftDmang.jar[!NOTE] Paths are relative to your Ghidra installation folder. Exact paths might vary slightly based on Ghidra version and OS.
- Build the project using Maven:
mvn clean package assembly:single - The installable
zipfile will be located in thetarget/directory (e.g.,target/GhidraMCP-*-SNAPSHOT-ghidra.zip). Follow the Installation steps above using this file.
🔌 Configuring an MCP Client
To allow an MCP client (like Claude Desktop or a custom client) to interact with Ghidra via this extension, you need to configure the client to connect to the server endpoint provided by GhidraMCP.
The GhidraMCP server runs within Ghidra itself when the extension is active. It exposes an HTTP endpoint for stateless MCP communication.
Agent-Specific Setup Instructions
For Claude Desktop, add the following configuration to your
claude_desktop_config.json file. Adjust the key ("ghidra" in this example)
as needed:
{
"mcpServers": {
"ghidra": {
"url": "http://127.0.0.1:8080/mcp"
}
// Add other MCP server configurations here if needed
}
}
Configuration file location:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
After updating the configuration, restart Claude Desktop to apply the changes.
For Claude Code, use the following command to add the GhidraMCP server:
claude mcp add ghidra "http://127.0.0.1:8080/mcp" --transport http
This will automatically configure the MCP server connection for Claude Code.
For Cursor, you can install via this link.
Or manually add to your MCP configuration:
{
"mcpServers": {
"ghidra": {
"url": "http://127.0.0.1:8080/mcp"
}
}
}
Configuration file location:
~/.cursor/mcp_settings.json(or your Cursor configuration directory)
For custom MCP clients or other implementations, use the standard MCP configuration format:
{
"mcpServers": {
"ghidra": {
"url": "http://127.0.0.1:8080/mcp",
"transport": "http"
}
}
}
The server supports standard MCP over HTTP protocol.
[!IMPORTANT] Port: The default port is
8080. This is configurable within Ghidra under Browser → Edit → Tool Options → Miscellaneous → GhidraMCP HTTP Server. If you change the port in Ghidra, you must update theurlin your client configuration accordingly.
[!IMPORTANT] Server Status: Ghidra must be running with the GhidraMCP extension enabled for the client to connect successfully.
[!NOTE] Timeout Issues: If you encounter timeout problems, refer to the Ghidra timeout configuration guide.
🤝 Contributing
Contributions are welcome! Please feel free to submit pull requests or open
issues. AI agents are also welcome to contribute; please ensure agents refer to
the project's contribution guidelines and development conventions (often found
in .cursor/rules/ or a CONTRIBUTING.md file if present).
Acknowledgements
This project is heavily inspired by and based on the work of LaurieWired. Instead of using a bridge, this plugin directly embeds the server in the plugin.
Related Servers
Tempo MCP Server
An MCP server for querying distributed tracing data from Grafana Tempo.
ALAPI
ALAPI MCP Tools,Call hundreds of API interfaces via MCP
MCP Crash Course
A simple demonstration of the MCP Python SDK.
CocoaPods Package README
Retrieve README files and package information from CocoaPods.
UseGrant MCP Server
Interact with the UseGrant API for programmatic access control and permissions management.
Sequa MCP
A proxy that connects local STDIO with remote MCP servers, enabling IDEs to use MCP without extra infrastructure.
Dify Workflows
An MCP server for executing Dify workflows, configured via environment variables or a config file.
idb-mcp
An MCP server that uses Facebook IDB to automate iOS simulators, providing device control, input actions, and screenshots over HTTP, SSE, or stdio.
Kestra Python MCP Server
A Python implementation of a Model Context Protocol server for interacting with Kestra.
ExMCP Test Server
An Elixir-based MCP server for testing and experimenting with the Model Context Protocol.