# Quickstart: MCP

RouterGrowth speaks Model Context Protocol: connect once and your agent gets the discover, inspect, run loop as native tools, with the spending rules delivered in the handshake.

```text
https://api.routergrowth.com/mcp
```

Streamable HTTP transport, stateless: no session to manage, works from any MCP client that can send an Authorization header.

## Authentication

The server authenticates with your normal API key in the Authorization header, exactly like [REST](/docs/api/overview). Mint a key on the [dashboard](/dashboard). `discover` works without a key; every other tool returns a clear message telling the agent how to get one, so a keyless connection still lets you browse the catalog.

## Connect a client

**Claude Code**

```bash
claude mcp add --transport http routergrowth https://api.routergrowth.com/mcp \
  --header "Authorization: Bearer rg_live_..."
```

**Cursor, VS Code, Windsurf, Cline** and any client using an `mcpServers` config:

```json
{
  "mcpServers": {
    "routergrowth": {
      "type": "http",
      "url": "https://api.routergrowth.com/mcp",
      "headers": {"Authorization": "Bearer rg_live_..."}
    }
  }
}
```

**Codex**

```bash
codex mcp add routergrowth --url https://api.routergrowth.com/mcp \
  --header "Authorization: Bearer rg_live_..."
```

Claude.ai custom connectors require OAuth sign-in, which lands next; until then use a client that sends headers, or the [skill](/docs/quickstart-agents), which covers every platform today.

## The tools

| Tool | Auth | What it does |
| --- | --- | --- |
| `discover` | none | search the catalog by job description; free, never runs a paid call |
| `inspect` | key | schema, providers, exact price and billing conditions for one capability |
| `run` | key | execute a capability; billable, with `max_cost`, routing and `idempotency_key` |
| `runs` | key | run history with attempts, charges and routing reasons |
| `get_run` | key | one run by id |
| `balance` | key | wallet balance, reserved and available |

The tools call the same code as [`/v1`](/docs/api/overview): identical routing, billing, waterfall and [error codes](/docs/api/errors), with errors returned as tool results the model can read and react to.

## Spending rules

The server's `initialize` response instructs the agent: inspect and surface the price before any billable run, set `max_cost` on every call, ask the user before a batch that would exceed about $1, and never present sandbox (`rg_test_`) mock data as real. The same rules ship in [SKILL.md](/SKILL.md).

## Next

- [Quickstart: agents](/docs/quickstart-agents): the skill, for platforms without MCP.
- [Run reference](/docs/api/run): what the `run` tool does under the hood.
