Radare2 MCP Server

MCP stdio server for radare2

Local serverstdio

What is the Radare2 MCP Server?

MCP stdio server for radare2

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

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

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.