rizin-mcp

rizin-mcp

MCP server integrating Rizin reverse engineering, RzGhidra decompiler, and capa for binary analysis, enabling LLMs to open binaries, identify capabilities, extract function addresses, and decompile to C pseudocode.

Category
访问服务器

README

Rizin MCP Server

License: MIT Python Version

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)

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 sync

2. Start MCP Server

You can start the MCP Server directly via the package CLI or as a module:

uv run python -m rizin_mcp.server

Testing and Integration

A. Testing with Anthropic's Official Web UI (MCP Inspector)

npx @modelcontextprotocol/inspector uv run python -m rizin_mcp.server

After 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 -d

Provided MCP Tools

Tool Name Description
open_and_analyze Open a binary file and perform automatic analysis (aaa).
run_capa_analysis Use Mandiant capa against capa-rules to identify binary capabilities and feature addresses. Runs as a background job (returns a job_id immediately) with disk caching; poll with get_capa_status.
get_capa_status Poll a background run_capa_analysis job by job_id for its running/success/error status and, once finished, the full result.
list_functions List all function names, addresses, and sizes (supports keyword filtering).
decompile_function Call RzGhidra (pdg) to decompile a specific address/function into C code (Ghidra's // WARNING: noise is split out into a separate warnings field).
disassemble_function Get the assembly disassembly for a specific function.
get_binary_info Get architectural information such as Headers, Sections, Imports, and Exports.
list_resources 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_resource Extract the raw bytes of a specific PE resource by type + ID, base64-encoded.
search_imports Search the import table by function name and/or DLL keyword, returning structured JSON.
search_strings Search for readable strings present in the binary file.
get_xrefs Find cross-references/call dependencies for a function or address.
find_import_callers Given an imported function name, list every call site and the function it belongs to, in one call.
execute_rizin_command Execute custom, read-only Rizin commands (e.g., px 64 @ 0x...), with output pagination via offset/limit. Shell-escape (!), file open/switch (o*), and write (w*) commands are blocked.
close_file 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.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选