rizin-mcp
The Rizin MCP server integrates Rizin, the RzGhidra/Ghidra decompiler, and Mandiant capa to provide binary analysis and reverse engineering capabilities for LLMs. You can:
Open and analyze binaries:
open_and_analyzeloads a file and runs automatic deep analysis (aaa), with session management viaclose_file.Detect capabilities:
run_capa_analysisidentifies behavioral capabilities mapped to MITRE ATT&CK/MBC, with background jobs, caching, andget_capa_statusfor status polling.Explore functions:
list_functionslists functions (name, address, size, optional keyword filter);decompile_functiondecompiles to C pseudocode;disassemble_functionshows assembly.Inspect binary info:
get_binary_inforetrieves headers, sections, imports, and exports;search_stringsfinds readable strings with query filtering.Analyze imports and resources:
search_importssearches imports by function/DLL keyword;find_import_callerslists call sites;list_resourcesandextract_resourcelist and extract PE resources, flagging potential embedded files.Cross-references:
get_xrefsfinds call dependencies and cross-references for functions or addresses.Run custom commands:
execute_rizin_commandexecutes read-only Rizin commands with pagination, blocking shell-escape, file open/switch, and write commands.
Click on "Deploy 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., "@rizin-mcp Analyze the binary at /tmp/sample.exe and list its functions"
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.
Rizin MCP Server
Rizin MCP Server is a server that integrates the Rizin reverse engineering tool, RzGhidra decompiler (pdg), and Mandiant capa behavioral capability identification with MCP (Model Context Protocol).
It empowers Large Language Models (such as Claude, GPT-4, Llama 3) to automatically open binary files, identify behavioral labels (MITRE ATT&CK / MBC), automatically extract program feature addresses, and directly perform C pseudocode decompilation and analysis.
Repository Structure
rizin-mcp/
├── src/
│ └── rizin_mcp/
│ ├── __init__.py
│ ├── server.py # Core logic for the MCP Server
│ └── rz_extractor.py # Efficient Rizin feature extractor (RizinFeatureExtractor)
├── examples/ # Standalone example/dev-time scripts (not part of the installed package)
│ └── client_proxy.py # Manual client proxy for multi-turn tool-calling tests
├── docker/ # Docker deployment configuration (Dockerfile, compose)
├── tests/ # Unit tests (pytest) and validation scripts
├── .gitignore # Git ignore configuration
├── LICENSE # MIT License
├── README.md # Project documentation
└── pyproject.toml # Project configuration and dependency management (uv / pip)Related MCP server: GhidraMCP
Quick Start
1. Installation and Preparation
Use uv for fast environment setup and dependency installation:
git clone https://github.com/kd992102/rizin-mcp.git
cd rizin-mcp
uv sync2. Start MCP Server
You can start the MCP Server directly via the package CLI or as a module:
uv run python -m rizin_mcp.serverTesting and Integration
A. Testing with Anthropic's Official Web UI (MCP Inspector)
npx @modelcontextprotocol/inspector uv run python -m rizin_mcp.serverAfter executing, open http://localhost:6274 in your browser to test, view analysis logs, and inspect C decompiled code on the web interface.
B. Integrating with Claude Desktop
Add the following to %APPDATA%\Claude\claude_desktop_config.json:
{
"mcpServers": {
"rizin-analyzer": {
"command": "uv",
"args": [
"--directory",
"C:\\path\\to\\rizin-mcp",
"run",
"python",
"-m",
"rizin_mcp.server"
]
}
}
}C. Deployment using Docker (Headless Mode)
This project supports encapsulating the server in a Docker container for execution:
docker compose -f docker/docker-compose.yml up -dProvided MCP Tools
Tool Name | Description |
| Open a binary file and perform automatic analysis ( |
| Use Mandiant capa against capa-rules to identify binary capabilities and feature addresses. Runs as a background job (returns a |
| Poll a background |
| List all function names, addresses, and sizes (supports keyword filtering). |
| Call RzGhidra (pdg) to decompile a specific address/function into C code (Ghidra's |
| Get the assembly disassembly for a specific function. |
| Get architectural information such as Headers, Sections, Imports, and Exports. |
| List every entry in the PE resource table (.rsrc), flagging when a resource's declared type doesn't match its actual content (magic bytes) - a strong signal for embedded/disguised files. |
| Extract the raw bytes of a specific PE resource by type + ID, base64-encoded. |
| Search the import table by function name and/or DLL keyword, returning structured JSON. |
| Search for readable strings present in the binary file. |
| Find cross-references/call dependencies for a function or address. |
| Given an imported function name, list every call site and the function it belongs to, in one call. |
| Execute custom, read-only Rizin commands (e.g., |
| Safely close the currently opened file and session. |
Acknowledgments
This project relies heavily on the excellent work of the open-source community. We would like to express our gratitude to the following projects:
Mandiant capa: For their powerful automated malware capability detection engine and comprehensive capa-rules.
Rizin: For providing an extremely fast and robust binary analysis framework.
rz-ghidra: For bringing the formidable Ghidra decompiler to the Rizin ecosystem.
License
This project is licensed under the MIT License.
Available Tools
10 toolsclose_fileA
Close the currently opened binary file and Rizin Session.
Inputs: no named parameters. Returns: result
decompile_functionA
Use the Ghidra decompiler to decompile a specified memory address (e.g., 0x140001000) or function name (e.g., fcn.140001000, main) into C pseudocode.
Inputs: address_or_name (required). Returns: result
disassemble_functionB
Get the assembly disassembly output for a specified function/address.
Inputs: address_or_name (required). Returns: result
execute_rizin_commandA
[High Privilege Tool] Execute custom commands directly in Rizin (e.g., px 64 @ 0x140001000, afl, etc.).
Inputs: command (required). Returns: result
get_binary_infoA
Get detailed architectural information of the current binary file, including Headers, Sections, Imports, Exports, etc.
Inputs: no named parameters. Returns: result
get_xrefsA
Find and analyze cross-references (Xrefs) and call dependencies for a specified function or address. Supports passing an address/name or global query, returning format includes [{'type': 'CALL', 'from': '0x401000', 'to': '0x402000'}].
Inputs: limit, xref_type, address_or_name. Returns: result
list_functionsA
List all functions identified in the current file. Supports filtering by function name or address using a keyword.
Inputs: filter_keyword. Returns: result
open_and_analyzeA
Open and automatically analyze a binary file. This tool must be called before performing any decompilation, disassembly, or queries on the file.
Inputs: file_path (required), analyze_level. Returns: result
run_capa_analysisA
[Ultra-fast Rizin Extractor Mode] Use the pre-analyzed Rizin Session from open_and_analyze to match capa-rules and identify malicious capabilities. open_and_analyze must be called first. It fully analyzes all functions until completion, automatically supports disk caching, and directly returns cached results if already analyzed.
Inputs: force_reanalysis. Returns: result
search_stringsA
Search for readable strings present in the binary file. Supports filtering with a query keyword.
Inputs: query. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool has a clearly distinct purpose: opening/analyzing, capa analysis, listing functions, decompiling, disassembling, binary info, string search, xrefs, raw command execution, and closing. The only potentially overlapping tool is execute_rizin_command, but it is explicitly a high-privilege escape hatch, not a competitor to the purpose-built tools.
All tool names follow a consistent verb_noun pattern with snake_case: open_and_analyze, run_capa_analysis, list_functions, decompile_function, disassemble_function, get_binary_info, search_strings, get_xrefs, execute_rizin_command, close_file. The naming is uniform and predictable.
10 tools are well-scoped for a binary analysis server. Each tool covers a distinct operation without redundancy, and the count feels appropriate for the domain.
The tool set covers the full binary analysis lifecycle: open/analyze, inspect (info, strings, functions), analyze (decompile, disassemble, xrefs), advanced analysis (capa), raw command access for any gap, and close. No critical operations are missing for the stated purpose.
Maintenance
Related MCP Connectors
Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.
An MCP server that gives your AI access to the source code and docs of all public github repos
Capability registry for the agentic economy. Semantic search over verified MCP server listings.
MCP server teaching AI agents to implement TideCloak: auth, E2EE, IGA, security analysis
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables LLMs to autonomously reverse engineer applications through Cutter, allowing them to decompile binaries, analyze code, and rename methods programmatically.34Apache 2.0
- AlicenseNot gradedqualityDmaintenanceAn MCP server that allows LLMs to autonomously reverse engineer applications by exposing Ghidra's functionality, including decompiling binaries, analyzing code, and renaming methods and data.Apache 2.0
- AlicenseNot gradedqualityDmaintenanceAn Model Context Protocol server that enables LLMs to autonomously reverse engineer applications by exposing Ghidra's decompilation and analysis tools. It allows AI agents to list code structures, rename methods, and analyze binaries directly through MCP-compatible clients.Apache 2.0
- AlicenseAqualityCmaintenanceA multi-backend MCP server that exposes binary analysis capabilities from IDA Pro and Ghidra, allowing LLMs to directly drive reverse-engineering tools via natural language.11181Apache 2.0