Ghidra MCP Zig Plugin

Ghidra MCP Zig Plugin

ghidra-mcp-zig•bystreamerd

A Ghidra plugin that bridges Ghidra with a Zig-based MCP server to support program analysis tasks.

License: MIT•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Provides MCP commands for decompiling functions and renaming functions or data objects by address.
  • •Lists functions, data objects, imports, and exports from the analyzed program.
  • •Uses a JNI-based bridge for communication between Ghidra and Zig.

BEST FOR

  • •Reverse engineers analyzing binaries in Ghidra who want MCP-driven decompilation and symbol management.
  • •Developers building tooling around Ghidra who need a Go client library for integration.

ABOUT GHIDRA-MCP-ZIG

Ghidra MCP Zig Plugin is cataloged as an MCP server attributed to streamerd. A Ghidra plugin that bridges Ghidra with a Zig-based MCP server to support program analysis tasks. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Ghidra MCP Zig Plugin are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What Ghidra and Zig versions are required?

The project lists Zig 0.13.0 or later and Ghidra 11.3.1 or later as prerequisites.

Upstream README

View this exact version on GitHub

README.md · 7e376303253d · Fetched 2026-11-13 10:24:28 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

Ghidra MCP Zig Plugin

Ghidra Zig License

Go Gradle

Ghidra MCP Zig Plugin

A Ghidra plugin that provides a bridge between Ghidra and a Zig-based MCP server for enhanced program analysis capabilities.

Features

  • JNI-based communication between Ghidra and Zig
  • Function decompilation and renaming
  • Data symbol management
  • Import/Export listing
  • MCP server integration
  • Comprehensive test suite
  • Modern build system with Zig
  • Efficient memory management
  • Type-safe JNI bridge implementation
  • Go client library for easy integration

Prerequisites

  • Zig (version 0.13.0 or later)
  • Ghidra (version 11.3.1 or later)
  • Java Development Kit (JDK) 17 or later
  • Go (version 1.22.4 or later)
  • Gradle (version 8.13 or later)
  • Make

Project Structure

ghidra-mcp-zig/
├── src/
│   ├── plugin/
│   │   ├── jni/
│   │   │   └── bridge.zig    # JNI interface implementation
│   │   ├── analysis.zig      # Program analysis logic
│   │   └── plugin.zig        # Plugin initialization
│   └── server/
│       └── main.zig          # MCP server implementation
├── java/                     # Ghidra plugin Java code
│   ├── build.gradle         # Gradle build configuration
│   ├── gradlew             # Gradle wrapper script
│   └── src/                # Java source files
├── pkg/
│   └── mcp/
│       └── client/         # Go MCP client library
│           ├── client.go   # Client implementation
│           └── client_test.go # Client tests
├── build.zig               # Build configuration
├── build.zig.zon          # Dependencies configuration
├── go.mod                 # Go module definition
└── Makefile              # Build automation

Dependencies

  • zig-jni (v0.0.9) - JNI bindings for Zig

Building

  1. Clone the repository:

    git clone https://github.com/yourusername/ghidra-mcp-zig.git
    cd ghidra-mcp-zig
    
  2. Create a .env file with the following variables:

    GHIDRA_PATH=/path/to/ghidra_11.3.1_PUBLIC/Ghidra/Features/Base/lib/Base.jar
    JAVA_HOME=/path/to/your/jdk
    
  3. Build the project:

    # Build everything
    make all
    
    # Or build specific components
    make build-server    # Build the MCP server
    make build-plugin   # Build the Ghidra plugin
    
  4. Run the server:

    make run-server
    

Build Targets

TargetDescriptionExample Usage
allBuild all componentsmake all
build-serverBuild MCP servermake build-server
build-pluginBuild Ghidra pluginmake build-plugin
cleanClean all artifactsmake clean
clean-serverClean server artifactsmake clean-server
clean-pluginClean plugin artifactsmake clean-plugin

Run Targets

TargetDescriptionExample Usage
run-serverStart MCP servermake run-server
run-pluginStart Ghidra pluginmake run-plugin

Test Targets

TargetDescriptionExample Usage
testRun all testsmake test
test-serverRun server testsmake test-server
test-pluginRun plugin testsmake test-plugin

For a complete list of available targets, run:

make help

Installation

  1. Build the plugin:

    make build-plugin
    
  2. Copy the built plugin to your Ghidra plugins directory:

    cp zig-out/lib/libghidra-mcp-zig.dylib /path/to/ghidra/Extensions/Ghidra/ghidra-mcp-zig/
    
  3. Restart Ghidra

Usage

  1. Start Ghidra and open a program for analysis
  2. The MCP plugin will be available in the Ghidra plugin manager
  3. Use the plugin's features through the Ghidra interface

Available MCP Commands

CommandDescriptionParameters
decompileDecompile a functionaddress: u64
rename_functionRename a functionaddress: u64, new_name: string
rename_dataRename a data objectaddress: u64, new_name: string
list_functionsList all functionsNone
list_dataList all data objectsNone
list_importsList all importsNone
list_exportsList all exportsNone

Error Handling

The implementation includes comprehensive error handling with specific error types:

Error TypeDescription
ConnectionErrorConnection-related errors
MessageErrorMessage handling errors
ResponseErrorResponse parsing errors
InvalidAddressInvalid memory address
InvalidFunctionInvalid function reference
InvalidDataInvalid data reference
DecompilationFailedFunction decompilation failed
RenameFailedRename operation failed
OutOfMemoryMemory allocation failed
InvalidProgramInvalid program state
JNIErrorJNI bridge errors

Development

Adding New Features

  1. Update the JNI interface in src/plugin/jni/bridge.zig
  2. Implement the corresponding functionality in src/plugin/analysis.zig
  3. Update the server implementation in src/server/main.zig if needed
  4. Rebuild and test

Debugging

  • Use make clean to remove build artifacts
  • Check the Ghidra log for plugin-related messages
  • The server logs will be available in the console when running with make run-server

JNI Bridge Implementation

The JNI bridge provides a type-safe interface between Zig and Java:

  • Memory management with proper allocation/deallocation
  • JNI reference management with DeleteLocalRef
  • Error handling with null checks
  • Type conversion between Zig and Java types
  • Array creation and element setting
  • Object creation and field setting

Key Features

  1. Memory Safety

    • Automatic cleanup of JNI references
    • Proper string handling with UTF-8 conversion
    • Safe memory allocation and deallocation
  2. Type Safety

    • Strong typing for all JNI operations
    • Compile-time type checking
    • Safe type conversions
  3. Error Handling

    • Comprehensive error types
    • Null checks for all JNI operations
    • Proper cleanup on error
  4. Object Management

    • Safe object creation and destruction
    • Field access with type checking
    • Array handling with bounds checking

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Ghidra MCP Zig Plugin from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/ghidra-mcp-zig)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools