rr-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@rr-mcpList available rr traces"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
rr-mcp
MCP (Model Context Protocol) server for orchestrating multi-process rr debugging sessions.
Overview
rr-mcp enables AI agents (like Claude) to debug multi-process applications using rr's record-and-replay capabilities. It provides:
48 specialized debugging tools with rich descriptions and usage context
Dynamic MCP resources that expose live session state (
rr://sessions/{id})Concurrent replay sessions for debugging different processes simultaneously
Full reverse execution — step, continue, and finish in both directions
Multi-process support — debug exec'd processes (
pid) or forked-without-exec children (fork_pid)Conditional and temporary breakpoints, watchpoints, and catchpoints (throw/catch/syscall/signal)
New to rr debugging? See RR_DEBUGGING_GUIDE.md for concepts, workflows, and best practices.
Related MCP server: gdb and rr Debugging
Requirements
Linux (rr only runs on Linux)
Python 3.11+
rr installed and in PATH
An rr recording to debug
Installation
Claude Code
claude mcp add rr-mcp -- uvx rr-mcpOther MCP clients
Any MCP client that supports stdio servers can run uvx rr-mcp (or pipx run rr-mcp).
Installing from source
For development (recommended - no reinstall needed after changes):
git clone https://github.com/jnjaeschke/rr-mcp && cd rr-mcp
uv sync # Install dependencies
# Configure Claude Code to run from source
claude mcp add rr-mcp -- uv run --directory /absolute/path/to/rr-mcp rr-mcpFor production use:
git clone https://github.com/jnjaeschke/rr-mcp && cd rr-mcp
uv tool install .
# Configure Claude Code
claude mcp add rr-mcp -- rr-mcpFor other MCP clients, use the appropriate command (uv run ... for development or rr-mcp for production).
Usage
Once installed, the server loads automatically when you start your MCP client. Verify it's working by asking:
"List available rr traces"
Claude will use the traces_list tool to show recordings in your _RR_TRACE_DIR (defaults to ~/.local/share/rr).
MCP Resources
rr://guide— Debugging guide with workflows, tool selection advice, and common pitfallsrr://traces— Dynamic list of available recordingsrr://sessions/{id}— Current session state (position, location)rr://sessions/{id}/backtrace— Live call stack for a session
Tools
48 debugging tools organized into categories. Each tool includes rich descriptions with usage context, parameter documentation, return value format specifications, and workflow guidance.
Trace Management (3 tools)
Tool | Description |
| List all available rr recordings on the system |
| Get metadata about a trace (creation time, binary, etc.) |
| List processes in a trace with PIDs and exec info |
Session Lifecycle (3 tools)
Tool | Description |
| Create a replay session for a specific process. Supports |
| List all active replay sessions |
| End a session and free its resources |
Execution Control (14 tools)
Tool | Description |
| Run forward/backward until breakpoint, signal, or end |
| Step by source lines, into functions |
| Step by source lines, over functions |
| Run to end/start of current function |
| Step by machine instructions, into calls |
| Step by machine instructions, over calls |
| Jump to a specific rr event number |
| Stop a running program |
Breakpoints & Watchpoints (7 tools)
Tool | Description |
| Set breakpoints by function, file:line, or address. Supports conditional ( |
| Delete a breakpoint by number |
| List all breakpoints with their state |
| Toggle breakpoints on/off |
| Break on memory writes, reads, or access to an expression |
| Catchpoints for C++ |
Inspection (14 tools)
Tool | Description |
| Call stack with optional |
| Evaluate an expression in the current context |
| Local variables in the current frame |
| Function arguments across stack frames |
| Switch to a different stack frame |
| CPU registers ( |
| Formatted memory dump (like GDB's |
| Current rr event and tick position |
| List and switch between threads |
| Save execution position for instant return later |
| Jump back to a saved checkpoint |
| Manage checkpoints |
Signal Handling & Memory Search (2 tools)
Tool | Description |
| Configure how GDB handles a signal (stop, pass, print) |
| Search memory range for a byte pattern |
Source & Advanced (5 tools)
Tool | Description |
| Show source code around a location with context lines |
| Resolve a filename to its full path |
| List all source files in the program |
| GDB |
| Execute an arbitrary GDB command (escape hatch) |
All tools include detailed descriptions visible to Claude. See tool definitions in src/rr_mcp/server.py.
Example Session
Agent: Let me list the available traces.
[calls traces_list]
Agent: I see firefox-0. Let me check what processes are in it.
[calls trace_processes with trace="firefox-0"]
Agent: The main process is PID 12345, and there's a content process
PID 12350 that crashed with SIGSEGV. Let me debug the content
process — it forked without exec, so I need fork_pid.
[calls session_create with trace="firefox-0", fork_pid=12350]
Agent: Let me see where we are and get the crash backtrace.
[calls backtrace with session_id="abc123"]
Agent: Frame #3 in HandleEvent dereferences a null mWidget pointer.
Let me see the source code around that line.
[calls source_list with location="HandleEvent.cpp:142"]
Agent: I'll set a watchpoint on mWidget to find where it was set to null,
then reverse-continue to catch the moment it happened.
[calls watchpoint_set with expression="this->mWidget", access_type="write"]
[calls reverse_continue]
Agent: The watchpoint triggered at event 84021 in Widget::Destroy().
Let me check who called this.
[calls backtrace]
Agent: I'll save this position as a checkpoint so I can return here later,
then continue investigating the caller.
[calls checkpoint_create]Development
# Install dev dependencies
uv sync --all-extras
# Run tests (parallel execution with pytest-xdist)
uv run pytest -n auto
# Run tests (sequential)
uv run pytest
# Run linter
uv run ruff check src/ tests/
# Run type checker
uv run mypy src/License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server to assist with JxBrowser development.
MCP server for mandates, delegation, policy-gated execution, credential grants, and audit.
MCP server for Superserve sandboxes: create, exec, and manage Firecracker microVMs
MCP server for understanding Javascript internals from ECMAScript specification.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceA GDB/MI protocol server based on the MCP protocol, providing remote application debugging capabilities.68MIT
- AlicenseAqualityCmaintenanceMCP server that exposes GDB debugging as tools. An AI assistant can set breakpoints, run programs, step through code, inspect variables and memory, and examine registers — all via structured tool calls. Reverse debugging with rr is also supported.343MIT
- AlicenseAqualityDmaintenanceAn MCP server that enables AI assistants to control GDB debugging sessions, including breakpoint management, thread analysis, and variable inspection, using the GDB/MI protocol.221MIT
- AlicenseBqualityCmaintenanceMCP server that wraps gdb to enable LLMs to drive live debugging sessions, including starting sessions on binaries, attaching to processes, and running commands.73MIT