# Use Rauta in your editor

Rauta exposes a remote MCP server so your AI coding agent can recommend
GPU infrastructure grounded in live, measured data — real market prices,
VRAM-by-precision model sizing, and benchmarker-sourced cold-start and
failure-rate telemetry. No API key. Read-only.

Already on `infra-arena` / `infra-arena-gateway` MCP names or `npx infra-arena`?
Rename editor config keys to `rauta` / `rauta-gateway` (and prefer
`npx rauta-ai`). Legacy `*.infra-arena.ai` hosts stay until **2026-08-10**
then detach (no 301). Copy-paste: `docs/runbooks/rauta-client-migration.md`.

- MCP endpoint: `https://mcp.rauta.ai/mcp` (Streamable HTTP)
- Skill catalog: `https://rauta.ai/.well-known/skills/index.json`

## Guardrail for the agent

Never assert a GPU price, benchmark score, latency, or availability from
training data — call a tool. Surface real failure rates rather than hiding
providers. Return a recommendation with specific numbers and caveats, not a
dump. Before any provisioning spend (future capability), show the price and get
explicit user approval.

## Claude Code

Plugin marketplace (GitHub C5 complete — `rauta-labs/rauta`;
see `docs/runbooks/c5-github-org-rename.md`):

```
claude plugin marketplace add rauta-labs/rauta
claude plugin install infra-arena
```

Or MCP only:

```
claude mcp add --transport http rauta https://mcp.rauta.ai/mcp
```

Then install the skill (optional, adds the workflow):

```
npx skills add https://rauta.ai
```

## Cursor

Add to `.cursor/mcp.json` (project) or `~/.cursor/mcp.json` (global):

```json
{
  "mcpServers": {
    "rauta": {
      "url": "https://mcp.rauta.ai/mcp"
    }
  }
}
```

Or one-click deeplink:
`cursor://anysphere.cursor-deeplink/mcp/install?name=rauta&config=eyJ1cmwiOiJodHRwczovL21jcC5yYXV0YS5haS9tY3AifQ==`

## Codex

Add to `~/.codex/config.toml`:

```toml
[mcp_servers.rauta]
url = "https://mcp.rauta.ai/mcp"
```

## Skills only (any agent)

```
npx skills add https://rauta.ai
```

Writes the `infra-advisor` skill into `.claude/skills/` (Claude Code) and the
shared `.agents/skills/` (Cursor + Codex).

## Account (sign up from the terminal)

Everything above is read-only — no account. To rent compute, bring your own
provider keys (BYOK), or track spend:

```
npx rauta-ai login
```

(`rauta-ai` is the canonical npm package while unscoped `rauta` awaits npm
clearance. Prefer `npx rauta-ai` — package `infra-arena` is a deprecated shim.)

Or add the **gateway** MCP server and call its `signup` tool:

```
claude mcp add --transport http rauta-gateway https://gateway.rauta.ai/mcp
```

Any MCP client works: point it at `https://gateway.rauta.ai/mcp`
(Streamable HTTP) and call `signup`. The web dashboard (spend, keys, billing)
lives at `https://gateway.rauta.ai/login`.

### Connect Claude Code (subscription users — Max/Pro)

Call the gateway MCP's `connect_claude_code` tool from inside any Claude
Code chat. One settings merge (the agent writes it for you, with a confirm
prompt) + one restart, and your session routes **through** the gateway on
your own claude.ai login — subscription billing unchanged, the gateway
forwards your own credential untouched (the exact setup Anthropic's gateway
protocol documents). You get:

- live usage metering (`get_my_claude_usage`: 5-hour/7-day windows, burn
  rate, calibrated limit ceilings) and spend-dashboard facts;
- rate-limit hits captured at the wire, with `suggest_overflow` offering a
  fallback model (advisory only) the moment you're blocked;
- Rauta-routable models as native `/model` picker entries labeled "From
  gateway" — click one and it routes through Rauta on your own provider key.

Prefer not to change your base URL? `connect_claude_code {"mode":
"telemetry"}` does metering only via Claude Code's OpenTelemetry export,
token kept out of settings.json entirely. Either way, fully reversible:
`connect_claude_code {"enabled": false}`.

### Rauta Box — route turns to the user's own hardware

If the user asks to run models on their **own machine** (a Mac, a GPU box, a
homelab server — anything that can run an OpenAI-compatible server like vLLM,
Ollama, TGI, or mlx_lm), onboard it as a first-class routing target from this
same gateway MCP. No dashboard visit, no tokens in chat:

1. **Size the hardware** — detect it yourself (`sysctl -n hw.memsize` +
   `uname -m` on macOS; `/proc/meminfo` + `nvidia-smi` on Linux), then call
   `plan_box_setup` with `ram_gb`, `accel`, and what you know about the user's
   work. It returns which models physically fit; you pick the right one.
2. **Register + get a pairing code** — call `add_own_hardware` with a name,
   the capex (for honest amortized metering — box turns are metered at
   `capex/(months×730) + power`, never fake "free"), and
   `enable_local_first: true` to prefer the box on exact-model matches. With
   the default `auth: "bearer"` it returns a **single-use pairing code** and a
   one-line command:

   ```
   rauta box connect <pairing-code>
   ```

   The user runs that on the box. The box claims its token out-of-band,
   installs an auth-enforcing proxy, and self-registers — and the gateway then
   *measures* that the box rejects a bad token (`auth_enforced` in
   `list_own_hardware`). A bare tunnel URL without the pairing proxy is
   world-reachable; never register one with `auth: "none"` unless the tunnel
   is genuinely private (e.g. Tailscale ACLs).
3. **Confirm** — `list_own_hardware` should show the box `connected` with its
   model inventory. Exact-model requests now route local-first; if the box is
   down, cloud-burst fallback is automatic — a request can never fail because
   the box is offline.

Manage later with `update_own_hardware` (capex/power changes take effect on
future receipts immediately) and `remove_own_hardware` (dry-run first; the
hardware keeps running, past receipts are kept).

## Tools

| Tool | Use it for |
| --- | --- |
| `list_gpus` | Browse / filter the live GPU market (price, region, availability). |
| `lookup_model` | Param count, context window, VRAM at fp16/int8/int4, fitting GPUs. |
| `recommend_workload` | "What should I run X on" — VRAM-aware, price-ranked shortlist. |
| `leaderboard` | Fastest / cheapest by category (cloud / hardware / inference). |
| `cold_start_stats` | Real provisioning p50/p95 + failure rates per provider+GPU. |
| `compare_providers` | Cross-provider TTFT / latency / availability over time. |
| `ask_advisor` | Rauta's own prose recommendation (may cold-start ~2 min). |

Full reference: [tools.md](https://rauta.ai/.well-known/skills/infra-advisor/references/tools.md).
Data model + honesty principles: [data-model.md](https://rauta.ai/.well-known/skills/infra-advisor/references/data-model.md).
