Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Ghidra MCP ServerDecompile the function at 0x140001000 and suggest a descriptive name."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Ghidra MCP Server
If you find this useful, please ⭐ star the repo — it helps others discover it!
A production-ready Model Context Protocol (MCP) server that bridges Ghidra's powerful reverse engineering capabilities with modern AI tools and automation frameworks. 193 MCP tools, battle-tested AI workflows, and the most comprehensive Ghidra-MCP integration available.
Why Ghidra MCP?
Most Ghidra MCP implementations give you a handful of read-only tools and call it a day. This project is different — it was built by a reverse engineer who uses it daily on real binaries, not as a demo.
193 MCP tools — 3x more than any competing implementation. Not just read operations — full write access for renaming, typing, commenting, structure creation, and script execution.
Battle-tested AI workflows — Proven documentation workflows (V5) refined across hundreds of functions. Includes step-by-step prompts, Hungarian notation reference, batch processing guides, and orphaned code discovery.
Production-grade reliability — Atomic transactions, batch operations (93% API call reduction), configurable timeouts, and graceful error handling. No silent failures.
Cross-binary documentation transfer — SHA-256 function hash matching propagates documentation across binary versions automatically. Document once, apply everywhere.
Full Ghidra Server integration — Connect to shared Ghidra servers, manage repositories, version control, checkout/checkin workflows, and multi-user collaboration.
Headless and GUI modes — Run with or without the Ghidra GUI. Docker-ready for CI/CD pipelines and automated analysis at scale.
🌟 Features
Core MCP Integration
Full MCP Compatibility — Complete implementation of Model Context Protocol
193 MCP Tools — Comprehensive API surface covering every aspect of binary analysis
Production-Ready Reliability — Atomic transactions, batch operations, configurable timeouts
Real-time Analysis — Live integration with Ghidra's analysis engine
Binary Analysis Capabilities
Function Analysis — Decompilation, call graphs, cross-references, completeness scoring
Data Structure Discovery — Struct/union/enum creation with field analysis and naming suggestions
String Extraction — Regex search, quality filtering, and string-anchored function discovery
Import/Export Analysis — Symbol tables, external locations, ordinal import resolution
Memory & Data Inspection — Raw memory reads, byte pattern search, array boundary detection
Cross-Binary Documentation — Function hash matching and documentation propagation across versions
AI-Powered Reverse Engineering Workflows
Function Documentation Workflow V5 — 7-step process for complete function documentation with Hungarian notation, type auditing, and automated verification scoring
Batch Documentation — Parallel subagent dispatch for documenting multiple functions simultaneously
Orphaned Code Discovery — Automated scanner finds undiscovered functions in gaps between known code
Data Type Investigation — Systematic workflows for structure discovery and field analysis
Cross-Version Matching — Hash-based function matching across different binary versions
Development & Automation
Ghidra Script Management — Create, run, update, and delete Ghidra scripts entirely via MCP
Multi-Program Support — Switch between and compare multiple open programs
Batch Operations — Bulk renaming, commenting, typing, and label management (93% fewer API calls)
Headless Server — Full analysis without Ghidra GUI — Docker and CI/CD ready
Project & Version Control — Create projects, manage files, Ghidra Server integration
Analysis Control — List, configure, and trigger Ghidra analyzers programmatically
🚀 Quick Start
Prerequisites
Java 21 LTS (OpenJDK recommended)
Apache Maven 3.9+
Ghidra 12.0.3 (or compatible version)
Python 3.8+ with pip
Installation
Recommended for Windows: use
mcp4ghidra-setup.ps1as the primary entry point. It handles prerequisite setup + build + deployment in one command.Important:
-SetupDepsinstalls Maven/Ghidra JAR dependencies only.-Deployis the end-user command and (by default) also ensures Python requirements before build/deploy.
Clone the repository:
git clone https://github.com/bethington/ghidra-mcp.git cd ghidra-mcpRecommended: run environment preflight first:
.\mcp4ghidra-setup.ps1 -Preflight -GhidraPath "C:\ghidra_12.0.3_PUBLIC"Build and deploy to Ghidra (single command):
.\mcp4ghidra-setup.ps1 -Deploy -GhidraPath "C:\ghidra_12.0.3_PUBLIC"Optional strict/manual mode (advanced):
# Skip automatic prerequisite setup .\mcp4ghidra-setup.ps1 -Deploy -NoAutoPrereqs -GhidraPath "C:\ghidra_12.0.3_PUBLIC"Show script help:
.\mcp4ghidra-setup.ps1 -Help # or Get-Help .\mcp4ghidra-setup.ps1 -DetailedOptional build-only mode (advanced/troubleshooting):
# Preferred: script-managed build-only .\mcp4ghidra-setup.ps1 -BuildOnly# Manual Maven build (requires Ghidra deps already installed in local .m2) mvn clean package assembly:single -DskipTests
Installation (Linux — Ubuntu/Debian)
Use
mcp4ghidra-setup.shas the primary entry point on Linux. It handles prerequisite setup, Maven dependency installation, building, and deployment.
Clone the repository:
git clone https://github.com/bethington/ghidra-mcp.git cd ghidra-mcpInstall system prerequisites (if not already installed):
sudo apt update && sudo apt install -y openjdk-21-jdk maven python3 python3-pip curl jq unzipRun environment preflight:
./mcp4ghidra-setup.sh --preflight --ghidra-path ~/ghidra_12.0.3_PUBLICBuild and deploy to Ghidra (single command):
./mcp4ghidra-setup.sh --deploy --ghidra-path ~/ghidra_12.0.3_PUBLICThis will:
Install Ghidra JAR dependencies into your local
~/.m2/repositoryBuild
GhidraMCP-<version>.zipwith MavenExtract the extension to
~/.config/ghidra/ghidra_<version>_PUBLIC/Extensions/Update
preferenceswithLastExtensionImportDirectoryInstall Python requirements
Optional: setup only Maven dependencies:
./mcp4ghidra-setup.sh --setup-deps --ghidra-path ~/ghidra_12.0.3_PUBLICShow script help:
./mcp4ghidra-setup.sh --help
Linux paths: The extension is installed to
$HOME/.config/ghidra/ghidra_<version>_PUBLIC/Extensions/GhidraMCP/. Ghidra config files are in$HOME/.config/ghidra/ghidra_<version>_PUBLIC/.
Additional helper scripts (Linux equivalents of the PowerShell utilities):
functions-extract.sh— Extract functions via Ghidra REST API (usescurl/jq)
functions-process.sh— Parallel function processing with Claude CLI
Basic Usage
Option 1: Stdio Transport (Recommended for AI tools)
python bridge_mcp_ghidra.pyOption 2: SSE Transport (Web/HTTP clients)
python bridge_mcp_ghidra.py --transport sse --mcp-host 127.0.0.1 --mcp-port 8081In Ghidra
Start Ghidra and open a CodeBrowser window
In CodeBrowser, enable the plugin via File > Configure > Configure All Plugins > GhidraMCP
Optional: configure custom port via CodeBrowser > Edit > Tool Options > GhidraMCP HTTP Server
Start the server via Tools > GhidraMCP > Start MCP Server
The server runs on
http://127.0.0.1:8089/by default
Verify It's Working
# Quick health check
curl http://127.0.0.1:8089/check_connection
# Expected: "Connected: GhidraMCP plugin running with program '<name>'"
# Get version info
curl http://127.0.0.1:8089/get_version❓ Troubleshooting
"GhidraMCP" menu not appearing in Tools
Cause: Plugin not enabled or installed incorrectly.
Solution:
Verify extension is installed: File > Install Extensions — GhidraMCP should be listed
Enable the plugin: File > Configure > Configure All Plugins > GhidraMCP (check the box)
Restart Ghidra after installation/enabling
Server not responding / Connection refused
Cause: Server not started or wrong port.
Solution:
Ensure you started the server: Tools > GhidraMCP > Start MCP Server
Check configured port: Edit > Tool Options > GhidraMCP HTTP Server
Check if port is in use:
# Linux/macOS lsof -i :8089 # Windows netstat -ano | findstr :8089Look for errors in Ghidra console: Window > Console
500 Internal Server Errors
Cause: Server-side exception, often due to missing program data.
Solution:
Ensure a binary is loaded in CodeBrowser
Run auto-analysis first: Analysis > Auto Analyze
Check Ghidra console (Window > Console) for Java exceptions
Some operations require fully analyzed binaries
404 Not Found Errors
Cause: Endpoint doesn't exist or wrong URL.
Solution:
Verify endpoint exists:
curl http://127.0.0.1:8089/get_versionCheck for typos in endpoint name
Ensure you're using correct HTTP method (GET vs POST)
Extension not appearing in Install Extensions
Cause: JAR file in wrong location.
Solution:
Manual install location:
~/.ghidra/ghidra_12.0.3_PUBLIC/Extensions/GhidraMCP/lib/GhidraMCP.jarOr use: File > Install Extensions > Add and select the ZIP file
Ensure JAR/ZIP was built for your Ghidra version
Build fails with "Ghidra dependencies not found"
Cause: Ghidra JARs not installed in local Maven repository.
Solution:
# Windows (recommended)
.\mcp4ghidra-setup.ps1 -SetupDeps -GhidraPath "C:\ghidra_12.0.3_PUBLIC"
# Or manual install (see install-ghidra-deps.sh)📊 Production Performance
MCP Tools: 184 tools fully implemented
Speed: Sub-second response for most operations
Efficiency: 93% reduction in API calls via batch operations
Reliability: Atomic transactions with all-or-nothing semantics
AI Workflows: Proven documentation prompts refined across hundreds of real functions
Deployment: Automated version-aware deployment script
🛠️ API Reference
Core Operations
check_connection- Verify MCP connectivityget_metadata- Program metadata and infoget_version- Server version informationget_function_count- Return total function count for a programget_entry_points- Binary entry points discoveryget_current_address- Get cursor address (GUI only)get_current_function- Get function at cursor (GUI only)get_current_selection- Get current selection context (address + function)read_memory- Read raw bytes from memorysave_program- Save the current programexit_ghidra- Save and exit Ghidra gracefully
Function Analysis
list_functions- List all functions (paginated)list_functions_enhanced- List with isThunk/isExternal flagslist_classes- List namespace/class names (paginated)search_functions_enhanced- Advanced function search with filtersdecompile_function- Decompile function to C pseudocodeforce_decompile- Force fresh decompilation (bypass cache)batch_decompile- Batch decompile multiple functionsget_function_callers- Get function callersget_function_callees- Get function calleesget_function_call_graph- Function relationship graphget_full_call_graph- Complete call graph for programget_function_signature- Get function prototype stringget_function_hash- SHA-256 hash of normalized function opcodesget_bulk_function_hashes- Paginated bulk hashing with filterget_function_jump_targets- Get jump target addresses from disassemblyget_function_metrics- Get complexity metrics for a functionget_function_xrefs- Get function cross-referencesanalyze_function_complete- Comprehensive function analysisanalyze_function_completeness- Documentation completeness scorebatch_analyze_completeness- Batch completeness analysis for multiple functionsfind_similar_functions_fuzzy- Fuzzy similarity matchingbulk_fuzzy_match- Bulk fuzzy match across all functionsdiff_functions- Diff two functions side by sidevalidate_function_prototype- Validate a function prototype stringcan_rename_at_address- Check if address can be renameddelete_function- Delete function at address
Memory & Data
list_segments- Memory segments and layoutlist_data_items- List defined data labels and values (paginated)list_data_items_by_xrefs- Data items sorted by xref countget_function_by_address- Function at addressdisassemble_function- Disassembly listingdisassemble_bytes- Raw byte disassemblyget_xrefs_to- Cross-references to addressget_xrefs_from- Cross-references from addressget_bulk_xrefs- Bulk cross-reference lookupanalyze_data_region- Analyze memory region structureinspect_memory_content- View raw memory contentdetect_array_bounds- Detect array boundariessearch_byte_patterns- Search for byte patternscreate_memory_block- Create a new memory block
Cross-Binary Documentation
get_function_documentation- Export complete function documentationapply_function_documentation- Import documentation to target functioncompare_programs_documentation- Compare documentation between programsbuild_function_hash_index- Build persistent JSON indexlookup_function_by_hash- Find matching functions in indexpropagate_documentation- Apply docs to all matching instances
Data Types & Structures
list_data_types- Available data typessearch_data_types- Search for data typesget_data_type_size- Get byte size of a data typeget_valid_data_types- Get list of valid Ghidra builtin typesget_struct_layout- Get detailed field layout of a structurevalidate_data_type- Validate data type syntaxvalidate_data_type_exists- Check if a data type existscreate_struct- Create custom structureadd_struct_field- Add field to structuremodify_struct_field- Modify existing fieldremove_struct_field- Remove field from structurecreate_enum- Create enumerationget_enum_values- Get enumeration valuescreate_array_type- Create array data typecreate_typedef- Create typedef aliascreate_union- Create union data typecreate_pointer_type- Create pointer data typeclone_data_type- Clone a data type with a new nameapply_data_type- Apply type to addressdelete_data_type- Delete a data typeconsolidate_duplicate_types- Merge duplicate typessuggest_field_names- AI-assisted field name suggestions for a structurecreate_data_type_category- Create a category folder in the type managermove_data_type_to_category- Move a type to a different categorylist_data_type_categories- List all data type categoriesimport_data_types- Import types from a GDT/header file
Symbols & Labels
list_imports- Imported symbols and librarieslist_exports- Exported symbols and functionslist_external_locations- External location referencesget_external_location- Specific external location detaillist_strings- Extracted strings with analysissearch_memory_strings- Search strings by regex/substring patternlist_namespaces- Available namespaceslist_globals- Global variablescreate_label- Create label at addressbatch_create_labels- Bulk label creationdelete_label- Delete label at addressbatch_delete_labels- Bulk label deletionrename_label- Rename existing labelrename_or_label- Rename or create label
Renaming & Documentation
rename_function- Rename function by namerename_function_by_address- Rename function by addressrename_data- Rename data itemrename_variables- Rename function variablesrename_global_variable- Rename global variablerename_external_location- Rename external referencebatch_rename_function_components- Bulk renamingset_decompiler_comment- Set decompiler commentset_disassembly_comment- Set disassembly commentset_plate_comment- Set function plate commentget_plate_comment- Get function plate commentbatch_set_comments- Bulk comment settingclear_function_comments- Clear all comments for a functionlist_bookmarks- List all bookmarksset_bookmark- Create or update a bookmarkdelete_bookmark- Delete a bookmark
Type System
set_function_prototype- Set function signatureset_local_variable_type- Set variable typeset_parameter_type- Set parameter typebatch_set_variable_types- Bulk type settingset_variable_storage- Control variable storage locationset_function_no_return- Mark function as non-returningclear_instruction_flow_override- Clear flow override on instructionlist_calling_conventions- Available calling conventionsget_function_variables- Get all function variablesget_function_labels- Get labels in function
Ghidra Script Management
list_scripts- List available scriptsrun_script- Run a scriptlist_ghidra_scripts- List custom Ghidra scriptssave_ghidra_script- Save new scriptget_ghidra_script- Get script contentsrun_ghidra_script- Execute Ghidra script by namerun_script_inline- Execute inline script codeupdate_ghidra_script- Update existing scriptdelete_ghidra_script- Delete script
Multi-Program Support
list_open_programs- List all open programsget_current_program_info- Current program detailsswitch_program- Switch active programlist_project_files- List project filesopen_program- Open program from project
Project Lifecycle
create_project- Create a new Ghidra projectopen_project- Open an existing projectclose_project- Close the current projectdelete_project- Delete a projectlist_projects- List Ghidra projects in a directory
Project Organization
create_folder- Create a folder in the project treemove_file- Move a domain file to another foldermove_folder- Move a folder to another locationdelete_file- Delete a domain file from the project
Analysis Tools
find_next_undefined_function- Find undefined functionsfind_undocumented_by_string- Find functions by string referencebatch_string_anchor_report- String anchor analysisget_assembly_context- Get assembly contextanalyze_struct_field_usage- Analyze structure field accessget_field_access_context- Get field access patternscreate_function- Create function at addressanalyze_control_flow- Cyclomatic complexity and loop detectionanalyze_call_graph- Build function call graphanalyze_api_call_chains- Detect API call threat patternsdetect_malware_behaviors- Detect malware behavior categoriesfind_anti_analysis_techniques- Find anti-analysis techniquesfind_dead_code- Detect unreachable codeextract_iocs_with_context- Extract IOCs from stringsapply_data_classification- Apply data classification to addresses
Analysis Control
list_analyzers- List all available Ghidra analyzersconfigure_analyzer- Enable/disable or configure an analyzerrun_analysis- Trigger Ghidra auto-analysis programmatically
Server Connection (Ghidra Server)
connect_server- Connect to a Ghidra Serverdisconnect_server- Disconnect from Ghidra Serverserver_status- Check server connection statuslist_repositories- List repositories on the servercreate_repository- Create a new repositorylist_repository_files- List files in a server repository folderget_repository_file- Get metadata for a file in a server repository
Version Control
checkout_file- Check out a file from version controlcheckin_file- Check in a file with a commentundo_checkout- Undo a checkout without committingadd_to_version_control- Add a file to version control
Version History
get_version_history- Get full version history for a fileget_checkouts- Get active checkout status
Admin
terminate_checkout- Forcibly terminate a user's checkoutlist_server_users- List all users on the Ghidra Serverset_user_permissions- Set a user's repository access level
Knowledge Database (bridge-only, requires PostgreSQL)
store_function_knowledge- Store documented function data to knowledge DBquery_knowledge_context- Search documented functions by keyword (ILIKE + tsvector)store_ordinal_mapping- Store ordinal-to-name mapping per binary versionget_ordinal_mapping- Look up known ordinal name by binary, version, ordinalexport_system_knowledge- Export documented functions as markdown by game system
See CHANGELOG.md for version history.
🏗️ Architecture
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ AI/Automation │◄──►│ MCP Bridge │◄──►│ Ghidra Plugin │
│ Tools │ │ (bridge_mcp_ │ │ (GhidraMCP.jar) │
│ (Claude, etc.) │ │ ghidra.py) │ │ │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ │ │
MCP Protocol HTTP REST Ghidra API
(stdio/SSE) (localhost:8089) (Program, Listing)Components
bridge_mcp_ghidra.py — Python MCP server that translates MCP protocol to HTTP calls (193 tools)
GhidraMCP.jar — Ghidra plugin that exposes analysis capabilities via HTTP (176 GUI endpoints)
MCP4GhidraHeadlessServer — Standalone headless server — 184 endpoints, no GUI required
ghidra_scripts/ — Collection of automation scripts for common tasks
🔧 Development
Building from Source
# Recommended: one command does setup + build + deploy
.\mcp4ghidra-setup.ps1 -Deploy -GhidraPath "C:\ghidra_12.0.3_PUBLIC"
# Optional: build only (no deploy)
.\mcp4ghidra-setup.ps1 -BuildOnly
# Version bump (updates all 7 project files atomically)
.\bump-version.ps1 -New X.Y.ZScript Command Reference
Primary actions (choose one):
-Deploy(default): auto-setup prereqs, build, deploy-SetupDeps: install Ghidra JARs into local.m2(Maven deps only; no Python package install)-BuildOnly: build artifacts only-Clean: remove build/cache artifacts and local Ghidra dependency folders in.m2for the active Ghidra version-Preflight: validate tools, paths, required Ghidra jars, and write access without making changes
Useful options:
-GhidraPath "C:\ghidra_12.0.3_PUBLIC"-GhidraVersion "12.0.3"-StrictPreflight-NoAutoPrereqs-SkipBuild-SkipRestart-DryRun-Force-Verbose-Help
Quick examples:
# Standard deploy (recommended)
.\mcp4ghidra-setup.ps1 -Deploy -GhidraPath "C:\ghidra_12.0.3_PUBLIC"
# First-time dependency setup only
.\mcp4ghidra-setup.ps1 -SetupDeps -GhidraPath "C:\ghidra_12.0.3_PUBLIC"
# Build only
.\mcp4ghidra-setup.ps1 -BuildOnly
# Preflight checks only
.\mcp4ghidra-setup.ps1 -Preflight -GhidraPath "C:\ghidra_12.0.3_PUBLIC"
# Strict preflight (fails on warnings)
.\mcp4ghidra-setup.ps1 -Preflight -StrictPreflight -GhidraPath "C:\ghidra_12.0.3_PUBLIC"
# Show command help
.\mcp4ghidra-setup.ps1 -HelpProject Structure
ghidra-mcp/
├── bridge_mcp_ghidra.py # MCP server (Python, 193 tools)
├── src/main/java/ # Ghidra plugin + headless server (Java)
│ └── com/xebyte/
│ ├── MCP4GhidraPlugin.java # GUI plugin (176 endpoints)
│ ├── headless/ # Headless server (184 endpoints)
│ └── core/ # Shared service layer (12 services)
├── ghidra_scripts/ # Automation scripts
├── tests/ # Python unit tests + endpoint catalog
│ ├── unit/ # Catalog consistency, schema, tool function tests
│ └── endpoints.json # Endpoint specification (191 entries)
├── docs/ # Documentation
│ ├── prompts/ # AI workflow prompts
│ ├── releases/ # Version release notes
│ └── project-management/ # Project docs
└── .github/workflows/ # CI/CD pipelinesLibrary Dependencies
Ghidra JARs must be installed into your local Maven repository (~/.m2/repository) before compilation.
This is a one-time setup per machine, and again when your Ghidra version changes.
-Deploy now installs these automatically by default.
The tool enforces version consistency between:
pom.xml(ghidra.version)-GhidraVersion(if provided)-GhidraPathversion segment (e.g.,ghidra_12.0.3_PUBLIC)
If these do not match, deployment fails fast with a clear error.
Troubleshooting: Version Mismatch
If you see a version mismatch error, align all three values:
pom.xml→ghidra.version-GhidraVersion(if used)-GhidraPathversion segment (ghidra_X.Y.Z_PUBLIC)
Then rerun:
.\mcp4ghidra-setup.ps1 -Deploy -GhidraPath "C:\ghidra_12.0.3_PUBLIC" -GhidraVersion "12.0.3"# Windows
.\mcp4ghidra-setup.ps1 -SetupDeps -GhidraPath "C:\path\to\ghidra_12.0.3_PUBLIC"
# Optional version override
.\mcp4ghidra-setup.ps1 -SetupDeps -GhidraPath "C:\path\to\ghidra_12.0.3_PUBLIC" -GhidraVersion "12.0.3"Required Libraries (14 JARs, ~37MB):
Library | Source Path | Purpose |
Base.jar |
| Core Ghidra functionality |
Decompiler.jar |
| Decompilation engine |
PDB.jar |
| Microsoft PDB symbol support |
FunctionID.jar |
| Function identification |
SoftwareModeling.jar |
| Program model API |
Project.jar |
| Project management |
Docking.jar |
| UI docking framework |
Generic.jar |
| Generic utilities |
Utility.jar |
| Core utilities |
Gui.jar |
| GUI components |
FileSystem.jar |
| File system support |
Graph.jar |
| Graph/call graph analysis |
DB.jar |
| Database operations |
Emulation.jar |
| P-code emulation |
Note: Libraries are NOT included in the repository (see
.gitignore). You must install them from your Ghidra installation before building.
Script roles:
mcp4ghidra-setup.ps1: unified automation script (-SetupDeps,-BuildOnly,-Deploy,-Clean)default
-Deploybehavior: auto-setup prerequisites, then build and deployuse
-NoAutoPrereqsfor strict/manual prerequisite management
Development Features
Automated Deployment: Version-aware deployment script
Batch Operations: Reduces API calls by 93%
Atomic Transactions: All-or-nothing semantics
Comprehensive Logging: Debug and trace capabilities
📚 Documentation
Core Documentation
Documentation Index - Complete documentation navigation
Project Structure - Project organization guide
Naming Conventions - Code naming standards
Hungarian Notation - Variable naming guide
AI Workflow Prompts
Function Documentation V5 — Primary workflow: 7-step process with Hungarian notation, type auditing, and verification scoring
Batch Documentation V5 — Parallel subagent dispatch for multi-function processing
Orphaned Code Discovery — Automated scanner for undiscovered functions
Data Type Investigation — Systematic structure discovery
Cross-Version Matching — Hash-based function matching
Quick Start Prompt — Simplified beginner workflow
All Prompts — Complete prompt index
Release History
Complete Changelog - All version release notes
Release Notes - Detailed release documentation
🐳 Headless Server (Docker)
GhidraMCP includes a headless server mode for automated analysis without the Ghidra GUI.
Quick Start with Docker
# Build and run
docker-compose up -d ghidra-mcp
# Test connection
curl http://localhost:8089/check_connection
# Connection OK - GhidraMCP Headless Server v4.3.0Headless API Workflow
# 1. Load a binary
curl -X POST -d "file=/data/program.exe" http://localhost:8089/load_program
# 2. Run auto-analysis (identifies functions, strings, data types)
curl -X POST http://localhost:8089/run_analysis
# 3. List discovered functions
curl "http://localhost:8089/list_functions?limit=20"
# 4. Decompile a function
curl "http://localhost:8089/decompile_function?address=0x401000"
# 5. Get metadata
curl http://localhost:8089/get_metadataKey Headless Endpoints
Endpoint | Method | Description |
| POST | Load binary file for analysis |
| POST | Run Ghidra auto-analysis |
| GET | List all discovered functions |
| GET | List exported symbols |
| GET | List imported symbols |
| GET | Decompile function to C code |
| POST | Create function at address |
| GET | Get program metadata |
| POST | Create a Ghidra project |
| GET | List available analyzers |
| GET | Check Ghidra Server connection |
Configuration
Environment variables for Docker:
GHIDRA_MCP_PORT- Server port (default: 8089)GHIDRA_MCP_BIND_ADDRESS- Bind address (default: 0.0.0.0 in Docker)JAVA_OPTS- JVM options (default: -Xmx4g -XX:+UseG1GC)
🤝 Contributing
See CONTRIBUTING.md for detailed contribution guidelines.
Quick Start
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Build and test your changes (
mvn clean package assembly:single -DskipTests)Update documentation as needed
Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
📄 License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
🏆 Production Status
Metric | Value |
Version | 4.3.0 |
MCP Tools | 193 fully implemented |
GUI Endpoints | 175 (MCP4GhidraPlugin) |
Headless Endpoints | 183 (MCP4GhidraHeadlessServer) |
Compilation | ✅ 100% success |
Batch Efficiency | 93% API call reduction |
AI Workflows | 7 proven documentation workflows |
Ghidra Scripts | Automation scripts included |
Documentation | Comprehensive with AI prompts |
See CHANGELOG.md for version history and release notes.
🙏 Acknowledgments
👥 Contributors
This project has benefited from the work of dedicated contributors:
Core Contributors
@heeen — Significant contributions including:
Fuzzy function matching and structured diff for cross-binary comparison (#13)
Script execution improvements and bug fixes (#12)
New API endpoints:
save_program,exit_ghidra,delete_function,create_memory_block,run_script_inline(#11)Architectural vision: annotation-driven design, UDS transport, Python bridge optimization proposals
Ghidra Team - For the incredible reverse engineering platform
Model Context Protocol - For the standardized AI integration framework
Contributors - For testing, feedback, and improvements
🔗 Related Projects
re-universe — Ghidra BSim PostgreSQL platform for large-scale binary similarity analysis. Pairs perfectly with GhidraMCP for AI-driven reverse engineering workflows.
cheat-engine-server-python — MCP server for dynamic memory analysis and debugging.
Ready for production deployment with enterprise-grade reliability and comprehensive binary analysis capabilities.
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.