Skip to content
Back to search

GhidraMCP

MCP Server for Ghidra

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/lauriewired--ghidramcp/badge.svg)](/listings/lauriewired--ghidramcp)

HTML

<a href="/listings/lauriewired--ghidramcp"><img src="/api/listings/lauriewired--ghidramcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Prerequisites

- Install [Ghidra](https://ghidra-sre.org) - Python3 - MCP [SDK](https://github.com/modelcontextprotocol/python-sdk)

Ghidra

First, download the latest [release](https://github.com/LaurieWired/GhidraMCP/releases) from this repository. This contains the Ghidra plugin and Python MCP client. Then, you can directly import the plugin into Ghidra.

1. Run Ghidra 2. Select `File` -> `Install Extensions` 3. Click the `+` button 4. Select the `GhidraMCP-1-2.zip` (or your chosen version) from the downloaded release 5. Restart Ghidra 6. Make sure the GhidraMCPPlugin is enabled in `File` -> `Configure` -> `Developer` 7. *Optional*: Configure the port in Ghidra with `Edit` -> `Tool Options` -> `GhidraMCP HTTP Server`

Video Installation Guide:

https://github.com/user-attachments/assets/75f0c176-6da1-48dc-ad96-c182eb4648c3

MCP Clients

Theoretically, any MCP client should work with ghidraMCP. Three examples are given below.

Example 1: Claude Desktop

To set up Claude Desktop as a Ghidra MCP client, go to `Claude` -> `Settings` -> `Developer` -> `Edit Config` -> `claude_desktop_config.json` and add the following:

{
  "mcpServers": {
    "ghidra": {
      "command": "python",
      "args": [
        "/ABSOLUTE_PATH_TO/bridge_mcp_ghidra.py",
        "--ghidra-server",
        "http://127.0.0.1:8080/"
      ]
    }
  }
}

Alternatively, edit this file directly:

/Users/YOUR_USER/Library/Application Support/Claude/claude_desktop_config.json

The server IP and port are configurable and should be set to point to the target Ghidra instance. If not set, both will default to localhost:8080.

Example 2: Cline

To use GhidraMCP with [Cline](https://cline.bot), this requires manually running the MCP server as well. First run the following command:

python bridge_mcp_ghidra.py --transport sse --mcp-host 127.0.0.1 --mcp-port 8081 --ghidra-server http://127.0.0.1:8080/

The only *required* argument is the transport. If all other arguments are unspecified, they will default to the above. Once the MCP server is running, open up Cline and select `MCP Servers` at the top.

Then select `Remote Servers` and add the following, ensuring that the url matches the MCP host and port:

1. Server Name: GhidraMCP 2. Server URL: `http://127.0.0.1:8081/sse`

Example 3: 5ire

Another MCP client that supports multiple models on the backend is [5ire](https://github.com/nanbingxyz/5ire). To set up GhidraMCP, open 5ire and go to `Tools` -> `New` and set the following configurations:

1. Tool Key: ghidra 2. Name: GhidraMCP 3. Command: `python /ABSOLUTE_PATH_TO/bridge_mcp_ghidra.py`

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 128 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
  2. [![GitHub release (latest by date)](https://img.shields.io/github/v/release/LaurieWired/GhidraMCP)](https://github.com/LaurieWired/GhidraMCP/releases)
  3. [![GitHub stars](https://img.shields.io/github/stars/LaurieWired/GhidraMCP)](https://github.com/LaurieWired/GhidraMCP/stargazers)
  4. [![GitHub forks](https://img.shields.io/github/forks/LaurieWired/GhidraMCP)](https://github.com/LaurieWired/GhidraMCP/network/members)
  5. [![GitHub contributors](https://img.shields.io/github/contributors/LaurieWired/GhidraMCP)](https://github.com/LaurieWired/GhidraMCP/graphs/contributors)
  6. [![Follow @lauriewired](https://img.shields.io/twitter/follow/lauriewired?style=social)](https://twitter.com/lauriewired)
  7. ![ghidra_MCP_logo](https://github.com/user-attachments/assets/4986d702-be3f-4697-acce-aea55cd79ad3)
  8. # ghidraMCP
  9. ghidraMCP is an Model Context Protocol server for allowing LLMs to autonomously reverse engineer applications. It exposes numerous tools from core Ghidra functionality to MCP clients.
  10. https://github.com/user-attachments/assets/36080514-f227-44bd-af84-78e29ee1d7f9
  11. # Features
  12. MCP Server + Ghidra Plugin
  13. - Decompile and analyze binaries in Ghidra
  14. - Automatically rename methods and data
  15. - List methods, classes, imports, and exports
  16. # Installation
  17. ## Prerequisites
  18. - Install [Ghidra](https://ghidra-sre.org) 12.1.4
  19. - Install [uv](https://docs.astral.sh/uv/) (or Python 3.10+ with `pip install git+https://github.com/LaurieWired/GhidraMCP`, then use `ghidra-mcp` as the command below)
  20. ## Ghidra
  21. First, download the latest [release](https://github.com/LaurieWired/GhidraMCP/releases) from this repository. This contains the Ghidra plugin and Python MCP client. Then, you can directly import the plugin into Ghidra.
  22. 1. Run Ghidra
  23. 2. Select `File` -> `Install Extensions`
  24. 3. Click the `+` button
  25. 4. Select the `ghidra_12.1.4_PUBLIC_<date>_GhidraMCP.zip` from the downloaded release
  26. 5. Restart Ghidra
  27. 6. Make sure the GhidraMCPPlugin is enabled in `File` -> `Configure` -> `Developer`
  28. 7. *Optional*: Configure the port in Ghidra with `Edit` -> `Tool Options` -> `GhidraMCP HTTP Server`
  29. Video Installation Guide:
  30. https://github.com/user-attachments/assets/75f0c176-6da1-48dc-ad96-c182eb4648c3
  31. ## MCP Clients
  32. Theoretically, any MCP client should work with ghidraMCP. Most clients accept a JSON config like the following:
  33. ```json
  34. {
  35. "mcpServers": {
  36. "ghidra": {
  37. "command": "uvx",
  38. "args": [
  39. "--from",
  40. "git+https://github.com/LaurieWired/GhidraMCP",
  41. "ghidra-mcp",
  42. "--ghidra-server",
  43. "http://127.0.0.1:8080/"
  44. ]
  45. }
  46. }
  47. }
  48. ```
  49. The server IP and port are configurable and should be set to point to the target Ghidra instance. If not set, both will default to localhost:8080.
  50. For clients that connect to a URL instead of launching a command, first run the MCP server yourself:
  51. ```
  52. uvx --from git+https://github.com/LaurieWired/GhidraMCP ghidra-mcp --transport streamable-http --mcp-host 127.0.0.1 --mcp-port 8081 --ghidra-server http://127.0.0.1:8080/
  53. ```
  54. Then add `http://127.0.0.1:8081/mcp` as a remote server in your client.
  55. ## Example 1: VS Code
  56. Run `MCP: Add Server` from the Command Palette, or add the following to `.vscode/mcp.json` in your workspace:
  57. ```json
  58. {
  59. "servers": {
  60. "ghidra": {
  61. "type": "stdio",
  62. "command": "uvx",
  63. "args": [
  64. "--from",
  65. "git+https://github.com/LaurieWired/GhidraMCP",
  66. "ghidra-mcp",
  67. "--ghidra-server",
  68. "http://127.0.0.1:8080/"
  69. ]
  70. }
  71. }
  72. }
  73. ```
  74. ## Example 2: Claude Code
  75. Run the following command:
  76. ```
  77. claude mcp add ghidra -- uvx --from git+https://github.com/LaurieWired/GhidraMCP ghidra-mcp --ghidra-server http://127.0.0.1:8080/
  78. ```
  79. ## Headless (no Ghidra GUI)
  80. `ghidra-mcp` can also import and analyze a binary itself using [PyGhidra](https://pypi.org/project/pyghidra/), with no Ghidra GUI running. This needs Python 3.10–3.13, the GhidraMCP extension installed in Ghidra (or `--extension-jar /path/to/GhidraMCP.jar`), and `GHIDRA_INSTALL_DIR` set to your Ghidra 12.1.4 directory:
  81. ```
  82. uvx --python 3.13 --from "ghidra-mcp[headless] @ git+https://github.com/LaurieWired/GhidraMCP" ghidra-mcp --headless --binary /path/to/target
  83. ```
  84. Use the same command and arguments in any of the client configs above. Add `--project DIR` to keep the Ghidra project (and save changes) between runs. On macOS, build Ghidra's decompiler once with `support/gradle/gradlew buildNatives` from the Ghidra directory.
  85. # Building from Source
  86. 1. Set `GHIDRA_INSTALL_DIR` to your Ghidra 12.1.4 directory
  87. 2. Build the extension with Gradle (Java 21) by running:
  88. `cd extension && $GHIDRA_INSTALL_DIR/support/gradle/gradlew buildExtension`
  89. The generated zip file in `extension/dist/` includes the built Ghidra plugin and its resources. These files are required for Ghidra to recognize the new extension.
  90. - lib/GhidraMCP.jar
  91. - extension.properties
  92. - Module.manifest
  93. The Python MCP server can be run from a checkout with `uv run ghidra-mcp`, and tested with `uv run pytest`.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.