---
name: rtie-quickstart
description: Bootstrap an application on the RTIE platform — API key setup, MCP connection, first room and live session.
version: "0.1.0"
---

# RTIE Quickstart

RTIE is a multi-tenant realtime intelligence runtime. You build on it the same way you build on Supabase — with modules, a typed SDK (@rtie/sdk), an MCP server, and AI agent skills.

## 1. Get an API key

1. Go to https://cloud.rtie.ai → create a workspace (or use an existing one)
2. Navigate to API Keys → Create key
3. Copy the key (`rtie_live_*` for production, `rtie_test_*` for development)

```bash
export RTIE_API_KEY=rtie_live_xxxx
```

## 2. Connect the MCP server (Claude Code)

Add to your project's `.mcp.json`:

```json
{
  "mcpServers": {
    "rtie": {
      "type": "http",
      "url": "https://mcp.rtie.ai/mcp",
      "headers": { "Authorization": "Bearer ${RTIE_API_KEY}" }
    }
  }
}
```

For Cursor: add the same to `.cursor/mcp.json`. For other agents, see https://docs.rtie.ai/ai-tools/mcp.

Verify: call `list_rooms` — it should return an empty array for a new tenant.

## 3. Install the SDK

```bash
bun add @rtie/sdk
# or: npm install @rtie/sdk
```

## 4. Create your first room and send a chat message

```typescript
import { createClient } from "@rtie/sdk";

const rtie = createClient({
  apiKey: process.env.RTIE_API_KEY!,
  baseUrl: "https://api.rtie.ai",
});

// Create a room
const room = await rtie.rooms.create({ name: "My First Room", slug: "my-first-room" });

// Activate it so participants can join
await rtie.rooms.activate(room.id);

// Send a message
await rtie.chat.send(room.id, { body: "Hello from RTIE!" });

// List who's online
const presence = await rtie.presence.get(room.id);
console.log(presence);
```

## 5. Try the MCP tools directly

If you've connected the MCP server, your AI agent can call these tools right now:

- `list_rooms` — see all your rooms
- `create_room` — create a new room (name, slug)
- `get_presence` — who's in a room (roomId)
- `send_chat_message` — post a message (roomId, body)

## What's next?

- Add live auctions → see skill `rtie-agentic-commerce`
- Build a custom module → see skill `rtie-module-development`
- Set up webhooks → see skill `rtie-webhooks-and-events`
- Add Action Engine rules → see skill `rtie-action-engine`
- Work with schema/migrations → see skill `rtie-schema-and-migrations`

## Key constraint

**Never call Supabase, Cloudflare, or SpacetimeDB APIs directly.** Always use RTIE module APIs and @rtie/sdk. Your API key scopes all requests to your tenant — you cannot accidentally access another tenant's data.

Full docs: https://docs.rtie.ai/quickstart
