Radare2 MCP Server

MCP stdio server for radare2

Local serverstdio

What is the Radare2 MCP server?

Radare2 MCP server is a locally run integration for AI assistants that speak the Model Context Protocol. MCP stdio server for radare2.

What you get

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

What the assistant can call

Once Radare2 is connected, these are the calls the assistant has available:

  • 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

Setting it up

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.

Configuration and credentials

You will need one environment variable: R2MCP_AUTH_TOKEN. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

Choosing this one

Plenty of developer tooling servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Radare2's toolset — macOS, Windows, Codex — is a fair guide to whether it matches your workflow. It is maintained by dnakov; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Before you rely on it

  • 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.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the radare2 mcp server does with a few real requests.

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

It connects Radare2 to MCP-compatible AI assistants such as Claude and Cursor, exposing 3 tools (macOS, Windows, Codex) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Radare2 directly.