MCP Hub
Back to servers

pyghidra-lite

Token-efficient Ghidra RE: decompilation, Swift/ObjC, ELF/Mach-O, async progress

Registry
Updated
Jan 29, 2026

Quick Install

uvx pyghidra-lite

pyghidra-lite

PyPI Python License MCP

Token-efficient MCP server for Ghidra-based reverse engineering. Analyze ELF, Mach-O, and PE binaries with Swift, Objective-C, and Hermes support.

Quick Start

1. Install Ghidra (11.x required)

# Arch Linux
yay -S ghidra

# Or download from https://ghidra-sre.org
export GHIDRA_INSTALL_DIR=/path/to/ghidra

2. Install pyghidra-lite

pip install pyghidra-lite

3. Add to Claude Code

Create .mcp.json in your project (or ~/.claude.json for global):

{
  "mcpServers": {
    "pyghidra-lite": {
      "command": "pyghidra-lite",
      "args": ["--allow-path", "/path/to/binaries"]
    }
  }
}

4. Use it

You: Analyze the binary at /path/to/binaries/app

Claude: [calls import_binary, list_functions, decompile...]

Installation

PyPI (recommended)

pip install pyghidra-lite

Arch Linux (AUR)

yay -S python-pyghidra-lite

From source

git clone https://github.com/johnzfitch/pyghidra-lite
cd pyghidra-lite
pip install -e .

MCP Configuration

Basic (allow specific paths)

{
  "mcpServers": {
    "pyghidra-lite": {
      "command": "pyghidra-lite",
      "args": ["--allow-path", "/home/user/binaries"]
    }
  }
}

Multiple paths

{
  "mcpServers": {
    "pyghidra-lite": {
      "command": "pyghidra-lite",
      "args": [
        "--allow-path", "/home/user/binaries",
        "--allow-path", "/opt/targets"
      ]
    }
  }
}

Allow any path (development only)

{
  "mcpServers": {
    "pyghidra-lite": {
      "command": "pyghidra-lite",
      "args": ["--allow-any-path"]
    }
  }
}

Tools

Core (3)

ToolDescription
import_binaryImport binary with async progress reporting
delete_binaryRemove from project
reanalyzeRe-run with different profile

Discovery (4)

ToolDescription
list_binariesList loaded binaries
list_functionsFunctions with metadata (compact by default)
list_importsImports with capability tags
list_exportsExported symbols

Analysis (8)

ToolDescription
get_function_infoFunction metadata and callers/callees
disassembleAssembly for a function
decompilePseudo-C with callees and strings
batch_decompileDecompile multiple functions
get_xrefsCross-references
get_calleesWhat a function calls
call_graphCall graph with configurable depth
memory_mapMemory layout with permissions

Search (2)

ToolDescription
search_stringsStrings with xrefs
search_symbolsSymbol name search

Data (2)

ToolDescription
read_bytesRaw memory
read_stringNull-terminated string

ELF (4)

ToolDescription
elf_infoELF structure summary
elf_sectionsELF sections
elf_symbolsELF symbols
elf_got_pltGOT/PLT entries

Mach-O (3)

ToolDescription
macho_infoMach-O structure summary
macho_segmentsSegments and sections
macho_dylibsLinked dylibs

Swift (4)

ToolDescription
swift_functionsSwift functions (demangled)
swift_typesSwift types from metadata
swift_decompileDecompile with demangled names
demangleSwift symbol demangling

Objective-C (3)

ToolDescription
objc_classesObjective-C classes
objc_methodsObjective-C methods
objc_decompileMethod decompile

Hermes (3)

ToolDescription
hermes_infoHermes bundle summary
hermes_componentsReact component names
hermes_endpointsAPI endpoints/URLs

Analysis Profiles

ProfileUse Case
fastQuick triage, skip expensive analysis
defaultBalanced (recommended)
deepThorough analysis for obfuscated code
# Import with fast profile
import_binary("/path/to/binary", profile="fast")

# Re-analyze with deep profile
reanalyze("binary-name", profile="deep")

Token Efficiency

pyghidra-lite is designed for minimal token usage:

  • Compact output by default - list_functions returns minimal fields
  • Opt-in verbosity - pass compact=false for full metadata
  • Progress reporting - large imports report progress every 10% or 60s
  • Truncated strings - long strings capped at 500 chars

Multi-Agent Support

Each binary gets its own Ghidra project, enabling:

  • Parallel analysis of different binaries
  • Shared results across agents
  • Persistent analysis (survives restarts)
  • Content-addressed storage (same binary = same analysis)

Projects stored in ~/.local/share/pyghidra-lite/projects/.

Links

License

MIT

Reviews

No reviews yet

Sign in to write a review