MCP Server for Ghidra
Find a file
Kirill Zhumarin c5359fc744
Some checks failed
Build / build (push) Failing after 3m8s
Rewrite README
2026-11-24 15:24:41 +03:00
.github/workflows Publish a GitHub Release with the extension zip for tags 2026-11-24 01:52:03 +03:00
ghidra_scripts Serve MCP natively and add project, analysis and editing tools 2026-11-24 01:18:33 +03:00
images Add files via upload 2025-03-24 21:44:48 -07:00
lib Improved build instructions 2025-03-30 23:54:46 +02:00
src Fix error dialog when looking up script bundles 2026-11-24 10:56:03 +03:00
tests/e2e import_file: add block_name, file_offset and length for Raw Binary 2026-11-24 10:36:49 +03:00
.gitignore Serve MCP natively and add project, analysis and editing tools 2026-11-24 01:18:33 +03:00
build.sh Build CI against Ghidra 12 via build.sh 2026-11-24 01:34:08 +03:00
install.sh Serve MCP natively and add project, analysis and editing tools 2026-11-24 01:18:33 +03:00
LICENSE Initial commit 2025-03-22 22:36:55 -07:00
pom.xml Build CI against Ghidra 12 via build.sh 2026-11-24 01:34:08 +03:00
README.md Rewrite README 2026-11-24 15:24:41 +03:00

License Release

GhidraMCP

Ghidra plugin that lets AI agents (Claude Code, Codex and other MCP clients) work in your Ghidra project.

Based on GhidraMCP by LaurieWired ❤️

Battle tested

We use GhidraMCP to reverse engineer Siemens mobile phone firmware.

Install

  1. Download the zip from Releases and install it with File → Install Extensions. Restart Ghidra.
  2. In the project window, enable GhidraMCPServerPlugin in File → Configure → Developer.
  3. Add the server to your client:
claude mcp add --scope user --transport http ghidra http://127.0.0.1:8080/mcp
codex mcp add ghidra --url http://127.0.0.1:8080/mcp

Headless:

analyzeHeadless <projectDir> <projectName> -process <file> -postScript StartGhidraMcpServer.java

Tools

Tools work on the current program. Pass program to pick another open one.

Project

  • get_project — project info
  • list_project_files — list files
  • create_project_folder — create a folder
  • rename_project_file — rename a file or folder
  • move_project_file — move a file or folder
  • delete_project_file — delete a file or folder
  • list_recent_projects — recent projects (GUI)
  • open_project — open a project (GUI)
  • close_project — close the project (GUI)
  • create_project — create a project (GUI)

Programs

  • list_open_programs — open programs
  • get_current_program — current program
  • get_program_info — processor, memory, format
  • open_program — open a program
  • close_program — close a program
  • save_program — save a program
  • import_file — import a file (File → Import File)
  • add_to_program — add a file as a memory block (File → Add To Program)

Analysis

  • analyze_program — run auto-analysis
  • get_analysis_status — analysis progress
  • cancel_analysis — stop analysis
  • list_analyzers — list analyzers
  • set_analyzer_options — configure analyzers

Functions

  • list_functions — list functions
  • get_function — function details
  • get_current_function — function under the cursor
  • get_current_address — address under the cursor
  • get_adjacent_function — next or previous function
  • decompile_function — C code
  • disassemble_function — assembly
  • create_function — create a function
  • delete_function — delete a function
  • rename_function — rename a function
  • batch_rename_functions — rename many functions
  • set_function_prototype — set the signature
  • set_function_comment — set the comment
  • list_function_variables — list variables
  • update_variable — rename or retype a variable

Code

  • disassemble_code — disassemble bytes (ARM/Thumb)
  • get_listing — listing of an address range
  • get_xrefs_to — references to an address
  • get_xrefs_from — references from an address
  • get_callers — callers
  • get_callees — callees
  • get_call_graph — call graph
  • get_data_flow — where a value comes from or goes
  • search_scalars — find a constant
  • create_instruction_pattern — pattern from instructions
  • search_instruction_pattern — find a pattern

Symbols and comments

  • list_symbols — list symbols
  • list_namespaces — list namespaces
  • list_imports — list imports
  • list_exports — list exports
  • create_label — create a label
  • rename_symbol — rename a symbol
  • delete_symbol — delete a label
  • set_primary_symbol — set the primary label
  • get_comments — read comments
  • set_comment — set a comment
  • batch_set_comments — set many comments

Data

  • list_data_items — list data
  • get_data_at — data at an address
  • list_strings — list strings
  • apply_data_type — apply a type
  • define_data_batch — define many data items
  • update_data — change data
  • clear_data — clear data

Data types

  • list_data_types — list types
  • get_data_type — type details
  • create_struct — create a structure
  • create_union — create a union
  • create_enum — create an enum
  • create_typedef — create a typedef
  • parse_c_types — add types from C code
  • add_struct_field — add a field
  • update_struct_field — change a field
  • delete_struct_field — delete a field
  • update_enum — change an enum
  • delete_data_type — delete a type

Memory

  • list_segments — memory map
  • read_bytes — read bytes
  • write_bytes — write bytes
  • search_memory — search memory

Scripts

  • list_scripts — list scripts
  • run_script — run a script

Server

  • get_server_info — server info
  • shutdown_ghidra — exit Ghidra

Build

./build.sh && ./install.sh

License

Apache License 2.0