GhidrAssist (Ghidra) MCP server

Integrates with Ghidra's analysis framework to provide binary reverse engineering capabilities including function decompilation, disassembly, cross-reference analysis, symbol management, and program structure exploration for malware analysis, vulnerability research, and legacy code understanding.
Back to servers
Setup instructions
Provider
Jason Tang
Release date
Jul 10, 2025
Language
Java
Stats
252 stars

GhidrAssistMCP is a Ghidra extension that provides a Model Context Protocol (MCP) server, enabling AI assistants and other tools to interact with Ghidra's reverse engineering capabilities through a standardized API. With 31 built-in tools, it bridges the gap between AI-powered analysis tools and Ghidra's comprehensive reverse engineering platform.

Installation

Prerequisites

  • Ghidra 11.4+ (tested with Ghidra 11.4 Public)
  • An MCP Client (Like GhidrAssist)

Installing from Binary Release

  1. Download the latest release:

    • Go to the Releases page
    • Download the latest .zip file (e.g., GhidrAssistMCP-v1.0.0.zip)
  2. Install the extension:

    • In Ghidra: File → Install Extensions → Add Extension
    • Select the downloaded ZIP file
    • Restart Ghidra when prompted
  3. Enable the plugin:

    • File → Configure → Configure Plugins
    • Search for "GhidrAssistMCP"
    • Check the box to enable the plugin

Configuration

Initial Setup

  1. Open the Control Panel:

    • Navigate to Window → GhidrAssistMCP (or use the toolbar icon)
  2. Configure Server Settings:

    • Host: Default is localhost
    • Port: Default is 8080
    • Enable/Disable: Toggle the MCP server on/off

Tool Management

The Configuration tab allows you to:

  • View all available tools
  • Enable/disable individual tools using checkboxes
  • Save configuration to persist across sessions
  • Monitor tool status in real-time

Available Tools

Program Analysis

  • get_program_info - Get basic program information
  • list_functions - List all functions in the program
  • list_data - List data definitions
  • list_strings - List string references
  • list_imports - List imported functions
  • list_exports - List exported functions
  • list_segments - List memory segments
  • list_namespaces - List namespaces
  • list_classes - List class definitions
  • list_methods - List method definitions

Function Analysis

  • get_function_info - Get detailed function information
  • get_class_info - Get detailed class information
  • get_function_by_address - Find function at specific address
  • get_current_function - Get function at cursor position
  • decompile_function - Decompile function to C-like code
  • disassemble_function - Get assembly disassembly
  • search_functions - Search functions by name pattern
  • search_classes - Search classes by name pattern
  • function_xrefs - Get function cross-references

Location & Navigation

  • get_current_address - Get current cursor address
  • xrefs_to - Find references to an address
  • xrefs_from - Find references from an address

Modification Tools

  • rename_function - Rename functions
  • rename_function_by_address - Rename function at specific address
  • rename_variable - Rename variables
  • rename_data - Rename data definitions
  • set_function_prototype - Set function signatures
  • set_local_variable_type - Set variable data types
  • set_disassembly_comment - Add disassembly comments
  • set_decompiler_comment - Add decompiler comments

Advanced Analysis

  • auto_create_struct - Automatically create structures from variable usage patterns

Usage Examples

Basic Program Information

{
  "method": "tools/call",
  "params": {
    "name": "get_program_info"
  }
}

Function Analysis

{
  "method": "tools/call",
  "params": {
    "name": "get_function_info",
    "arguments": {
      "function_name": "main"
    }
  }
}

Decompilation

{
  "method": "tools/call",
  "params": {
    "name": "decompile_function",
    "arguments": {
      "function_name": "encrypt_data"
    }
  }
}

Structure Creation

{
  "method": "tools/call",
  "params": {
    "name": "auto_create_struct",
    "arguments": {
      "function_identifier": "0x00401000",
      "variable_name": "ctx"
    }
  }
}

Setting Function Prototype

{
  "method": "tools/call",
  "params": {
    "name": "set_function_prototype",
    "arguments": {
      "function_address": "0x00401000",
      "prototype": "int main(int argc, char** argv)"
    }
  }
}

Troubleshooting

Common Issues

Server Won't Start

  • Check if port 8080 is available
  • Verify Ghidra installation path
  • Examine console logs for errors

Tools Not Appearing

  • Ensure plugin is enabled
  • Check Configuration tab for tool status
  • Verify backend initialization in logs

MCP Client Connection Issues

  • Confirm server is running (check GhidrAssistMCP window)
  • Test connection: curl http://localhost:8080/sse
  • Check firewall settings

Tool Execution Failures

  • Verify program is loaded in Ghidra
  • Check tool parameters are correct
  • Review error messages in Log tab

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "ghidrassist" '{"command":"npx","args":["-y","ghidrassistmcp"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "ghidrassist": {
            "command": "npx",
            "args": [
                "-y",
                "ghidrassistmcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "ghidrassist": {
            "command": "npx",
            "args": [
                "-y",
                "ghidrassistmcp"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later