---
title: "GhidraMCP: Reverse Engineering with Ghidra and Claude"
url: "https://mcpshelf.co/servers/ghidra"
description: "GhidraMCP links an AI assistant to Ghidra: decompile functions, follow references, rename and comment. Plugin install, the uvx config and the headless mode."
updated: "2026-10-27"
site: "MCP Shelf"
---

# GhidraMCP

> Decompile, cross-reference and rename inside Ghidra from a chat.

## At a glance

GhidraMCP pairs a Ghidra extension, which serves the open program over a small local HTTP server, with an MCP server that turns those endpoints into tools. The assistant can list functions, classes, imports and strings, decompile or disassemble a function, follow cross-references and write back better names, types and comments.

Unlike IDA Pro MCP it needs no paid licence: Ghidra is free. There is also a headless mode that imports and analyses a binary on its own through PyGhidra, with no Ghidra window open.

|  |  |
| --- | --- |
| Made by | LaurieWired |
| GitHub | https://github.com/LaurieWired/GhidraMCP |
| GitHub stars | 11.6K |
| Downloads | 62 a week |
| Last commit | 10 Oct 2026 |
| Tools | 30 |
| Runs on | Your computer |
| Install check | Started in our test |
| Category | [Developer tools](https://mcpshelf.co/categories/developer-tools) |

**Our check:** We ran this exact config on 27 Oct 2026: it started and answered with 30 tools. The shared database ran "uvx ghidramcp". That PyPI name only holds a 0.0.dev0 placeholder, so we publish the install the project documents: straight from its GitHub source.

## Tools

We listed 30 tools on 27 Oct 2026. 19 only read; the rest can change things or run commands.

| Tool | Kind | What it is for |
| --- | --- | --- |
| `get_program_info` | reads | Identifies the loaded program: format, architecture, compiler, image base, size and entry points. |
| `list_functions` | reads | Lists functions with their entry addresses, optionally filtered by name. |
| `list_methods` | reads | An older name-only function list, kept for compatibility. |
| `search_functions_by_name` | reads | Finds functions whose name contains a piece of text. |
| `list_classes` | reads | Lists class namespaces. |
| `list_namespaces` | reads | Lists every non-global namespace. |
| `list_segments` | reads | Lists memory blocks with their address ranges and permissions. |
| `list_imports` | reads | Lists imported symbols and the libraries they come from. |
| `list_exports` | reads | Lists exported symbols and entry points. |
| `list_data_items` | reads | Lists defined data with address, label, type and value. |
| `list_strings` | reads | Lists strings found in the program, optionally filtered by their text. |
| `get_function_by_address` | reads | Returns the function at an address: name, signature, range and calling convention. |
| `get_current_address` | reads | Returns the address you have selected in Ghidra's listing. |
| `get_current_function` | reads | Returns the function you have selected in Ghidra. |
| `decompile_function` | changes | Decompiles a function by name into C-like pseudocode. |
| `decompile_function_by_address` | changes | Decompiles the function at an address, which avoids clashes between duplicate names. |
| `disassemble_function` | changes | Returns a function's instructions with addresses, bytes and comments. |
| `get_xrefs_to` | reads | Lists every reference to an address and the function each comes from. |
| `get_xrefs_from` | reads | Lists the references made from one instruction or data address. |
| `get_function_xrefs` | reads | Lists the references to a function's entry point. |
| `get_function_calls` | reads | Shows one level of the call graph: who calls a function and what it calls. |
| `read_memory` | reads | Reads up to 4 KB of program memory as hex and ASCII. |
| `rename_function_by_address` | changes | Renames the function at an address. |
| `rename_function` | changes | Renames a function by its current name. |
| `rename_data` | changes | Renames the label on a piece of data. |
| `rename_variable` | changes | Renames a local variable or parameter in the decompiler view. |
| `set_function_prototype` | changes | Sets a function's signature from a C prototype. |
| `set_local_variable_type` | changes | Sets the data type of a decompiler variable. |
| `set_decompiler_comment` | changes | Adds or clears a comment shown in the decompiler. |
| `set_disassembly_comment` | changes | Adds or clears an end-of-line comment in the disassembly. |

### How clearly it describes its tools

30 of 30 tools have a description and 0 of 30 say whether they change things. The tool list takes at least ~1,400 tokens of context. No tool says whether it only reads or can change things, so your client treats them all alike: keep approvals on.

## Set it up

1. Download the latest release zip from the GhidraMCP repository.
2. In Ghidra choose File → Install Extensions, click +, pick the zip and restart Ghidra.
3. Make sure GhidraMCPPlugin is ticked under File → Configure → Developer, then open a program in the CodeBrowser.

### Claude Desktop

Where: claude_desktop_config.json (Settings → Developer → Edit Config)

```json
{
  "mcpServers": {
    "ghidra": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/LaurieWired/GhidraMCP",
        "ghidra-mcp",
        "--ghidra-server",
        "http://127.0.0.1:8080/"
      ]
    }
  }
}
```

### Claude Code

Where: Your terminal, in the project folder

```bash
claude mcp add-json ghidra '{"command":"uvx","args":["--from","git+https://github.com/LaurieWired/GhidraMCP","ghidra-mcp","--ghidra-server","http://127.0.0.1:8080/"]}'
```

### Cursor

Where: ~/.cursor/mcp.json, or .cursor/mcp.json in a project

```json
{
  "mcpServers": {
    "ghidra": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/LaurieWired/GhidraMCP",
        "ghidra-mcp",
        "--ghidra-server",
        "http://127.0.0.1:8080/"
      ]
    }
  }
}
```

### VS Code

Where: .vscode/mcp.json in your project

```json
{
  "servers": {
    "ghidra": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/LaurieWired/GhidraMCP",
        "ghidra-mcp",
        "--ghidra-server",
        "http://127.0.0.1:8080/"
      ]
    }
  }
}
```

### Windsurf

Where: ~/.codeium/windsurf/mcp_config.json

```json
{
  "mcpServers": {
    "ghidra": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/LaurieWired/GhidraMCP",
        "ghidra-mcp",
        "--ghidra-server",
        "http://127.0.0.1:8080/"
      ]
    }
  }
}
```

### ChatGPT

Where: Not supported

ChatGPT only connects to remote servers by URL. This one runs on your computer, so use Claude, Cursor or VS Code.

Change the --ghidra-server address if you moved the plugin to another port under Edit → Tool Options.

## Settings

| Setting | Kind | Required | What it does |
| --- | --- | --- | --- |
| `--ghidra-server` | flag | no | Where the GhidraMCP plugin's HTTP server is listening. Defaults to localhost port 8080. Example: `--ghidra-server http://127.0.0.1:8080/` |
| `--transport` | flag | no | Runs the MCP side as a streamable HTTP server for clients that connect by URL, together with --mcp-host and --mcp-port. Example: `--transport streamable-http --mcp-port 8081` |
| `--headless` | flag | no | Imports and analyses a binary through PyGhidra with no Ghidra window open. Needs the headless extra, Python 3.10 to 3.13 and GHIDRA_INSTALL_DIR. Example: `--headless --binary /path/to/target` |
| `--project` | flag | no | In headless mode, keeps the Ghidra project between runs so renames and comments are saved. Example: `--project /path/to/project-dir` |
| `GhidraMCP HTTP Server` | config | no | The plugin's port, set in Ghidra under Edit → Tool Options. Change --ghidra-server to match. |

## What it can touch

**It can read**

- The program open in Ghidra: functions, strings, imports, memory and decompiled code

**It can change**

- Names, types, prototypes and comments in the Ghidra project

**Safer setup:** It never runs the binary, and all its changes are annotations. Keep a copy of the Ghidra project if you want to compare the model's renames with your own.

## Before you start

- Ghidra 12.1.4 with the GhidraMCP extension installed
- uv (for uvx), or Python 3.10 or newer

## Good for

- A first pass over an unknown binary: naming the obvious functions
- Explaining what a decompiled function does
- Malware triage and CTF work with notes kept in the Ghidra project

## If it does not work

**Every tool returns a connection error**
Ghidra must be running with a program open in the CodeBrowser, and GhidraMCPPlugin must be enabled under File → Configure → Developer.

**The extension will not install**
Each release is built for one Ghidra version. Use the zip that matches your Ghidra (12.1.4 for the current release) or build it from source with Gradle and Java 21.

**Port 8080 is already taken**
Change the port in Edit → Tool Options → GhidraMCP HTTP Server and pass the same address to --ghidra-server.

**Headless mode fails on macOS**
Build Ghidra's decompiler once with support/gradle/gradlew buildNatives from the Ghidra folder.

## Similar servers

| Server | Tools | Runs on | Stars |
| --- | --- | --- | --- |
| [shadcn/ui MCP](https://mcpshelf.co/servers/shadcn-ui) | 10 | Your computer | 3.1K |
| [jCodeMunch](https://mcpshelf.co/servers/jcodemunch) | 6 | Your computer | 2.8K |
| [iOS Simulator MCP](https://mcpshelf.co/servers/ios-simulator) | 17 | Your computer | 2.2K |
| [Desktop Commander](https://mcpshelf.co/servers/desktop-commander) | 25 | Your computer | 10.1K |

## Questions

### Do I need a paid tool?

No. Ghidra is free and open source from the NSA, and GhidraMCP is Apache-2.0.

### GhidraMCP or IDA Pro MCP?

If you already own IDA Pro, IDA Pro MCP fits your workflow. If not, GhidraMCP gives you similar decompile, rename and cross-reference tools without a licence.

### Can it analyse a file without opening Ghidra?

Yes, with --headless and --binary, which imports and analyses the file through PyGhidra.

### Is it safe to point at malware?

It only analyses the file statically and never runs it. Still work in an isolated machine, as you would with any malware sample.

Full docs on GitHub: https://github.com/LaurieWired/GhidraMCP

---

From [MCP Shelf](https://mcpshelf.co/): A short shelf of MCP servers that are worth installing. Index for agents: https://mcpshelf.co/llms.txt

