# Repository Briefing: symgraph/GhidrAssistMCP
> Source: https://repoforai.com/repo/symgraph/GhidrAssistMCP (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/symgraph/GhidrAssistMCP
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: Java
- **License**: MIT
- **Engineering Health**: A+ (90/100 · Maintenance 35/35 · Adoption 15/25 · Releases 20/20 · License 20/20)
- **Latest Release**: 3.1.0 (2026-11-18) — https://github.com/symgraph/GhidrAssistMCP/releases
- **Review Snapshot**: 2026-12-04
- **Deployment / Stack Signals**: MCP, Self-Hosted
- **Momentum**: 823 ★ total (+0 24h / +2 7d) · 76 forks
- **Topics**: `ghidra`, `ghidra-extension`, `ghidra-plugin`, `llm`, `mcp`, `mcp-server`, `reverse-engineering`
- **When to Use**: Best for: Teams that already use Ghidra and want an MCP client to read decompiler output, inspect references, or annotate authorized binaries in a shared analysis session. Skip if: You need a standalone disassembler, only run a fixed batch workflow, or cannot run the required Ghidra and Java versions.

## Overview
```text
### Architecture & Core Mechanics
GhidrAssistMCP is a Java extension that runs an MCP server inside Ghidra, not a standalone service that parses binaries itself. In desktop mode, the runtime starts with the project manager before any CodeBrowser opens. CodeBrowser windows share the service, configuration, and bounded request log. Requests can use the focused program or select one explicitly with `program_name`; project paths disambiguate duplicate filenames and are preferable for automation.

Java MCP SDK 2.0.1 serves Streamable HTTP at `/mcp` with protocol revision `2025-11-25`. The legacy `/sse` and `/message` endpoints use `2024-11-05`; supporting both transports does not imply support for the newer `2026-07-28` revision. The tool catalog uses explicit operation names, input contracts, and read/write annotations. Administrators can change tool availability without restarting the transport, and configuration persists across sessions.

### Key Capabilities & Differentiators
Version 3.1.0 exposes 103 tools, 96 enabled by default. Clients can read pseudocode, disassembly, p-code, control-flow graphs, and cross-references, or update comments, names, types, and structures. Six program resource templates cover metadata, functions, strings, imports, exports, and segments, while seven prompts provide analysis starting points. Desktop project lifecycle tools can open and save projects before a CodeBrowser is present; the headless launcher manages its own project instead.

`get_pseudocode_batch` reads multiple functions from one program using a shared decompiler session. It returns full pseudocode by default; `start_line` and `max_lines` request a page per function, with line ranges, completeness, and any errors reported per item. Repeated function results can be reused within the batch, but batch responses do not enter the cross-request cache. Batch decompilation, batch renames, and program analysis support native MCP progress and return final results on the original request. For batch decompilation, the client timeout still applies to the entire batch.

### Trade-offs & Limitations
Compared with direct Ghidra scripting, the MCP extension is most useful when clients need to discover operations and interact with a live, shared session. A fixed, unattended analysis pipeline can stay simpler as a direct script: there is no MCP transport to manage, no tool catalog to refresh, and no risk of selecting a program by UI focus. MCP batch reads reduce call overhead and reuse decompiler setup, but large calls still have to finish within one client timeout. Use smaller batches to reduce the scope of a timeout and line pagination to bound response size.

The default catalog is broad and includes write operations. Treat read/write annotations as descriptive metadata, not access control. Keep the listener on loopback unless you have separately established how access will be controlled, and disable tools that a client does not need. For disposable headless sessions, `agent_lab` narrows the available operations by disabling arbitrary file import, script execution, and GUI/project lifecycle tools while allowing sandbox-local export. The profile is not a substitute for OS or container isolation.

### Hardware & Deployment Guide
Use the extension ZIP built for Ghidra 12.0, 12.1, or 12.2 Public and run Ghidra on Java 25 or newer. Install via **File → Install Extensions**, restart Ghidra, and check the shared settings under **Window → GhidrAssistMCP**. The default listener is `localhost:8080`. For a source installation, point `GHIDRA_INSTALL_DIR` at Ghidra and run the bundled `./gradlew installExtension` with Ghidra stopped.

For headless use, launch through `analyzeHeadless` and the bundled `ghidra_scripts/GAMCPStartServerScript.java`. The script can start before analysis, or run as a post-script with `wait=true` to keep the session open after analysis. Release 2.11.0 added the restricted `agent_lab` profile, 3.0.0 moved startup to the project manager and added lifecycle control there, and 3.1.0 added Ghidra 12.2 compatibility, batch pseudocode, and native progress for selected operations. Refresh client tool definitions after upgrading.
```

## Key Capabilities
```text
- Runtime: One in-process MCP server starts with the Ghidra project manager and is shared by CodeBrowser windows.
- Transport: Java MCP SDK 2.0.1 serves Streamable HTTP at `/mcp` and legacy SSE at `/sse` with `/message`.
- Discovery: 3.1.0 exposes 103 named tools, 96 enabled by default, plus six resource templates and seven prompts.
- Batch reads: `get_pseudocode_batch` reuses one decompiler session and returns per-function code, pagination metadata, or errors.
- Progress: Program analysis, batch renames, and batch decompilation can report native MCP progress while keeping their final results on the original request.
- Headless controls: The `agent_lab` profile allows sandbox-local export but disables arbitrary file import, Ghidra script execution, and GUI/project lifecycle tools.
```

## Quick Start / Clone
```bash
git clone <repository-url>
   cd GhidrAssistMCP
```
