Back to MCP directory
publicPublicdnsLocal runtime

radare2-mcp

Radare2 MCP服务器是一个用于将radare2二进制分析工具与AI助手(如Claude)集成的中间件服务。

article

README

🚀 使用 Radare2 的 MCP 服务器

这是一个用于将 Radare2 与 AI 助手(如 Claude)结合使用的 MCP 服务器,能实现 Radare2 与 AI 助手的交互,为二进制分析等工作带来便利。

🚀 快速开始

此服务器可让 Radare2 与 AI 助手(如 Claude)结合使用,实现二进制分析等功能。你可以通过 r2pm 进行安装,也可使用 Docker 运行。

✨ 主要特性

此实现提供了一个简单的 MCP 服务器,支持以下功能:

  • 使用直接的 stdin/stdout 通信模型
  • 提供基本工具功能
  • 实现二进制分析与 Radare2 的无缝集成
  • 支持 Radare2 直接与 AI 助手交互
  • 文件探索和检查

📦 安装指南

最简单的方式是使用 r2pm 进行安装:

$ r2pm -Uci r2mcp

通过此命令,r2mcp 可执行文件将被复制到 r2pm 的 bindir 目录中,但此可执行文件无需直接从终端运行,因为只有在 AI 语言模型的 MCP 服务处理程序启动时才会工作。

📚 详细文档

配置

在 Claude Desktop 应用中按 CMD + , 打开开发者设置,编辑配置文件并重启客户端。以下是需要添加到配置文件中的内容:

Claude Desktop 集成

要将此服务器与 Claude Desktop 结合使用,请更新您的 Claude 配置文件:

  1. 找到您的 Claude Desktop 配置文件位置:
    • macOS:~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows:%APPDATA%\Claude\claude_desktop_config.json
    • Linux:~/.config/Claude/claude_desktop_config.json
  2. 在配置文件中添加以下内容:
{
  "mcpServers": {
    "radare2": {
      "command": "r2pm",
      "args": ["-r", "r2mcp"]
    }
  }
}

Docker

您也可以使用 Docker 来运行 r2mcp。

docker build -t r2mcp .

然后,更新您的 Claude Desktop 配置文件以使用 Docker 镜像:

{
  "mcpServers": {
    "radare2": {
      "command": "docker",
      "args": ["run", "--rm", "-i", "-v", "/tmp/data:/data", "r2mcp"]
    }
  }
}
help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client