themixednuts/ghidramcp/ghidra-mcp
Claude Code and agent skill by themixednuts/ghidramcp
- community
Checking that the SKILL.md file is still in the repository.
Reverse engineering with Ghidra via MCP. Use when analyzing binaries, decompiling code, managing functions/symbols/data types, or performing any Ghidra-related reverse engineering task.
Install
npx vskill@latest install themixednuts/ghidramcp/ghidra-mcpSKILL.md
Ghidra MCP Skill
This skill enables reverse engineering workflows using Ghidra through the Model Context Protocol (MCP).
Quick Start
- List available programs: read the
ghidra://programsresource - Read functions: use
functionswithaction: "list"and filters to find targets - Decompile: use
inspectwithaction: "decompile"for C-like output - Analyze references: use
inspectwithaction: "references_to"or"references_from"
Core Workflows
Analyzing a New Binary
- Read
ghidra://programsto confirm the binary is loaded - Use
functionswithaction: "list"to get compact function rows - Use
inspectwithaction: "decompile"on interesting functions
- For a known token in a large function, pass
search_textand follow
next_match_offset. Omit search_text and use start_line to read a source window. Pass the returned decompilation_id on either follow-up path to reuse the completed result.
- When the function is unknown, use
inspectwithaction: "search_code"and
search_text. Follow next_cursor until complete is true.
- Use
inspectreference actions to understand how functions/data are used - Use
symbols/functionsupdate actions to rename symbols and variables
Understanding a Function
functionswithaction: "get"andname,address, orsymbol_idinspectwithaction: "decompile"to see decompiled C codefunctionswithaction: "list_variables"to see stable variable targetsanalyzewithaction: "graph"to see control flowinspectwithaction: "references_to"to find callers
Defining Data Structures
data_typeswithaction: "list"to check existing typesdata_typeswithaction: "create"anddata_type_kind: "struct"to create structures- Add fields with proper offsets and types
- Use
data_typeswithaction: "update"to modify existing types - Use
memorywithaction: "map_data_type"to apply the type at an address and inspect the bounded byte-to-field mapping
Searching for Patterns
memorywithaction: "search"andsearch_type: "string"for string literalsmemorywithaction: "search"andsearch_type: "hex"for byte patternsmemorywithaction: "search"andsearch_type: "regex"for complex patterns- Follow up with
inspectreference actions on interesting addresses
MCP Result Handling
When a programmable MCP host hands a tool result to the model, pass {isError, result: structuredContent ?? content}. Keep the full tool result for the host UI or logs. This selects one response representation for model context while the server retains the text fallback for compatible MCP clients.
For Codex functions.exec, project the nested MCP result before emitting it:
Bulk Operations
Use batch_operations to execute multiple changes atomically:
- Rename multiple symbols
- Create multiple data types
- All operations succeed or all are rolled back
Tool Categories
Read Operations (No Modifications)
| Tool | Purpose | |
|---|---|---|
ghidra://programs | List all programs in the project | |
functions | List/get/create/update functions and variables | |
symbols | List/get/create/update symbols, labels, namespaces, classes | |
data_types | List/get/create/update data types | |
memory | List/search memory, read/write bytes, and map data types | |
inspect | Listing, decompile, code search, and references | |
analyze | Demangle, RTTI, graph, and call graph | |
debugger | Trace RMI connect/launch, target control, trace model discovery, memory/register/watch operations, mappings, remote methods, emulation, and navigation | |
project | Analysis options, analysis run, save, navigation, image-base rebasing, undo/redo |
Write Operations (Modify Program)
| Tool | Purpose | |
|---|---|---|
functions | Create functions, update prototypes, rename/retype variables | |
symbols | Create/rename labels and symbols | |
data_types | Create/update structs, enums, unions | |
memory | Write bytes, undefine code, apply/map data types, apply vtables | |
annotate | Comments and bookmarks | |
debugger | Connect/launch debuggers, control targets, write target or trace memory, apply mappings, manage breakpoints/watchpoints, write registers, update watches, and run emulation |
Delete Operations
| Tool | Purpose | |
|---|---|---|
delete | Remove functions, symbols, data types, or bookmarks |
Utility Operations
| Tool | Purpose | |
|---|---|---|
batch_operations | Execute multiple operations atomically | |
project | Rebase image bases and undo/redo changes | |
analyze | Demangle symbols and analyze RTTI |
Debugger Control
Use debugger for the full Ghidra debugger lifecycle. Start with {"action": "status"} and {"action": "list_connections"} to see whether a trace/target is already active. If not, use list_launchers with file_name, then launch with the selected launcher_index or launcher_name.
After launch or attach, use list_traces, list_targets, activate_trace, activate_target, list_threads, list_stack, list_snapshots, and list_objects to discover the trace model, then activate_thread, activate_frame, activate_snap, activate_time, or activate_object to select the active debugger context. Use list_modules, list_sections, or list_memory_regions followed by apply_mapping with mapping_kind: "module", "section", or "region" and file_name to map the running target back to the static analyzed Program.
Prefer structured actions such as resume, interrupt, step_over, detach, kill, read_memory, write_memory, set_breakpoint, set_watchpoint, read_registers, list_watches, and map_data_type; use execute for raw debugger-console commands. Use list_remote_methods and invoke_remote_method when the Trace RMI backend exposes a capability that does not yet have a structured action.
Use read_memory for live target bytes; it refreshes the trace from the target by default when a live target is selected. Use read_trace_bytes and write_trace_bytes only when you intentionally want cached trace bytes without touching the target. Use get_memory_state/set_memory_state to reason about known, unknown, or error byte state.
debugger.map_data_type applies a data type in the current trace view and returns a bounded byte-to-field mapping. list_registers, read_registers, and list_watches use max_registers/max_watches plus next_cursor pagination. Broad debugger discovery actions use page_size plus next_cursor.
Common Patterns
Pagination
Most broad read operations are intentionally bounded. Start with an explicit limit such as page_size, max_lines, or max_results, then pass the response next_cursor back as cursor to get the next page. Keep the same filters and target arguments while paging.
UI Synchronization
Focused CodeBrowser operations also update the user's active Ghidra UI when the server is running inside a tool with navigation services. inspect.decompile, inspect.listing, functions.get, functions.create, functions.update_prototype, memory.define, memory.map_data_type, project.go_to_address, and focused debugger actions navigate to the resolved function or address automatically; the structured response payload stays unchanged.
Identifying Targets
Tools accept multiple ways to identify targets:
- By address:
"address": "0x401000" - By name:
"name": "main" - By ID:
"symbol_id": 12345or"variable_symbol_id": "12345"
Address Formats
Addresses can be specified as:
- Hex with prefix:
"0x401000" - Hex without prefix:
"401000" - Image-base-relative offset:
"+0x401000"or"+401000" - Module-prefixed image-base-relative offset:
"NewWorld+0x401000"
Tips
- Start broad, then narrow: Use list operations first, then read specific items
- Use filtering: Most list operations support
name_patternregex filters - Check before modifying: Read the current state before making changes
- Use batch for related changes: Group related modifications in
batch_operations - Undo mistakes: Use
projectwithaction: "undo"if something goes wrong
Reference
See references/TOOLS.md for detailed documentation of each tool's operations and parameters.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/ghidra-mcp/SKILL.md
Popularity
- Repository stars
- 45
- Repository forks
- 9
- 7-day trend score
- 19
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 27 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/themixednuts/ghidramcp/ghidra-mcp)