Radare2 MCP Server

MCP stdio server for radare2

Local serverstdio

What is the Radare2 MCP server?

Connect Radare2 to Claude, Cursor or any other MCP client and it stops being a tab you switch to. MCP stdio server for radare2. The radare2 mcp server is what makes that connection.

What the server does

An MCP server to use radare2 with AI agents such as OpenCode, Mai, VSCode, Claude, CLION, ...

  • 💻 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 tools
  • 🔩 Fine grained tools configuration

Available tools

The toolset is worth reading before you wire it up, because it tells you what the integration is really for:

  • macOS — ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows — %APPDATA%\Claude\claude_desktop_config.json
  • Codex — This will create a personal marketplace in your home and copy the files from dist/codex-plugin inside

Installation

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client. The configuration blocks on this page cover the common clients.

Credentials and setup notes

Configuration is passed through the environment: R2MCP_AUTH_TOKEN. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

Where it fits

Among the developer tooling options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Radare2's toolset — macOS, Windows, Codex — is a fair guide to whether it matches your workflow. It is maintained by radareorg; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Worth knowing first

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
macOS~/Library/Application Support/Claude/claude_desktop_config.json
Windows%APPDATA%\Claude\claude_desktop_config.json
CodexThis will create a personal marketplace in your home and copy the files from dist/codex-plugin inside.

How to install the Radare2 MCP server

{
  "mcpServers": {
    "radare2": {
      "command": "r2pm",
      "args": ["-r", "r2mcp"]
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
R2MCP_AUTH_TOKENCredential the server authenticates with.Yes

Example prompts to try

  • Use Radare2 to macOS.
  • Use Radare2 to Windows.
  • Use Radare2 to Codex.

Frequently asked questions

Stdin/stdout is the default MCP communication model. HTTP mode (`-H <port>`) enables session multiplexing via the `X-Session-ID` header and supports bearer authentication with the `-a` option.