# Connect an AI tool

> Use plutonium.io from an AI tool such as Claude Desktop — a remote MCP server you connect by signing in, and disconnect in Settings

An AI tool that speaks **MCP** (the Model Context Protocol) can work in your plutonium.io account
as you: list and run your loops, read what they did, answer their approvals, search, and draft,
test and publish loops. You connect it by signing in, not by pasting a key.

## Connect

Add this address to the tool as a **remote MCP server**:

```
https://mcp.plutonium.io/mcp
```

In **Claude Code**, that is one command:

```
claude mcp add --transport http plutonium https://mcp.plutonium.io/mcp
```

In **Cursor**, and in any tool that reads its servers from a JSON file:

```json
{
  "mcpServers": {
    "plutonium": { "url": "https://mcp.plutonium.io/mcp" }
  }
}
```

With [the command line](/docs/guide/command-line.md) installed, `rxr mcp add claude` and
`rxr mcp add cursor` do these two for you.

In **Claude Desktop** and other tools with a settings page, add a custom connector, or a remote
MCP server, with the address above.

The tool opens plutonium.io in your browser. Sign in, and a page asks whether to connect the tool,
with what it could do. Press **Allow**, and the browser goes back to the tool, which is now
connected. **Deny** connects nothing.

The name on that page is the name the tool gave itself. plutonium.io has not checked it, so connect
only a tool you started yourself.

## What it can do

To build a loop:

| Tool | What it does |
| --- | --- |
| `list_loops` | Lists your loops, with the published version and the draft of each. |
| `get_loop_format` | Explains how a loop is written. It gives a starter loop that saves as it is, and a full example. |
| `get_loop` | Reads one loop's document, so the tool can show it or change it. |
| `draft_loop` | Saves a draft of a loop, checked as the console checks it. A refused draft lists each problem and where it is. |
| `test_loop` | Runs the test cases a draft declares. |
| `get_test_results` | Reads the verdict of each test case, and why a failed one failed. |
| `publish_loop` | Publishes a draft. The version records that it came from this tool. |

To run a loop:

| Tool | What it does |
| --- | --- |
| `run_loop` | Starts a run of a published loop. With `draft`, it runs the draft, so you can try a loop before you publish it. |
| `get_run` | Reads a run: its state, its reply, a question it asked you, any approval it waits on, whether the conversation is still open, and what it did. |
| `list_runs` | Lists recent runs. |
| `send_message` | Sends your next message to a run: your answer to its question, or a follow-up. |
| `answer_approval` | Allows or declines a step a run waits on. |
| `stop_run` | Stops a run. |
| `search` | Searches your search indexes. |

A run of a draft is yours alone: no visitor reaches a draft. It costs what any run costs.

Three more tools are for a program on your own machine, not for a chat:

| Tool | What it does |
| --- | --- |
| `list_host_calls` | Lists the tool calls that runs wait on a member's own machine for. |
| `claim_host_call` | Takes one of them, so that one machine answers it. |
| `answer_host_call` | Sends the machine's answer, once. |

A loop can declare a tool that a member's own machine answers. The `rxr` program on that
machine uses these three tools to answer it, and only for the tool names that a file on the
machine maps to a command or a directory. An AI tool leaves them alone.

Each test case is a run that costs money, so a tool should ask you before it calls `test_loop`.
A case run acts on nothing live: a tool with outside effects answers the case's stub, and the
records the run writes are removed. A draft that declares test cases publishes only after they
pass on it. You can also run them in the console: open the loop on **Loops** and press
**Publish the change…**.

It acts as you, so it can do only what your role allows. A member whose role only reads cannot
publish through it. It reaches plutonium.io only through this connection: it cannot start runs
through a loop's own door.

## Prompts

The server also offers two **prompts**: the steps for a job, in the right order, so you do not
have to explain them. Most tools show a prompt as a slash command that takes its arguments.

| Prompt | Arguments | What the tool then does |
| --- | --- | --- |
| `new_loop` | `purpose`, and optionally `loop_id` | Reads the format, drafts a loop for that purpose, runs the draft and shows you the reply. |
| `change_loop` | `loop_id`, `change` | Reads the loop, makes the change as a draft, runs the draft and shows you the reply. |

In Claude Code, for example:

```
/mcp__plutonium__new_loop "answer billing questions from our help pages"
```

Both prompts tell the tool to ask you before it runs test cases and before it publishes. A
prompt gives the tool no new reach: each step is one of the tools above.

## See and disconnect

**Settings** lists, under **Connected AI tools**, each tool you connected to this account: when you
allowed it, when it last renewed its sign-in (a tool still in use does so within the hour), and
when the connection ends unless the tool renews it. You see
only your own connections; each member disconnects their own.

Press **Disconnect** to revoke a connection. The tool's next call is refused, and it cannot renew
the connection. To use it again, connect it again.

## From a terminal

[The command line](/docs/guide/command-line.md), `rxr`, uses this same server with no AI tool: it
signs in the same way, and each of its commands is one of the tools above.
