
Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
radareorg/radare2-MCP — это кандидат на сервер MCP, импортированный из https://github.com/radareorg/radare2-mcp.
Обзор
radareorg/radare2-MCP — это кандидат на сервер MCP, импортированный из https://github.com/radareorg/radare2-mcp.
Обзор (машинный перевод)
MCP-сервер для использования radare2 с AI-агентами, такими как OpenCode, Mai, VSCode, Claude, CLION, …
Особенности
Эта реализация обеспечивает:
- 💻 Полностью написано на C с использованием родных r2-API
- 🧩 Работает из CLI, как плагин r2 и как MCP-сервер
- 🔍 Бесшовный двоичный анализ с помощью radare2
- 🔗 Подключиться к любой локальной или удаленной сессии r2/iaito через r2pipe
- 🔒 Поддержка режима только для чтения, песочницы и инструментов ограничения
- 🔩 Конфигурация мелкозернистых инструментов
- 🔁 Модель прямой связи stdin/stdout
- 🌐 Режим HTTP MCP сервера с опциональной мультиплексированием [
X-Session-ID - 🛠️ Опциональный сырой доступ для запуска команд r2 или скриптов r2js
Установка
Используя r2pm
Самый простой способ установить пакет — использовать r2pm:
Исполняемый файл r2mcp будет скопирован в bindir r2pm в вашей домашней директории. Однако этот бинарный файл не должен выполняться напрямую из оболочки; он будет работать только при запуске обработчиком сервиса MCP выбранной вами языковой модели.
Это распространённый конфигурационный файл mcpServer JSON:
Кодекс
Чтобы установить плагин кодекса, просто выполните следующую команду:
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
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-IDmultiplexing - 🛠️ 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:
Установка
docker run --rm -i -v /tmp/data:/data r2mcpКонфигурация
{
"mcpServers": {
"radare2": {
"command": "r2pm",
"args": ["-r", "r2mcp"]
}
}
}