RR

radareorg/radare2-mcp

Developer tools公式

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

340 stars 42 forks 品質 81 トレンド 35MIT

radareorg/radare2-mcpは、https://github.com/radareorg/radare2-mcp.からインポートされたMCPサーバー候補です。

概要

radareorg/radare2-mcpは、https://github.com/radareorg/radare2-mcp.からインポートされたMCPサーバー候補です。

概要(AI 翻訳)

OpenCode、Mai、VSCode、Claude、CLIONなどのAIエージェントとradare2を使用するMCPサーバー

特徴

この実装は以下のものを提供します:

  • 💻 ネイティブのr2 APIを用いて完全にCで書かれている
  • 🧩 CLIから動作し、r2プラグインとして、またMCPサーバーとして動作します
  • 🔍 radare2を用いたシームレスな二値解析
  • 🔗 r2pipeを通じてローカルまたはリモートのr2/iaitoセッションに接続
  • 🔒 読み取り専用モード、サンドボックスロックおよび制限ツールをサポートしています
  • 🔩 細粒金器構成
  • 🔁 直接の標準/標準通信モデル
  • 🌐 オプションのX-Session-ID多重化を含むHTTP MCPサーバーモード
  • 🛠️ r2コマンドやr2jsスクリプトを実行するためのオプションの生アクセス

設置

r2pmを使っています

パッケージをインストールする最も簡単な方法は、r2pmを使うことです:

r2mcp実行ファイルは、あなたのホームディレクトリにあるr2pmのbindirにコピーされます。ただし、このバイナリはシェルから直接実行されるべきではありません。選択した言語モデルのMCPサービスハンドラによって起動された場合にのみ動作します。

これが一般的なmcpServer JSON設定ファイルです:

コデックス

Codexプラグインをインストールするには、以下のコマンドを実行します:

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

Radare2 MCP Server

An MCP server to use radare2 with AI agents such as OpenCode, Mai, VSCode, Claude, CLION, …

Features

This implementation provides:

  • 💻 Fully written in C using the native r2 APIs
  • 🧩 Works from the CLI, as an r2 plugin and as an MCP server
  • 🔍 Seamless binary analysis with radare2
  • 🔗 Connect to any local or remote r2/iaito session via r2pipe
  • 🔒 Supports readonly mode, sandbox lock and restrict tools
  • 🔩 Fine grained tools configuration
  • 🔁 Direct stdin/stdout communication model
  • 🌐 HTTP MCP server mode with optional X-Session-ID multiplexing
  • 🛠️ Optional raw access to run r2 commands or r2js scripts

Installation

Using r2pm

The simplest way to install the package is by using r2pm:

$ r2pm -Uci r2mcp

The r2mcp executable will be copied into r2pm’s bindir in your home directory. However, this binary is not supposed to be executed directly from the shell; it will only work when launched by the MCP service handler of your language model of choice.

$ r2pm -r r2mcp

That’s the common mcpServer JSON configuration file:

{
  "mcpServers": {
    "radare2": {
      "command": "r2pm",
      "args": ["-r", "r2mcp"]
    }
  }
}

Codex

To install the codex plugin just run the following command:

make codex-plugin-install

This will create a personal marketplace in your home and copy the files from dist/codex-plugin inside.

Using Docker

Alternatively, you can build the Docker image:

docker build -t r2mcp .

Update your MCP client configuration file (see below) to use the Docker image to use:

  • "command": "docker"
  • "args": ["run", "--rm", "-i", "-v", "/tmp/data:/data", "r2mcp"].

Configuration

HTTP Server Mode

Use -H [address:]port to run r2mcp as an HTTP MCP server instead of using stdin/stdout. A bare port binds only to 127.0.0.1; use 0.0.0.0:port explicitly to make the server reachable from the network:

r2mcp -H 8765
# Public binding; protect this with -a  or -A.
r2mcp -H 0.0.0.0:8765 -A

Per-session HTTP state is enabled with -X max[:idle_seconds] and routed by the X-Session-ID request header:

r2mcp -H 8765 -X 8:600

HTTP bearer authentication is enabled with -a . Clients must send Authorization: Bearer on every GET and POST request:

GitHub で README 全文を見る

インストール

docker run --rm -i -v /tmp/data:/data r2mcp
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "radare2": { "command": "r2pm", "args": ["-r", "r2mcp"] } } }