Skip to main content

GHIDRA-NO-MCP

Export Ghidra decompilation results as source files for use with AI IDEs.

Runs from cmd, uses pyghidra and headless mode and doesn't require the Ghidra GUI.

Just copy-paste the uvx command into the agent or skill.

Inspired by: https://github.com/P4nda0s/IDA-NO-MCP

Text, Source Code, and Shell are LLM's native languages.

Installation and Usage

Install with uv

uv tool install git+https://github.com/gxenos/GHIDRA-NO-MCP.git

Run from anywhere:

ghidra-no-mcp -g /path/to/GHIDRA /path/to/binary /output/dir

Run with uvx

uvx git+https://github.com/gxenos/GHIDRA-NO-MCP -g /path/to/GHIDRA /path/to/binary /output/dir

Or using environment variable:

GHIDRA_INSTALL_DIR=/path/to/GHIDRA uvx git+https://github.com/gxenos/GHIDRA-NO-MCP /path/to/binary /output/dir

Other Installation Methods

Local development

uv venv && uv pip install -e .

Examples

# Using environment variable
export GHIDRA_INSTALL_DIR=/opt/ghidra/ghidra_12.0.4_PUBLIC
uv run ghidra-no-mcp ./malware.exe ./analysis

# Using CLI argument
uv run ghidra-no-mcp -g /opt/ghidra ./malware.exe ./analysis

# With uvx
GHIDRA_INSTALL_DIR=/opt/ghidra uvx git+https://github.com/gxenos/GHIDRA-NO-MCP ./malware.exe ./analysis

Options

Option Description
-g, --ghidra-path Path to Ghidra installation
-v, --verbose Enable verbose logging

Output

Directory/File Description
call_graph.json Function call graph (nodes + edges), includes function names, addresses, caller/callee counts
decompile/ Decompiled C files (one per function), includes function name, address, callers, callees
strings.txt String table
imports.txt Import table
exports.txt Export table
memory/ Memory hexdumps, 1MB chunks
decompile_skipped.txt Skipped functions
decompile_failed.txt Failed functions

Each .c file includes metadata header:

/*
 * func-name: main
 * func-address: 0x401000
 * callers: 0x402000
 * callees: 0x404000
 */

The call_graph.json file contains the full call graph:

{
  "nodes": [
    {"address": "0x401000", "name": "main", "is_external": false, "caller_count": 0, "callee_count": 2},
    {"address": "0x402000", "name": "validate_input", "is_external": false, "caller_count": 1, "callee_count": 3}
  ],
  "edges": [
    {"caller": "0x401000", "caller_name": "main", "callee": "0x402000", "callee_name": "validate_input"}
  ],
  "stats": {"total_functions": 150, "total_calls": 342, "external_calls": 45}
}

Analysis

By default, the script runs Ghidra with the default analysis options.

Analysis Options

Option Description
--no-memory Skip memory hexdump export
--no-strings Skip string extraction
--no-imports Skip import table export
--no-exports Skip export table export
--decompiler-timeout Timeout per function in seconds (0 = unlimited, default: 0)
--max-payload Max decompiler payload size in MB (default: 100)

Metadata

Release files for ghidra-no-mcp 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ghidra-no-mcp 0.1.0
File Size Uploaded Provenance
ghidra_no_mcp-0.1.0.tar.gz 8.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ghidra-no-mcp 0.1.0
File Interpreter ABI Platform
ghidra_no_mcp-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 16.4 kB

Release files / ghidra_no_mcp-0.1.0.tar.gz

Download URL ghidra_no_mcp-0.1.0.tar.gz
Size 8.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a81c642e9ed914c7e18c0de6058f392970b2f18f4c8932b8826786e16dcabb4b
BLAKE2b-256 checksum
How to use checksums
006c5b4718c75fe7c470bacfdaba17172c1e540006758c096dbcf28ab9300cb1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.12 {"installer":{"name":"uv","version":"0.9.12"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / ghidra_no_mcp-0.1.0-py3-none-any.whl

Download URL ghidra_no_mcp-0.1.0-py3-none-any.whl
Size 8.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
36da9ba516b4a5332cc28c5feafb3f49e31f97fe4dc5d32d062b82fc76adbd3c
BLAKE2b-256 checksum
How to use checksums
04c728b4a7b0cf2cf74bf51a6a851901233522d95edb1bdd04708335e03751d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.12 {"installer":{"name":"uv","version":"0.9.12"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for ghidra-no-mcp 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page