pyghidra-mcp

by @clearbluejar

Pyghidra MCP Server

Automate headless or live-GUI Ghidra binary reverse engineering from Claude Code, Codex, VS Code, or pyghidra-mcp-cli over persistent Streamable HTTP (http://127.0.0.1:8000/mcp). Built in Python under Apache-2.0 by clearbluejar using pyghidra, JPype, and ChromaDB semantic code search.

Server facts

pyghidra-mcp

GitHub stars

472

Last commit

Nov 24, 2026

Runtime

python

License

Apache-2.0

Tech

Runtime
python
Transports
streamable-httpstdiosse
Remote access
No
Authentication
None locally (local Ghidra installation and project files)

Activity

GitHub stars
472
Last commit
Data as of

Tags

  • Reverse Engineering
  • ghidra mcp
  • pyghidra

Overview

Reverse engineers automating Ghidra inside LLM agents or CI pipelines can deploy `clearbluejar/pyghidra-mcp` (Apache-2.0) for `pyghidra mcp` workflows using Python (`uvx pyghidra-mcp`) or Docker (`ghcr.io/clearbluejar/pyghidra-mcp`). Unlike GUI-only Ghidra plugins, it bridges Ghidra's `ProgramAPI` and `FlatProgramAPI` through `pyghidra` and a shared JPype JVM in headless mode by default—or launches a live Ghidra CodeBrowser inside the same JVM when started with `--gui`. Keeping a persistent Streamable HTTP server running at `http://127.0.0.1:8000/mcp` (the recommended transport, with `stdio` fallback and legacy `-t sse` compatibility) lets Claude Code, Codex, VS Code, OpenWeb-UI/MCPO, and the companion `pyghidra-mcp-cli` query open `.gpr`/`.rep` projects immediately without paying 10-60 second Ghidra JVM cold starts per command.

Asynchronous startup lets agents issue queries while binaries finish background analysis and ChromaDB indexing, unlocking vector semantic search across decompiled pseudo-C functions, symbols, and comments alongside project-wide multi-binary analysis, decompilation, cross-references, callgraphs, binary imports, and symbol or prototype edits. Tool docstrings and payloads stay intentionally compact for agent token budgets, and GUI-steering controls (such as `goto`, `open_program_in_gui`, `set_current_program`, and `list_open_programs`) appear only when launched with `--gui`. Note that `--gui` starts Ghidra via `pyghidra-mcp` itself and cannot connect into a separate Ghidra desktop session opened beforehand.

Install & configure

Requirements

  • Local Ghidra installation with Python and `uv` (`uvx pyghidra-mcp`) OR Docker (`ghcr.io/clearbluejar/pyghidra-mcp`)
  • Persistent Streamable HTTP server running (`http://127.0.0.1:8000/mcp`) for MCP hosts and `pyghidra-mcp-cli`, or `stdio` for HTTP-incapable clients
  • Target binary path or existing Ghidra project directory (`.gpr` / `.rep`) passed via `--project-path`
Documented launch / install command
uvx pyghidra-mcp --transport streamable-http --project-path /absolute/path/to/ghidra-projects /absolute/path/to/binary

Start a persistent headless server with `uvx pyghidra-mcp --transport streamable-http --project-path /absolute/path/to/ghidra-projects /absolute/path/to/binary` (or add `--gui` to launch a live Ghidra CodeBrowser), then point Claude Code, Codex, or `uvx pyghidra-mcp-cli` to `http://127.0.0.1:8000/mcp`. Docker users can run `docker run --rm -p 8000:8000 ghcr.io/clearbluejar/pyghidra-mcp`.

Config file · macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows: %APPDATA%\Claude\claude_desktop_config.json

Use Settings → Developer → Edit Config when available. Do not assume a Linux configuration path; check the client documentation for your platform. Remote servers use the app’s connector flow when supported, not the local stdio file shown here. Merge this example with existing settings; do not overwrite unrelated servers.

A supported configuration example is not available for this client and transport. Check the client documentation for its connection flow; do not substitute an undocumented JSON format.

Read the Claude Desktop setup guide

Config file · Project: .cursor/mcp.json

User: ~/.cursor/mcp.json

The project path is relative to the workspace root. The tilde denotes your user home directory. Use Cursor’s MCP settings to confirm which configuration and scope your installed version is reading. Merge this example with existing settings; do not overwrite unrelated servers.

Cursor configuration
{
  "mcpServers": {
    "pyghidra-mcp": {
      "url": "http://127.0.0.1:8000/mcp"
    }
  }
}

Read the Cursor setup guide

Config file · Workspace: .vscode/mcp.json

For user scope, use the “MCP: Open User Configuration” command if available. Do not guess a user configuration path across operating systems, profiles, containers, or remote workspaces; check the client documentation. Merge this example with existing settings; do not overwrite unrelated servers.

A supported configuration example is not available for this client and transport. Check the client documentation for its connection flow; do not substitute an undocumented JSON format.

Read the VS Code setup guide

Config file · macOS/Linux: ~/.codeium/windsurf/mcp_config.json

Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json

Open the MCP configuration through Windsurf’s settings when possible to confirm the active file. Paths can differ in managed or future releases; check the client documentation if this location is not present. Merge this example with existing settings; do not overwrite unrelated servers.

Windsurf configuration
{
  "mcpServers": {
    "pyghidra-mcp": {
      "serverUrl": "http://127.0.0.1:8000/mcp"
    }
  }
}

Read the Windsurf setup guide

Config file · Project scope: .mcp.json at the repository root

The project file uses mcpServers. For user scope, use claude mcp add --scope user rather than assuming .mcp.json in your home directory is the user configuration. Check the client documentation for managed settings and storage details. Merge this example with existing settings; do not overwrite unrelated servers.

Claude Code configuration
{
  "mcpServers": {
    "pyghidra-mcp": {
      "type": "sse",
      "url": "http://127.0.0.1:8000/mcp"
    }
  }
}

Read the Claude Code setup guide

Examples are translated from the published configuration. Supply your own credentials and verify requirements in the upstream README. Remote connectors are shown only where a supported configuration format is known.

Use cases

  • Run headless multi-binary Ghidra reverse engineering inside Claude Code, Codex, or CI pipelines while asynchronous background analysis and ChromaDB indexing run concurrently.
  • Search unfamiliar stripped binaries semantically across decompiled pseudo-C, comments, and symbols using ChromaDB embeddings instead of exact symbol names alone.
  • Launch Ghidra with `--gui` so an AI agent decompiles, renames functions or variables, sets prototypes, and navigates your live CodeBrowser via `goto` and `open_program_in_gui`.
  • Script fast terminal triage via `pyghidra-mcp-cli` (`list-binaries`, `decompile --callees --strings --xrefs`, `search-symbols`) against a single warm HTTP server.

Strengths

  • Headless-first architecture works seamlessly in CI/CD and Docker while `--gui` optionally launches and drives a live Ghidra CodeBrowser in the same JVM.
  • Persistent Streamable HTTP eliminates 10-60 second Ghidra startup overhead per invocation and serves both MCP agents and `pyghidra-mcp-cli` simultaneously.
  • Built-in ChromaDB vector indexing enables fuzzy semantic search across decompiled functions, symbols, and comments project-wide.
  • Agent-optimized tool surface keeps docstrings short, responses focused, and GUI-only tools hidden during headless sessions.

Limitations

  • Beta project under active development; `--gui` must launch Ghidra through `pyghidra-mcp` and cannot attach to an already-open external Ghidra instance.
  • Full capabilities require a local Ghidra runtime (or the container image), and background binary analysis plus ChromaDB/GZF caching add local disk artifacts.
  • Legacy SSE transport (`-t sse` at `/sse`) is retained only for backwards compatibility; `stdio` mode cannot be shared with `pyghidra-mcp-cli`.

pyghidra-mcp setup notes

  • pyghidra-mcp's example uses sse, while its catalog transports are streamable-http / stdio / sse; use the example's connection type.

Frequently asked questions

`pyghidra-mcp` is headless-first and Python-native (`pyghidra` + JPype), designed for CLI automation, CI pipelines, Docker, and concurrent multi-binary Ghidra projects rather than requiring a manually open GUI plugin. It also adds ChromaDB semantic search over decompiled pseudo-C, asynchronous background analysis, an optional `--gui` mode, and a companion HTTP CLI (`pyghidra-mcp-cli`).

Related MCP servers