ghidra-bridge
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Ghidra Bridge
Ghidra Bridge gives network access to an active Ghidra program.
The runtime runs on Java 21 and supports Ghidra 12.1.
It exposes two transports: WebSocket JSON-RPC 2.0 and MCP Streamable HTTP 2026-07-28.
The runtime JAR has zero third-party dependencies.
Key Features
Dual Transports: Access Ghidra through WebSocket JSON-RPC 2.0 or MCP Streamable HTTP.
Unified Catalog: One typed registry defines 56 public dotted methods. WebSocket exposes all 56. MCP exposes 55 and does not expose
interface.get.Bounded Scans: Address-ordered list results support cooperative cancellation and cursor pagination.
Atomic Transactions: The bridge executes batch operations. It reverts a transaction after an error.
Headless Mode: The bridge runs in Ghidra headless scripts without GUI interaction.
Related MCP server: ghidra-mcp-aarch64
Build the Scripts
Set GHIDRA_INSTALL_DIR to your Ghidra installation path.
Then build the scripts with the Gradle wrapper:
./gradlew buildGhidraScriptThe build task creates three files in build/ghidra-script/:
Bridge.java
GhidraMcp.java
ghidra-bridge.jarKeep these three files in the same directory.
The loader scripts locate ghidra-bridge.jar relative to their file path.
Start the Bridge
Run in the Ghidra GUI
Open a binary in the Ghidra CodeBrowser tool.
Open the Script Manager window.
Add
build/ghidra-script/to your script directories.Run
Bridge.javafor WebSocket orGhidraMcp.javafor MCP in theGhidra Bridgecategory.Read the bound endpoint URL,
session_id, andtool_prefixin the Console window. The script starts automatically on127.0.0.1(8765or8766) and picks the next free port for extra tabs.
Run in Ghidra Headless Mode
You can run GhidraMcp.java or Bridge.java as a post-script in headless mode.
Create a project directory.
Then import the target binary with auto-analysis.
Do not use project paths with dot-prefixed directory names like .cache.
mkdir -p /path/to/projects
"$GHIDRA_INSTALL_DIR/support/analyzeHeadless" /path/to/projects demo \
-import /path/to/target_binary \
-scriptPath "$PWD/build/ghidra-script" \
-postScript GhidraMcp.java host=127.0.0.1 port=8766 path=/mcp session_id=demoThe post-script serves requests until you stop the process.
To open a saved project file without a new analysis, use -process with -noanalysis:
"$GHIDRA_INSTALL_DIR/support/analyzeHeadless" /path/to/projects demo \
-process target_binary -noanalysis \
-scriptPath "$PWD/build/ghidra-script" \
-postScript GhidraMcp.java host=127.0.0.1 port=8766 path=/mcp session_id=demoConfiguration Arguments
Configure the bridge with strict key=value pairs.
The launcher rejects unknown arguments, duplicate arguments, and camelCase keys.
# Embedded WebSocket server
host=127.0.0.1 port=8765 path=/ws/agent session_id=demo
# Outbound WebSocket client
ws_url=ws://127.0.0.1:8765/ws/agent session_id=demo token=secret
# MCP HTTP server
host=127.0.0.1 port=8766 path=/mcp session_id=demo token=secret
# Second MCP HTTP server with its own tool names
host=127.0.0.1 port=8767 path=/mcp session_id=other tool_prefix=otherParameter Reference
Parameter | Default | Description |
|
| Local network interface address to listen on. |
|
| TCP port number for the HTTP or WebSocket server. WebSocket uses the default only when |
|
| URL path endpoint for request dispatch. |
| Program name | Unique identifier string for this active session. |
| (none) | Shared secret token for bearer authentication. |
| (none) | Remote WebSocket URL in outbound client mode. |
|
| MCP only. First part of every tool name, such as |
| Loopback and | MCP only. Comma-separated |
| (auto) | Path to |
| (none) | Outbound only. Halt the JVM if Ghidra does not exit this many seconds after the session ends. An active save completes first. Use it only for a headless Ghidra that a host starts. |
Security Rules
The bridge enforces strict security boundaries:
Loopback Default: Listeners bind to
127.0.0.1by default.Mandatory Token: A non-loopback listener or a non-loopback origin in
allowed_originsorGHIDRA_MCP_ALLOWED_ORIGINSrequirestoken.Browser Origin Policy: By default, MCP HTTP permits only loopback and
hostorigins. Setallowed_originsorGHIDRA_MCP_ALLOWED_ORIGINSto override, ornoneto reject all.Bearer Header: Inbound requests must send
Authorization: Bearer <token>.Query Token Rejection: The server rejects tokens in URL query strings with HTTP 400.
Log Privacy: The server never writes secret tokens to log files or consoles.
Verify Release Archives
Before you run release scripts in Ghidra, verify the SHA-256 checksum and GitHub provenance attestation:
sha256sum -c ghidra-bridge-<version>.zip.sha256
gh attestation verify ghidra-bridge-<version>.zip --repo ByteLandTechnology/ghidra-bridgeThe attestation confirms that GitHub Actions built the archive from this repository.
API and Transports
The public API has 56 dotted methods, from interface.get to batch.execute.
WebSocket JSON-RPC 2.0
WebSocket sends strict JSON-RPC 2.0 requests with dotted method names:
{"jsonrpc":"2.0","id":"r1","method":"program.get","params":{}}Call interface.get to discover all methods and schemas that the server supports.
Model Context Protocol (MCP)
MCP exposes the same operations, except interface.get, through 15 tools over Streamable HTTP and SSE:
ghidra_help: Discover domains, list operations with schemas, or view one operation.14 Domain Tools:
ghidra_program,ghidra_memory,ghidra_function, and other domain tools.
Call a domain tool with an operation name and its parameters.
For example, the program.get method is the get operation of ghidra_program:
{
"name": "ghidra_program",
"arguments": {
"operation": "get",
"params": {}
}
}Requests that use 2026-07-28 must also send MCP metadata and headers.
The server supports initialize clients with versions 2025-06-18 and 2025-11-25, plus legacy SSE on GET.
See the Protocol Specification.
The MCP tool schema is also available at ghidra-bridge://ghidra/contracts/mcp-tools.
Documentation Index
Overview: System concepts, concurrency model, and query patterns.
Architecture: Module boundaries and dependency graph.
Protocol Specification: JSON-RPC envelopes, MCP endpoints, and error formats.
Batch and Transactions: Atomic execution and transaction boundaries.
Development Guide: Environment configuration, workflows, and quality checks.
Method Reference: Full 56-method catalog and schemas.
AsyncAPI Contract: Formal WebSocket contract.
MCP Tools Contract: Formal MCP tool definitions.
Verify the Build
Run the full verification suite before you commit changes:
./gradlew --no-daemon clean verifyThe verify task checks:
JUnit tests across all Java modules.
Architecture boundary rules.
Generated API contract drift.
MCP tool documentation consistency.
Generated script build and compilation.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Remote MCP service for evidence-backed work memory and continuity.
Governed data discovery, exact queries, decisions, simulations, and runtime utilities over MCP.
Repository knowledge graph MCP server for codebase understanding and debugging.
Start and manage Reason cloud coding agents, projects and sessions from any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceExposes Ghidra reverse engineering capabilities via MCP, enabling LLMs and agents to analyze binaries, decompile, search, and edit programs headlessly or with GUI integration.470Apache 2.0
- AlicenseBqualityDmaintenanceEnables AI agents and automation to perform Ghidra reverse-engineering tasks through MCP, including decompilation, live debugging, P-code emulation, data-flow analysis, and headless script execution, with specialized AArch64-aware emulation.8Apache 2.0
- AlicenseNot gradedqualityCmaintenanceConnects MCP clients to radare2, x64dbg, cdb, and Frida for disassembly, control-flow graphs, cross-references, strings, and live debugging over stdio or HTTP.1MIT
- AlicenseNot gradedqualityDmaintenanceEnables LLMs and MCP clients to autonomously reverse engineer applications by exposing core Ghidra functionality, including decompiling and analyzing binaries, renaming methods and data, and listing methods, classes, imports, and exports.Apache 2.0