radare2-mcp
This is an MCP server for integrating radare2 with AI assistants. It utilizes a direct stdin/stdout communication model, enabling seamless binary analysis and file exploration. The direct integration with AI assistants allows users to work more efficiently.
GitHub Stars
78
User Rating
Not Rated
Favorites
0
Views
26
Forks
15
Issues
3
Radare2 MCP Server
An MCP server for using radare2 with AI assistants such as Claude, VSCode, CLION, Mai, OpenCode, ...
Features
This implementation provides a simple MCP server that:
- Uses a direct stdin/stdout communication model
- Provides basic tool capabilities
- Allows seamless binary analysis with radare2
- Integrates radare2 directly with AI assistants
- Enables file exploration and inspection
Installation
Using r2pm
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 mcp
Using Docker
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"].
Configuration
Claude Desktop Integration
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:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
- macOS:
Add the following to your configuration file:
{
"mcpServers": {
"radare2": {
"command": "r2pm",
"args": ["-r", "r2mcp"]
}
}
}
VS Code Integration
To use r2mcp with GitHub Copilot Chat in Visual Studio Code by adding it to your user configuration (see other options here):
- Open the Command Palette with
CMD + Shift + P(macOS) orCtrl + Shift + P(Windows/Linux). - Search for and select
Copilot: Open User Configuration(typically found in~/Library/Application Support/Code/User/mcp.jsonin macOS). - Add the following to your configuration file:
{
"servers": {
"radare2": {
"type": "stdio",
"command": "r2pm",
"args": ["-r", "r2mcp"]
}
},
"inputs": []
}
Zed Integration
You can use r2mcp with Zed as well by adding it to your configuration:
- Open the command palette:
CMD + Shift + P(macOS) orCtrl + Shift + P(Windows/Linux). - Search of
agent: open configurationor search ofsettings. - Add your server as such:
"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.
For Developers
Build from Source
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.
You can now add the following configuration to your VS Code mcp.json as explained above:
{
"servers": {
"r2mcp": {
"type": "stdio",
"command": "r2mcp",
"args": []
}
},
"inputs": []
}
Tip: So that the client doesn't get confused, it's best to enable one server at a time. You can do this by commenting out the other server in the configuration file.
632
Followers
76
Repositories
0
Gists
0
Total Contributions
AI Distiller is ultra‑fast, open‑source tool for intelligently extracting only the essential public APIs, types, and structure from large codebases. Compresses 90–98% of code into AI‑friendly context, integrates via CLI or MCP, supports 12+ languages, and AI prompt workflows for cleaner, cost‑effective AI development.
This project was completed during my Operating Systems course. The concept of the project is take an input file that lists various commands that should be performed by the CLI and would execute if they are valid commands with valid arguments. The project adds a multi process feature by having multiple processes working on the input file and thus increasing the efficiency of the application. All the code was written using C.