Rogue_Binary // Triage_Mode
Document_Viewer: /wiki/rbinr2-setup Back_To_Index

Rogue Binary MCP

Radare2 MCP Setup

Compile and configure the persistent rbinr2 Model Context Protocol server natively.

Section: Requirements

The rbinr2 server manages persistent radare2 pipe sessions directly in your local environment. It runs completely natively without virtualization.

  • radare2 framework binaries (radare2 and radiff2 must be available in system path, version 5.9 or newer recommended).
  • Rust toolchain (Cargo/rustc 1.75 or newer).
  • A cache folder for persistent session storage.
Section: Compilation

Build the server natively using Cargo to create the executable binary.

  • Navigate to your local rbinr2 repository folder.
  • Compile in release mode to enable maximum execution speed.
  • Verify that the compiled binary executes properly from cargo target.
Build Native Binary
                        cd ~/rbinr2
cargo build --release
                      
Section: MCP Client Configuration

Register the compiled binary natively in your agent client configuration file.

  • Provide the absolute path to target/release/rbinr2 as the launch command.
  • Set the RBM_CACHE_DIR environment variable to enable persistent tracking of open sessions.
  • No virtualization or containerization required. Runs natively on the host system.
Claude Desktop Config
                        {
  "mcpServers": {
    "rbinr2": {
      "command": "/path/to/rbinr2/target/release/rbinr2",
      "env": {
        "RBM_CACHE_DIR": "~/.cache/rbinr2"
      }
    }
  }
}
                      
Section: Session State Persistence

Unlike standard CLI invocations, rbinr2 maintains active r2pipe sessions in the background. Consecutive queries use these persistent states to dramatically reduce re-analysis time.

  • Sessions are registered using the target file path or an explicit session identifier.
  • Open sessions are listed under the r2_sessions tool.
  • Call r2_close when you want to free Radare2 memory buffers and session caches.