Skip to main content

Ghidra backend for re-mcp — headless Ghidra MCP server using pyghidra

Project description

re-mcp-ghidra

Ghidra backend for RE-MCP — a headless Ghidra MCP server using pyghidra. Exposes Ghidra's analysis capabilities over the Model Context Protocol, letting LLMs drive reverse engineering directly.

This is a standalone server, not a Ghidra plugin. It uses pyghidra to run Ghidra's analysis engine without a GUI.

Requirements

  • Python 3.12+
  • Ghidra 12+
  • JDK 21+
  • macOS, Windows, or Linux

Installation

uv tool install re-mcp-ghidra

Or with pip:

pip install re-mcp-ghidra

Finding Ghidra

The server looks for your Ghidra installation in the following order:

  1. GHIDRA_INSTALL_DIR environment variable — set this if Ghidra is in a non-standard location.
  2. Config fileghidra-install-dir in ~/.ghidra/ghidra-config.json.
  3. Platform-specific default paths (e.g. /Applications/ghidra_* on macOS).

See the main documentation for the full list of default search paths per platform.

Usage

# Run the server (direct stdio mode)
re-mcp-ghidra

# Or with uvx (no install needed)
uvx re-mcp-ghidra

MCP client configuration

{
  "mcpServers": {
    "ghidra": {
      "command": "uvx",
      "args": ["re-mcp-ghidra"]
    }
  }
}

CLI subcommands

Command Description
re-mcp-ghidra (or re-mcp-ghidra stdio) Direct stdio mode — single-session, workers die on disconnect (default)
re-mcp-ghidra proxy Stdio proxy that auto-spawns a persistent HTTP daemon
re-mcp-ghidra serve Start the HTTP daemon directly
re-mcp-ghidra stop Gracefully shut down a running daemon
re-mcp-ghidra backends List installed backends

Environment variables

Variable Default Description
GHIDRA_INSTALL_DIR (auto-detected) Path to Ghidra installation directory
GHIDRA_MCP_MAX_WORKERS (unlimited) Maximum simultaneous databases (1-8)
GHIDRA_MCP_LOG_LEVEL WARNING Logging level
GHIDRA_MCP_LOG_DIR (unset) Directory for per-run log files
GHIDRA_MCP_IDLE_TIMEOUT 300 Auto-shutdown timeout in seconds (0 to disable)

Features

  • Full decompilation and disassembly
  • Function, type, and structure management
  • Cross-reference and call graph analysis
  • String and byte pattern search
  • Binary patching and instruction assembly
  • Function ID and data type archive support
  • Multi-database support with concurrent analysis
  • MCP resources for structured read-only access

See the main documentation for the full tool catalog, multi-database workflows, and detailed usage.

License

Dual-licensed under MIT and Apache-2.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

re_mcp_ghidra-3.0.1.tar.gz (62.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

re_mcp_ghidra-3.0.1-py3-none-any.whl (105.9 kB view details)

Uploaded Python 3

File details

Details for the file re_mcp_ghidra-3.0.1.tar.gz.

File metadata

  • Download URL: re_mcp_ghidra-3.0.1.tar.gz
  • Upload date:
  • Size: 62.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for re_mcp_ghidra-3.0.1.tar.gz
Algorithm Hash digest
SHA256 ad295acde8a8f921145296e4416c28ac52b4bf14cdf5b5f64af5f226c0980de0
MD5 b1cfddc8195923a7e977ea3ec31919af
BLAKE2b-256 17125d2e2148734ee2ac4415dc3722d8b8fe8dae0cbd66a85dc26d00a93ca87d

See more details on using hashes here.

Provenance

The following attestation bundles were made for re_mcp_ghidra-3.0.1.tar.gz:

Publisher: publish.yml on jtsylve/re-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file re_mcp_ghidra-3.0.1-py3-none-any.whl.

File metadata

  • Download URL: re_mcp_ghidra-3.0.1-py3-none-any.whl
  • Upload date:
  • Size: 105.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for re_mcp_ghidra-3.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 be5cc0a5a896df237e9fd8288bc94f9903e85d24b863a3519f9003889bfddd19
MD5 2e6d7378a53d0bcb2aad2c74a761215e
BLAKE2b-256 d9f49f16bd9307a6d1af1f95a60bccdb798bfa5c7016646f12d9d8d7c619a572

See more details on using hashes here.

Provenance

The following attestation bundles were made for re_mcp_ghidra-3.0.1-py3-none-any.whl:

Publisher: publish.yml on jtsylve/re-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page