Commands
rdx mcp
Let an AI agent look at and operate a remote computer through an RDX session, over MCP.
rdx mcp is a server that lets an AI agent look at and operate a remote computer through an RDX session. Your MCP client starts it and talks to it over standard input and output.
Synopsis#
rdx mcp
rdx mcp --headedIt takes no other argument. You do not run it in a terminal yourself: the MCP client starts it and ends it by closing its input. Standard output carries MCP messages and nothing else.
Add it to an MCP client#
Add rdx mcp as a server that runs a command. For Claude Code:
claude mcp add rdx -- rdx mcpFor the headed mode below:
claude mcp add rdx-headed -- rdx mcp --headedOther MCP clients take the same command, rdx with the argument mcp.
Which hosts the agent may use#
The agent can connect only to hosts you list. Nothing is listed until you create the file.
The list is agent-mcp.json:
{"hosts": ["studio-mac", "192.0.2.20"]}Each entry is a name or a join target, as rdx list --json shows it. The agent's host matches an entry in any letter case.
| System | Folder |
|---|---|
| macOS | ~/Library/Application Support/RDX/release/ |
| Windows | %LOCALAPPDATA%\RDX\release\ |
A development build uses development in place of release.
With RDX_STATE_DIR set, RDX uses the folder that variable names instead. rdx mcp creates the folder, readable by your account only, if it is missing.
RDX reads the file at every connect, so an edit applies to the next one. A missing, unreadable or malformed file allows nothing, and the refusal names the file.
The agent joins the way rdx join does. A Tailscale host must have granted your device RDX access, and a computer on your network must already be paired with a code you entered yourself. The agent never asks for or carries a code.
The tools#
The agent sees 16 tools. Every tool that acts also takes screenshot (default false) to return a fresh picture of the screen after it acts.
| Tool | What it does |
|---|---|
list_hosts | The hosts this computer knows, as rdx list --json shows them, each marked allowed or not |
connect | Open a session to an allowed host. Takes the host, and optionally a display and a width and height. Answers when the picture is ready, with its size and the host's platform. |
session_info | State, input state, host platform, features, displays, round-trip time, frame rate and bitrate |
disconnect | Close the session |
screenshot | The remote screen as an image, with its sizes, a frame id and the cursor shape. Takes an optional longest edge, region and format (png or jpeg). |
wait_for_screen | Wait for the screen to change, or to be still for half a second. Takes a timeout of up to 30 seconds. |
click | Click at a point of the last screenshot. Takes the button, a click count of 1 to 3, and modifier keys. |
move | Move the pointer |
drag | Press at the first of 2 to 64 points, move through the others, release at the last |
scroll | Scroll at a point, by up to 4096 pixels on each axis |
key | Press and release a key or a combination, such as cmd+shift+4, ctrl+alt+delete, enter or f5 |
type_text | Type text. Says whether it typed keys or pasted. |
clipboard_write | Put text, up to 256 KiB, on the host's clipboard |
clipboard_read | Read the host's clipboard text. The agent is told to treat it as untrusted. |
list_displays | The host's displays |
select_display | Show another display |
Points are in pixels of the last screenshot the agent received.
Headless and headed#
By default rdx mcp runs its own session with no window. It works with RDX hosts on macOS and Windows. A host has one viewer, so while an agent is connected the RDX app cannot join the same host.
Headed mode#
rdx mcp --headedHeaded mode drives a window the RDX app already has open, so you watch the agent work and can take over. Open the host in the RDX app first. If the app is not running or has no session window, connect says so.
The tools, the allowlist and the log are the same. These differ:
list_hostslists the app's open session windows, with their status and whether an agent drives each.connectattaches the window that shows that host. One agent drives a window at a time, and the host is checked againstagent-mcp.jsonbefore the app is asked anything.- The window keeps its own size, so
connectsends no width or height. - The clipboard carries up to 12 KiB of text.
- A window that shows one app from
rdx streamtakes no agent.
While an agent drives a window, its toolbar shows Agent controlling with a Stop button.
Taking over. If you press or hold a key, press a mouse button or scroll in the window, the agent pauses. Moving the pointer does not count, and neither does letting a key or button go. The agent's next input fails with The owner took over this window: the agent's input waits until they press Resume in the window. The toolbar now shows Paused with a Resume button. Only Resume ends the pause. The pause belongs to the window: it stays if the agent disconnects and connects again, or another agent attaches. Screenshots still work while paused.
Stop. Stop lets the agent go. No agent can attach that window again, even after the session reconnects by itself, until you open a new session.
Pause, Stop and a disconnect release any keys or buttons the agent was holding.
The action log#
Every tool call adds one line to agent-mcp-log.jsonl, in the same folder as agent-mcp.json. Only your account can read it.
Each line holds the time, the tool, its arguments, and whether the call ended ok or in an error, with the message. In the arguments, every text value is replaced by its length, as {"chars":12}.
The log never records screenshots, typed or pasted text, or clipboard contents. A call whose line cannot be written does not run.
Limits#
- Text only on the clipboard, 256 KiB at most (12 KiB in headed mode). No file transfer.
- What is on the remote screen and in its clipboard is untrusted input for the agent. The server says so in its instructions to the agent.
- The allowlist and the log are your controls. The agent can do whatever the signed-in user of an allowed host can do.
- The session ends when the agent disconnects or its input ends.