Home / MCP / Radare2 MCP Server
Provides an MCP server that enables radare2-powered AI-assisted binary analysis via local or containerized MCP clients.
Configuration
View docs{
"mcpServers": {
"radare2": {
"command": "r2pm",
"args": [
"-r",
"r2mcp"
]
}
}
}You can run the Radare2 MCP Server to enable AI-assisted analysis and interaction with radare2 across local or remote sessions. It connects via MCP to your AI agents and tools, providing seamless binary analysis, controlled tool usage, and a direct stdin/stdout communication model.
Run the server locally as an MCP service handler or connect through an MCP client to leverage radare2 in your AI-assisted workflows. You can start from a local runtime or via a container, and you can switch between direct CLI usage and MCP integrations in development environments like VS Code, Claude Desktop, or Zed. The server supports readonly mode, sandbox lock, and fine-grained tool configuration to keep analysis secure and reproducible.
Prerequisites you need before installing include a modern container runtime or a local C-based runtime environment and an MCP client setup. Follow the concrete installation options below.
Option 1: Install via r2pm (local MCP server)
$ r2pm -Uci r2mcp
`````},{Note: The r2mcp executable is intended to be invoked by the MCP service handler of your chosen language model, not executed directly from the shell.
Then register the MCP server configuration locally.
{
"mcpServers": {
"radare2": {
"command": "r2pm",
"args": ["-r", "r2mcp"]
}
}
}Option 2: Use Docker to run the MCP server image
Build and run the Docker image, then configure your MCP client to connect to it.
$ docker build -t r2mcp .
``````},{Then run the container with the volume for data and connect via MCP client as described below.
{
"mcpServers": {
"radare2": {
"command": "docker",
"args": ["run", "--rm", "-i", "-v", "/tmp/data:/data", "r2mcp"]
}
}
}MCP server binary that exposes radare2 analysis capabilities to MCP clients.
Bridge to connect local or remote radare2 sessions via r2pipe for seamless analysis and data exchange.
Enable readonly mode to prevent modification of target binaries during analysis.
Lockdown environment to restrict available tools and commands for secure analysis.
Direct stdin/stdout communication model for MCP client interactions.
Optional raw access to run r2 commands or r2js scripts for advanced workflows.