Radare2 MCP Server is a tool that enables AI agents like Claude, VSCode Copilot, and other language models to interact with the radare2 reverse engineering framework. This server provides a bridge between AI systems and binary analysis capabilities through the Model Context Protocol (MCP).
The simplest way to install r2mcp is using the r2pm package manager:
r2pm -Uci r2mcp
This will install the r2mcp executable to r2pm's bindir in your home directory. Note that this binary shouldn't be executed directly from the shell—it's designed to be launched by your language model's MCP service handler.
You can also run it using:
r2pm -r r2mcp
You can alternatively use Docker to run r2mcp:
docker build -t r2mcp .
To configure Claude Desktop for use with r2mcp:
Open Claude Desktop settings with CMD + ,
Edit the configuration file as follows:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.jsonAdd this configuration:
{
"mcpServers": {
"radare2": {
"command": "r2pm",
"args": ["-r", "r2mcp"]
}
}
}
To use r2mcp with GitHub Copilot Chat in Visual Studio Code:
CMD + Shift + P (macOS) or Ctrl + Shift + P (Windows/Linux)Copilot: Open User Configuration{
"servers": {
"radare2": {
"type": "stdio",
"command": "r2pm",
"args": ["-r", "r2mcp"]
}
},
"inputs": []
}
To configure r2mcp with Zed:
CMD + Shift + P (macOS) or Ctrl + Shift + P (Windows/Linux)agent: open configuration or settings "context_servers": {
"r2-mcp-server": {
"source": "custom",
"command": "r2pm",
"args": ["-r", "r2mcp"],
"env": {}
}
}
Note: You'll need another LLM agent (like Claude, Gemini, etc.) to use this integration.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "radare2" '{"command":"r2pm","args":["-r","r2mcp"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:
{
"mcpServers": {
"radare2": {
"command": "r2pm",
"args": [
"-r",
"r2mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json2. Add this to your configuration file:
{
"mcpServers": {
"radare2": {
"command": "r2pm",
"args": [
"-r",
"r2mcp"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect