# GhidraMCP

MCP Server for Ghidra

- **Kind:** MCP server
- **Owner:** LaurieWired
- **Source:** https://github.com/LaurieWired/GhidraMCP
- **Version:** 1.0-SNAPSHOT
- **Runtime:** jvm
- **License:** Apache-2.0
- **Transports:** stdio, sse
- **Pinned commit:** `27f316f80139e2d5dec882519a1bdf4aa46ac04c`
- **Page:** https://forefy.com/mcps/6edf25bf-599e-58a4-b5e2-b7a2f276e833
- **API (JSON):** https://forefy.com/api/asr/mcps/6edf25bf-599e-58a4-b5e2-b7a2f276e833

## Install

Ask your agent: `Install the GhidraMCP MCP server securely from: https://forefy.com/mcps/6edf25bf-599e-58a4-b5e2-b7a2f276e833 and register it with my agent`

## Tools (27)

- `list_methods`: List all function names in the program with pagination.
- `list_classes`: List all namespace/class names in the program with pagination.
- `decompile_function`: Decompile a specific function by name and return the decompiled C code.
- `rename_function`: Rename a function by its current name to a new user-defined name.
- `rename_data`: Rename a data label at the specified address.
- `list_segments`: List all memory segments in the program with pagination.
- `list_imports`: List imported symbols in the program with pagination.
- `list_exports`: List exported functions/symbols with pagination.
- `list_namespaces`: List all non-global namespaces in the program with pagination.
- `list_data_items`: List defined data labels and their values with pagination.
- `search_functions_by_name`: Search for functions whose name contains the given substring.
- `rename_variable`: Rename a local variable within a function.
- `get_function_by_address`: Get a function by its address.
- `get_current_address`: Get the address currently selected by the user.
- `get_current_function`: Get the function currently selected by the user.
- `list_functions`: List all functions in the database.
- `decompile_function_by_address`: Decompile a function at the given address.
- `disassemble_function`: Get assembly code (address: instruction; comment) for a function.
- `set_decompiler_comment`: Set a comment for a given address in the function pseudocode.
- `set_disassembly_comment`: Set a comment for a given address in the function disassembly.
- `rename_function_by_address`: Rename a function by its address.
- `set_function_prototype`: Set a function's prototype.
- `set_local_variable_type`: Set a local variable's type.
- `get_xrefs_to`: Get all references to the specified address (xref to). Args: address: Target address in hex format (e.g. "0x1400010a0") offset: Pagination offset (default: 0)…
- `get_xrefs_from`: Get all references from the specified address (xref from). Args: address: Source address in hex format (e.g. "0x1400010a0") offset: Pagination offset (default:…
- `get_function_xrefs`: Get all references to the specified function by name. Args: name: Function name to search for offset: Pagination offset (default: 0) limit: Maximum number of r…
- `list_strings`: List all defined strings in the program with their addresses. Args: offset: Pagination offset (default: 0) limit: Maximum number of strings to return (default:…

