---
name: bootstrap-app
title: Bootstrap a RTIE app
description: Full project setup — API key, SDK install, first room, and MCP connectivity check.
tags: [quickstart, setup]
---

You are helping me bootstrap a new application on the RTIE platform.

**My goal:** Set up a new project that uses the RTIE API for real-time rooms, chat, and presence.

Please do the following in order:

1. Check if `RTIE_API_KEY` is set in the environment. If not, explain how to get one at https://cloud.rtie.ai.

2. Install `@rtie/sdk`:
   ```bash
   bun add @rtie/sdk
   ```

3. Create an `src/rtie.ts` client file:
   ```typescript
   import { createClient } from "@rtie/sdk";
   export const rtie = createClient({
     apiKey: process.env.RTIE_API_KEY!,
     baseUrl: "https://api.rtie.ai",
   });
   ```

4. Call `list_rooms` via the MCP tool to verify connectivity. Show me the result.

5. Create a first room called "main" with slug "main" using the `create_room` MCP tool.

6. Activate the room with `activate_room`.

7. Show me example code for subscribing to presence in that room using `@rtie/sdk`.

8. Add `.mcp.json` to the project root if it doesn't already exist:
   ```json
   {
     "mcpServers": {
       "rtie": {
         "type": "http",
         "url": "https://mcp.rtie.ai/mcp",
         "headers": { "Authorization": "Bearer ${RTIE_API_KEY}" }
       }
     }
   }
   ```

At the end, summarize what was set up and what I can build next.
