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 r2mcpThe 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 r2mcpThat's the common mcpServer JSON configuration file:






