$git clone https://github.com/symgraph/GhidrAssistMCPA powerful Ghidra extension that provides an MCP (Model Context Protocol) server, enabling AI assistants and other tools to interact with Ghidra's reverse engineering capabilities through a standardized API.
| 1 | # GhidrAssistMCP |
| 2 | |
| 3 | A powerful Ghidra extension that provides an MCP (Model Context Protocol) server, enabling AI assistants and other tools to interact with Ghidra's reverse engineering capabilities through a standardized API. |
| 4 | |
| 5 | ## Overview |
| 6 | |
| 7 | GhidrAssistMCP bridges the gap between AI-powered analysis tools and Ghidra's comprehensive reverse engineering platform. By implementing the Model Context Protocol, this extension allows external AI assistants, automated analysis tools, and custom scripts to seamlessly interact with Ghidra's analysis capabilities. |
| 8 | |
| 9 | ### Key Features |
| 10 | |
| 11 | - **MCP Server Integration**: Full Model Context Protocol server implementation using official SDK |
| 12 | - **Dual HTTP Transports**: Supports SSE and Streamable HTTP transports for maximum client compatibility |
| 13 | - **49 Built-in Tools**: Comprehensive set of analysis tools with action-based consolidation for cleaner APIs |
| 14 | - **6 MCP Resources**: Static data resources for program info, functions, strings, imports, exports, and segments |
| 15 | - **7 MCP Prompts**: Pre-built analysis prompts for common reverse engineering tasks |
| 16 | - **Result Caching**: Intelligent caching system to improve performance for repeated queries |
| 17 | - **Async Task Support**: Long-running operations execute asynchronously with task management |
| 18 | - **Multi-Program Support**: Work with multiple open programs simultaneously using `program_name`; use `list_binaries` Project Path values to disambiguate duplicate filenames |
| 19 | - **Multi-Window Support**: Single MCP server shared across all CodeBrowser windows with intelligent focus tracking |
| 20 | - **Active Context Awareness**: Automatic detection of which binary window is in focus, with context hints in all tool responses |
| 21 | - **Configurable UI**: Easy-to-use interface for managing tools and monitoring activity |
| 22 | - **Real-time Logging**: Track all MCP requests and responses with detailed logging |
| 23 | - **Dynamic Tool Management**: Enable/disable tools individually with persistent settings |
| 24 | |
| 25 | ## Clients |
| 26 | |
| 27 | Shameless self-promotion: [GhidrAssist](https://github.com/jtang613/GhidrAssist) supports GhidrAssistMCP right out of the box. |
| 28 | |
| 29 | ## Screenshots |
| 30 | |
| 31 |  |
| 32 |  |
| 33 | |
| 34 | ## Installation |
| 35 | |
| 36 | ### Prerequisites |
| 37 | |
| 38 | - **Ghidra 11.4+** (tested with Ghidra 12.1 Public) |
| 39 | - **An MCP Client (Like GhidrAssist)** |
| 40 | |
| 41 | ### Binary Release (Recommended) |
| 42 | |
| 43 | 1. **Download the latest release**: |
| 44 | - Go to the [Releases page](https://github.com/jtang613/GhidrAssistMCP/releases) |
| 45 | - Download the latest `.zip` file (e.g., `GhidrAssistMCP-v1.0.0.zip`) |
| 46 | |
| 47 | 2. **Install the extension**: |
| 48 | - In Ghidra: **File → Install Extensions → Add Extension** |
| 49 | - Select the downloaded ZIP file |
| 50 | - Restart Ghidra when prompted |
| 51 | |
| 52 | 3. **Enable the plugin**: |
| 53 | - **File → Configure → Configure Plugins** |
| 54 | - Search for "GhidrAssistMCP" |
| 55 | - Check the box to enable the plugin |
| 56 | |
| 57 | ### Building from Source |
| 58 | |
| 59 | Source builds require Java 25 or newer. The included Gradle wrapper pins the |
| 60 | supported Gradle release; use it instead of a system Gradle installation. |
| 61 | |
| 62 | 1. **Clone the repository**: |
| 63 | |
| 64 | ```bash |
| 65 | git clone <repository-url> |
| 66 | cd GhidrAssistMCP |
| 67 | ``` |
| 68 | |
| 69 | 2. **Point Gradle at your Ghidra install**: |
| 70 | - Set `GHIDRA_INSTALL_DIR` (environment variable), or pass `-PGHIDRA_INSTALL_DIR=<path>` when you run Gradle. |
| 71 | |
| 72 | 3. **Build + install**: |
| 73 | |
| 74 | Ensure Ghidra isn't running and run: |
| 75 | |
| 76 | ```bash |
| 77 | ./gradlew installExtension |
| 78 | ``` |
| 79 | |
| 80 | This copies the built ZIP into your Ghidra install (`[GHIDRA_INSTALL_DIR]/Extensions/Ghidra`) and extracts it into your Ghidra **user** Extensions folder (replacing any existing extracted copy). |
| 81 | |
| 82 | If you need to override that location, pass `-PGHIDRA_USER_EXTENSIONS_DIR=<path>`. |
| 83 | |
| 84 | 4. **Restart / verify**: |
| 85 | - Restart Ghidra. |
| 86 | - If the plugin doesn't appear, enable it via **File → Configure → Configure Plugins** (search for "GhidrAssistMCP"). |
| 87 | |
| 88 | ## Configuration |
| 89 | |
| 90 | ### Initial Setu |