GhidrAssistMCP
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
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.
Overview
Version **3.0.0** introduces the explicit tool catalog and application-owned runtime. Clients should refresh their tool definitions after upgrading.
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.
Key Features
- **MCP Server Integration**: Full Model Context Protocol server implementation using official SDK
- **Dual HTTP Transports**: Supports SSE and Streamable HTTP transports for maximum client compatibility
- **100 Explicit Tools**: Discoverable operation names with precise input contracts and read/write annotations (93 enabled by default)
- **6 MCP Resource Templates**: Program-specific data resources for program info, functions, strings, imports, exports, and segments
- **7 MCP Prompts**: Pre-built analysis prompts for common reverse engineering tasks
- **Result Caching**: Intelligent caching system to improve performance for repeated queries
- **Async Task Support**: Long-running operations execute asynchronously with task management
- **Multi-Program Support**: Work with multiple open programs simultaneously using program_name; use list_open_programs project paths to disambiguate duplicate filenames
- **Application Startup**: MCP is available as soon as the project manager opens, before CodeBrowser
- **Shared Views**: Every CodeBrowser shares the runtime configuration and bounded request log
- **Multi-Window Support**: Single MCP server shared across all CodeBrowser windows with intelligent focus tracking
- **Active Context Awareness**: Automatic detection of which binary window is in focus, with context hints in all tool responses
- **Configurable UI**: Easy-to-use interface for managing tools and monitoring activity
- **Real-time Logging**: Track all MCP requests and responses with detailed logging
- **Dynamic Tool Management**: Enable/disable tools individually with persistent settings
Clients
Shameless self-promotion: GhidrAssist supports GhidrAssistMCP right out of the box.
Screenshots
Installation
Prerequisites
- **Ghidra 12.0 or 12.1 Public**, running with Java 25 or newer (extension ZIPs are specific to the selected Ghidra version)
- **An MCP Client (Like GhidrAssist)**
Binary Release (Recommended)
1. **Download the latest release**:
- Go to the Releases page
- Download the latest .zip file (e.g., ghidra_12.1_PUBLIC_20261009_GhidrAssistMCP-3.0.0.zip)
2. **Install the extension**:
- In Ghidra: **File → Install Extensions → Add Extension**
- Select the downloaded ZIP file
- Restart Ghidra when prompted
3. **Start Ghidra**:
- The MCP runtime starts in the project manager automatically.
- CodeBrowsers receive a shared MCP view when opened.
- Open **Window → GhidrAssistMCP** to configure or disable the server.
Building from Source
Source builds require Java 25 or newer. The included Gradle wrapper pins the
supported Gradle release; use it instead of a system Gradle installation.
1. **Clone the repository**:
2. **Point Gradle at your Ghidra install**:
- Set GHIDRA_INSTALL_DIR (environment variable), or pass -PGHIDRA_INSTALL_DIR= when you run Gradle.
3. **Build + install**:
Ensure Ghidra isn't running and run:
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).
If you need to override that location, pass -PGHIDRA_USER_EXTENSIONS_DIR= .
4. **Restart / verify**:
- Restart Ghidra.
- If the plugin doesn't appear, enable it via **File → Configure → Configure Plugins** (search for "GhidrAssistMCP").
Configuration
Initial Setup
1. **Open the Control Panel**:
- Window → GhidrAssistMCP
2. **Configure Server Settings**: