> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rivvr.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Use Rivvr from an AI agent

> Register the Rivvr MCP server and Skill with Codex, Claude Code, Cursor, or Gemini CLI.

AI coding assistants such as Claude Code, Codex, Cursor, and Gemini CLI can use Rivvr for you. You ask in plain words ("deploy this model", "why is it slow?") and the assistant runs the Rivvr actions.

This works through MCP, a standard way for assistants to use outside tools. `rivvr` has an MCP server built in. It runs on your own computer and uses your Rivvr login, so the assistant can only do what you're allowed to do.

## Before you start

Sign in and pick a project and cluster. The assistant starts with the same ones:

```bash theme={"theme":{"light":"github-light","dark":"vesper"}}
rivvr auth login --api-url https://rivvr.customer.example --username alice
rivvr project use research
rivvr cluster use development
```

## Connect your assistant

Run one command for your assistant. `--with-skill` also installs the Rivvr Skill: a short set of instructions that teaches the assistant the usual Rivvr steps and their order.

> [tab] Claude Code
>
> ```bash theme={"theme":{"light":"github-light","dark":"vesper"}}
> rivvr mcp install claude --with-skill
> ```
>
> Restart Claude Code. To check: `claude mcp list` should show `rivvr`, and typing `/mcp` in a session lists the Rivvr tools. Type `/rivvr` to use the Skill directly.

> [tab] Codex
>
> ```bash theme={"theme":{"light":"github-light","dark":"vesper"}}
> rivvr mcp install codex --with-skill
> ```
>
> Restart Codex. To check: `codex mcp list` should show `rivvr`, and typing `/mcp` in a session lists the Rivvr tools. Type `$rivvr` to use the Skill directly.

> [tab] Cursor
>
> ```bash theme={"theme":{"light":"github-light","dark":"vesper"}}
> rivvr mcp install cursor --with-skill
> ```
>
> Reload Cursor, open its MCP settings, and switch `rivvr` on. The Skill is under **Customize → Skills**, or type `/` in Agent chat and pick `rivvr`.

> [tab] Gemini CLI
>
> ```bash theme={"theme":{"light":"github-light","dark":"vesper"}}
> rivvr mcp install gemini --with-skill
> ```
>
> To check: `gemini mcp list` and `gemini skills list` should both show `rivvr`. Inside a session, `/mcp` and `/skills list` show the same, and `/skills reload` loads a fresh install. The Skill is installed for your user in `~/.agents/skills/`, so it works in any folder. Gemini may ask before turning the Skill on; read what it asks before you agree.

## Check that it works

The install command only writes a settings file. To check that the assistant can reach Rivvr, give it a task that changes nothing:

```text Try this first wrap theme={"theme":{"light":"github-light","dark":"vesper"}}
Use Rivvr to show my accessible projects and active clusters. Inspect the models in research and report their states. Do not change resources.
```

If it answers with your real projects, it's connected. If it can't find the Rivvr tools, see [agent troubleshooting](https://docs.rivvr.ai/troubleshooting/common-issues.md#agent-cant-find-rivvr).

## Things to ask

Deploy a model and test it. First [save your inference key](https://docs.rivvr.ai/guides/inference.md#save-the-key-on-your-computer) on your computer. The assistant only needs the key's ID, never the secret:

```text Deploy wrap theme={"theme":{"light":"github-light","dark":"vesper"}}
Deploy HuggingFaceTB/SmolLM2-135M-Instruct as hello in project research, cluster development, with a maximum model cost of 3 USD/hour. Follow testing and deployment until ready, then send a short inference request using my stored key. Ask me for the key ID if needed, never its secret.
```

Find out why a model is slow or expensive:

```text Investigate wrap theme={"theme":{"light":"github-light","dark":"vesper"}}
Investigate whether hello is slow or expensive. Check its state and testing runs, then compare runtime performance and allocated infrastructure costs over the last 24 hours. Explain what the evidence shows and recommend changes without applying them.
```

Deploying takes the assistant several steps: copy the files in, create the model, then wait while Rivvr tests and starts it. Copying the files alone doesn't start a model.

## Stay safe

Most assistants ask before they run a tool. Read the request before you approve anything that deletes something or raises a spending limit. Rivvr still checks your permissions on every action, whatever you approve in the assistant.

Never paste passwords, setup tokens, Hugging Face tokens, or inference key secrets into the chat. The assistant doesn't need them.

## Let the assistant upload files from your computer

By default, the assistant can copy models from Hugging Face and S3 but can't read files on your computer. To let it upload model files, choose one folder for them:

```bash theme={"theme":{"light":"github-light","dark":"vesper"}}
rivvr mcp install claude --with-skill --upload-root /absolute/path/to/artifacts
```

Rules for this folder:

* It must already exist.
* The assistant can only upload things inside it. It can't use full paths, `..`, or shortcuts (symlinks) that point elsewhere.
* It can't be your home folder or `/`.

Restart the assistant after changing this.

If an upload stops halfway while its status is `INITIATED`, continuing it needs the same folder, the progress file `rivvr` saved, and the files unchanged. Finishing a `COMPLETING` upload, or cancelling an upload, doesn't need the files. See [upload recovery](https://docs.rivvr.ai/troubleshooting/recovery.md#upload-interrupted).

## What the assistant can do

| Area | Actions |
| - | - |
| Projects | List, inspect, create, delete |
| Clusters | List machine types; list, inspect, create, change, delete clusters |
| Storage | List, inspect, verify, delete; copy in from Hugging Face or S3; list, inspect, cancel copies |
| Files on your computer | Upload model files or LoRA adapters; continue or cancel uploads (needs `--upload-root`) |
| Models | List, inspect, create, change, delete; see testing runs |
| Prompts | List, create, revoke inference keys; send a prompt using a saved key ID |
| Monitoring | Model speed, infrastructure costs, Rivvr charges |

Managing projects and inference keys needs the ADMIN role, same as on the command line.

## Other assistants

For an MCP client not listed above, print the settings and copy them into that client's MCP configuration:

```bash theme={"theme":{"light":"github-light","dark":"vesper"}}
rivvr mcp config --format json    # for clients that use mcpServers.rivvr
rivvr mcp config --format toml    # for clients that use [mcp_servers.rivvr]
```

Keep the program path and arguments exactly as printed, and don't add passwords or keys. If you only want MCP without the Skill, leave out `--with-skill` everywhere.

To install the Skill by hand, copy the `skills/rivvr` folder from the CLI archive in your bundle to `~/.agents/skills/rivvr` (Codex, Cursor, Gemini CLI) or to `~/.claude/skills/rivvr` (Claude Code). `mcp install` can't set up Windows `.cmd` or `.bat` launchers, so set those up by hand too.

## When to restart or reinstall

| After you | Do this |
| - | - |
| Sign in again, or switch project or cluster | Restart the assistant so it uses the new choice. The assistant can still name a different project or cluster for a single action. |
| Update `rivvr` | Restart the assistant. If `rivvr` moved to a different folder, run `mcp install` again. |
| See a conflict from `mcp install` | Your existing `rivvr` entry is different from what Rivvr would write. Look at it first. Then run the command again with `--force`. That replaces only Rivvr's own entry and Skill files, and leaves a settings file it can't read untouched. |
| Run the assistant on another computer | That computer needs its own `rivvr` install, login, and network access. It can't use your laptop's VPN or keychain. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.