Skip to main content

MCP server

rt ships a plugin MCP server that gives coding agents (Claude Code, and anything else that speaks MCP) access to rt's daemon over structured tool calls instead of shell commands.

How it works

rt mcp serve starts a stdio MCP server named "mattstack." Claude Code reaches it through the mattstack plugin, and its tools appear under the namespace mcp__plugin_mattstack_mattstack__*. You never run rt mcp serve yourself; the plugin spawns it automatically.

Setup

Install seeds the MCP server's namespace (mcp__plugin_mattstack_mattstack) into Claude Code's permissions.allow list, so tool calls don't trigger per-call permission prompts. If you ran rt setup after installing the plugin, this is already in place.

Tools

The server exposes tools in four groups:

Gates

ToolWhat it does
gate_askOpen a decision gate with daemon-side ceremony (subject resolution, presentation, nudge). Returns the gate id and presentation.
gate_answerAnswer an open gate's questions. Values must match option values verbatim; nuance goes in a note field.
gate_listList gates, optionally filtered by status, subject prefix, or kind. Supports cursor-based paging.

Chat

ToolWhat it does
chat_postPost a message to an rt chat room.
chat_dmSend a direct message to another handle.
chat_ackAcknowledge a message by id.
chat_claimClaim a message so other agents skip answering it.
chat_releaseRelease a previously claimed message.

Chat tools require rt chat sign-in first. If no signed-in session exists, the tool fails before reaching the daemon.

MR

ToolWhat it does
mr_reply_threadReply to an existing MR/PR discussion thread.
mr_comment_inlinePost a new positioned inline comment on an MR diff line (GitLab only).
mr_mapList open MRs joined to the local worktrees holding their branches.

mr_reply_thread and mr_comment_inline require the repo's serialized identity (e.g. remote:gitlab.com%2Facme%2Facme-dev), not a bare host/path. mr_map also accepts the short repo-label alias.

Herd

ToolWhat it does
herd_gatesList a herd's open gates.
herd_askOpen a gate asking the herd operator questions, using this worker's identity.
herd_answerRead the answer to a gate previously opened with herd_ask.
herd_reportPost a status report to this worker's herd room.

When the daemon is down

Every tool connects to the daemon over its Unix socket. When the daemon is not running, tools return an error with a human-readable explanation. Chat tools also fail early if no signed-in session exists.

See also