An MCP server to use radare2 with AI agents such as OpenCode, Mai, VSCode, Claude, CLION, ... 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 too
Add this skill
npx mdskills install radareorg/radare2-mcpWell-documented binary analysis MCP server with comprehensive setup instructions and strong security controls

An MCP server to use radare2 with AI agents such as OpenCode, Mai, VSCode, Claude, CLION, ...
This implementation provides:
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"]
}
}
}
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"].In the Claude Desktop app, press CMD + , to open the Developer settings. Edit the configuration file and restart the client after editing the JSON file as explained below:
Locate your Claude Desktop configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.jsonAdd the following to your configuration file:
{
"mcpServers": {
"radare2": {
"command": "r2pm",
"args": ["-r", "r2mcp"]
}
}
}
To use r2mcp with GitHub Copilot Chat in Visual Studio Code by adding it to your user configuration (see other options here):
CMD + Shift + P (macOS) or Ctrl + Shift + P (Windows/Linux).Copilot: Open User Configuration (typically found in ~/Library/Application Support/Code/User/mcp.json in macOS).{
"servers": {
"radare2": {
"type": "stdio",
"command": "r2pm",
"args": ["-r", "r2mcp"]
}
},
"inputs": []
}
You can use r2mcp with Zed as well by adding it to your configuration:
CMD + Shift + P (macOS) or Ctrl + Shift + P (Windows/Linux).agent: open configuration or search of settings. "context_servers": {
"r2-mcp-server": {
"source": "custom",
"command": "r2pm",
"args": ["-r", "r2mcp"],
"env": {}
}
}
Note: you will need another LLM agent, such as Claude, Gemini or else to be able to use it.
To test the server locally, you can build and install it with make:
make install
This will compile the server and place the r2mcp binary in /usr/local/bin on macOS.
For Windows, just use meson and ninja like it's done in the CI:
meson b
ninja -C b
Install via CLI
npx mdskills install radareorg/radare2-mcpRadare2 MCP Server is a free, open-source AI agent skill. An MCP server to use radare2 with AI agents such as OpenCode, Mai, VSCode, Claude, CLION, ... 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 too
Install Radare2 MCP Server with a single command:
npx mdskills install radareorg/radare2-mcpThis downloads the skill files into your project and your AI agent picks them up automatically.
Radare2 MCP Server works with Claude Code, Claude Desktop, Cursor, Vscode Copilot, Windsurf, Continue Dev, Gemini Cli, Amp, Roo Code, Goose. Skills use the open SKILL.md format which is compatible with any AI coding agent that reads markdown instructions.