mirror of
https://github.com/siemens-mobile-hacks/GhidraMCP.git
synced 2026-11-25 15:47:14 +00:00
MCP Server for Ghidra
|
|
||
|---|---|---|
| .github/workflows | ||
| ghidra_scripts | ||
| images | ||
| lib | ||
| src | ||
| tests/e2e | ||
| .gitignore | ||
| build.sh | ||
| install.sh | ||
| LICENSE | ||
| pom.xml | ||
| README.md | ||
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
- Download the zip from Releases
and install it with
File→Install Extensions. Restart Ghidra. - In the project window, enable
GhidraMCPServerPlugininFile→Configure→Developer. - 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 infolist_project_files— list filescreate_project_folder— create a folderrename_project_file— rename a file or foldermove_project_file— move a file or folderdelete_project_file— delete a file or folderlist_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 programsget_current_program— current programget_program_info— processor, memory, formatopen_program— open a programclose_program— close a programsave_program— save a programimport_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-analysisget_analysis_status— analysis progresscancel_analysis— stop analysislist_analyzers— list analyzersset_analyzer_options— configure analyzers
Functions
list_functions— list functionsget_function— function detailsget_current_function— function under the cursorget_current_address— address under the cursorget_adjacent_function— next or previous functiondecompile_function— C codedisassemble_function— assemblycreate_function— create a functiondelete_function— delete a functionrename_function— rename a functionbatch_rename_functions— rename many functionsset_function_prototype— set the signatureset_function_comment— set the commentlist_function_variables— list variablesupdate_variable— rename or retype a variable
Code
disassemble_code— disassemble bytes (ARM/Thumb)get_listing— listing of an address rangeget_xrefs_to— references to an addressget_xrefs_from— references from an addressget_callers— callersget_callees— calleesget_call_graph— call graphget_data_flow— where a value comes from or goessearch_scalars— find a constantcreate_instruction_pattern— pattern from instructionssearch_instruction_pattern— find a pattern
Symbols and comments
list_symbols— list symbolslist_namespaces— list namespaceslist_imports— list importslist_exports— list exportscreate_label— create a labelrename_symbol— rename a symboldelete_symbol— delete a labelset_primary_symbol— set the primary labelget_comments— read commentsset_comment— set a commentbatch_set_comments— set many comments
Data
list_data_items— list dataget_data_at— data at an addresslist_strings— list stringsapply_data_type— apply a typedefine_data_batch— define many data itemsupdate_data— change dataclear_data— clear data
Data types
list_data_types— list typesget_data_type— type detailscreate_struct— create a structurecreate_union— create a unioncreate_enum— create an enumcreate_typedef— create a typedefparse_c_types— add types from C codeadd_struct_field— add a fieldupdate_struct_field— change a fielddelete_struct_field— delete a fieldupdate_enum— change an enumdelete_data_type— delete a type
Memory
list_segments— memory mapread_bytes— read byteswrite_bytes— write bytessearch_memory— search memory
Scripts
list_scripts— list scriptsrun_script— run a script
Server
get_server_info— server infoshutdown_ghidra— exit Ghidra
Build
./build.sh && ./install.sh