radare2-mcp  by radareorg

Radare2 binary analysis server for AI agents

Created 1 year ago
268 stars

Top 95.5% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

This project provides an MCP (Machine Communication Protocol) server for radare2, enabling AI agents and IDEs to interact with radare2's powerful binary analysis capabilities. It bridges the gap between AI tools like Claude, VSCode Copilot, and Zed, and the deep analysis features of radare2, offering a seamless way to integrate reverse engineering workflows into AI-assisted development environments.

How It Works

The server is fully written in C, leveraging native radare2 APIs for deep integration. It operates via standard input/output (stdin/stdout) or as an HTTP server, allowing flexible connection to local or remote radare2 sessions via r2pipe. Key design choices include support for read-only modes, sandboxing, fine-grained tool configuration, and direct communication, facilitating secure and controlled AI-driven analysis.

Quick Start & Requirements

Installation is straightforward using r2pm -Uci r2mcp. For integration, clients like Claude Desktop, VS Code, and Zed require specific JSON configuration pointing to r2pm -r r2mcp as the command. Docker builds are also supported. Advanced HTTP features like session multiplexing (-X) and bearer authentication (-a) require radare2 ABI version 91 or newer. Building from source is possible via make install (Linux/macOS) or meson/ninja (Windows).

Highlighted Details

  • Supports both stdin/stdout and HTTP MCP server modes, with optional X-Session-ID multiplexing for concurrent sessions.
  • Offers security features including read-only mode, sandbox restrictions, and configurable tool access.
  • Integrates directly with popular AI development tools such as Claude Desktop, VS Code Copilot Chat, and Zed.
  • Provides a r2 core plugin for in-session management and control of the MCP server.

Maintenance & Community

The project is part of the radareorg ecosystem. Specific details on active contributors, sponsorships, or community channels (like Discord/Slack) are not detailed in this README snippet.

Licensing & Compatibility

The README does not explicitly state the license. However, radare2 projects are typically licensed under permissive licenses like LGPL or MIT, allowing for broad compatibility. Users should verify the specific license for commercial use.

Limitations & Caveats

Advanced HTTP features (session multiplexing, bearer authentication) are dependent on radare2 ABI version 91 or newer. The server requires a separate LLM agent to be functional. Some features like sandboxing and tool restrictions are optional and configurable.

Health Check
Last Commit

3 weeks ago

Responsiveness

Inactive

Pull Requests (30d)
2
Issues (30d)
2
Star History
19 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.