radareorg/radare2-mcp
Security & PrivacyMCP server that lets AI agents drive radare2 for reverse engineering and binary analysis.
What it is
radare2-mcp bridges the radare2 reverse-engineering toolkit and MCP-capable AI clients. It is written in C against radare2's native APIs and can run as a standalone stdio server, an HTTP MCP server, or an r2 core plugin, so an agent can inspect binaries, run analysis, and query results through tools instead of a terminal README.
Typical users are reverse engineers and security researchers who already work with radare2 and want an AI client (Claude Desktop, VS Code Copilot, Zed, Codex, and others) to operate the session. It can also attach to a local or remote r2/iaito session via r2pipe, and offers readonly mode, sandbox locks, and per-tool configuration.
Install and connect
radare2 6.2.6 or newer is required README. The shortest path is r2pm:
r2pm -Uci r2mcp
The resulting r2mcp binary is not meant to be run directly from a shell; your MCP client launches it. A generic MCP client entry is:
{
"mcpServers": {
"radare2": {
"command": "r2pm",
"args": ["-r", "r2mcp"]
}
}
}
After saving the config and restarting the client, the radare2 tools should appear in the agent. Claude Desktop and VS Code Copilot configurations are documented; Zed uses context_servers instead of mcpServers Zed MCP docs. Building from source uses make install on Linux/macOS or meson/ninja on Windows build instructions.
Modes and configuration
Besides stdio, r2mcp -H [address:]port runs an HTTP MCP server; a bare port binds to 127.0.0.1, while 0.0.0.0:port exposes it to the network. Use -a <token> or -A for bearer authentication, and -X max[:idle_seconds] for per-session state keyed by X-Session-ID HTTP mode.
The core plugin mode exposes an r2mcp command inside an existing radare2 session, reusing the loaded file and analysis state:
r2 -e r2mcp.port=8765 -c 'r2mcp start' /bin/ls
Start/stop/restart/status, logging, approval, and config keys are managed through that command and r2mcp.* eval keys plugin mode.
Constraints
File operations accept absolute local regular paths; network shares and device paths are rejected and Windows paths must use a local drive. The sandbox permits hidden paths only within its rules, and URI schemes other than local file:// require explicit -g grants (socket, network, exec, or all); -s restricts access to a configured directory sandbox and paths. HTTP session multiplexing and bearer auth need radare2 ABI 91 or newer; older ABIs still run a single shared HTTP server but ignore -X HTTP mode. The optional sql tool requires the separate r2xsql core plugin and is excluded from read-only mode because it supports writes SQL section. The project is MIT-licensed.
HotRepo's take
This is radare2's own organization shipping a small C integration (367 stars, 49 forks at the snapshot) rather than a third-party wrapper, which matters for an MCP server that executes analysis tools. The design choices visible in the README — readonly mode, sandbox grains, tool restriction, bearer tokens, and per-tool configuration — address the main operational risk: handing an AI client direct command execution over binaries. No HotRepo ranking or star-history records are available for this repository, so there is no trend signal to report; the useful signal is the set of deployment modes and security controls the maintainers document.
Written by AI from the project's public information and HotRepo's records, updated . The project's own docs are the source of truth.
You might also like
- HexRaysSA/ida-mcpOfficial MCP server that lets AI agents drive IDA Pro/idalib for reverse engineering and binary analysis.
- cyberkaida/reverse-engineering-assistantGhidra extension exposing reverse-engineering tools to LLM clients through an MCP server, for interactive or headless binary analysis.
- LaurieWired/GhidraMCPLets an LLM drive Ghidra's decompiler and symbol renaming so reverse engineering of unfamiliar binaries can be automated.
- bethington/ghidra-mcpBridges Ghidra to AI agents so reverse-engineering of binaries can be driven by natural-language tool calls.
- aicodeking/leanreaA prompt-and-routing skill that lets coding agents reverse-engineer binaries and Electron apps with plain CLI tools instead of an MCP server.