# Build with AI

> Give Claude, Cursor or any AI coding tool the StreamArena docs as Markdown, and the StreamArena MCP server so it can check and dry-run the game it writes.

Your AI coding tool can read every page of these docs as Markdown, and the StreamArena MCP server lets it start, check and dry-run a game while it writes it. Both give the AI the same rules the runtime and the review use, so it stops guessing at the API.

## The docs as Markdown

| On streamarena.so | What it is |
|---|---|
| `/llms.txt` | An index of the docs, the site and the blog, in the llms.txt format |
| `/llms-full.txt` | Every docs page in one file, to paste into a chat or a project's context |
| `/docs/first-game.md` | Any docs page as Markdown: add `.md` to its path. The docs home is `/docs/index.md` |

Every page also has a View as Markdown link under its title.

## The StreamArena MCP server

The MCP server runs on your machine and gives your AI tool ten tools: the docs, the SDK types, StreamArena's own games as examples, a starter game for each input, a game checker, a question-set checker and a dry run. It reads local files only. It makes no network requests and writes nothing; your AI tool saves the game.

It lives in the `mcp` folder of the playcade-games repo. Install it once:

```bash
cd playcade-games/mcp && npm install
```

Then add it to Claude Code:

```bash
claude mcp add streamarena -- node /path/to/playcade-games/mcp/server.mjs
```

Cursor, Claude Desktop and other MCP clients take the same server in their MCP settings:

```json
{
  "mcpServers": {
    "streamarena": { "command": "node", "args": ["/path/to/playcade-games/mcp/server.mjs"] }
  }
}
```

## The tools

| Tool | What it does |
|---|---|
| `list_docs`, `read_doc`, `search_docs` | These docs as Markdown, by page or by search |
| `sdk_types` | The SDK as TypeScript declarations: every field of `Playcade.game()` and the round |
| `list_examples`, `get_example` | StreamArena's own games, with what each one is a good model for |
| `new_game` | A starter game for guess, vote or team that already follows the review rules and takes question sets |
| `check_game` | The review rules applied to a file: no network, a kebab-case id, 20 to 60 second rounds, a reveal, the house player, escaped names, built-in questions that pass the game's own `item` check. Each finding says what to change |
| `check_set` | A host's [question set](https://streamarena.so/docs/reference/game/#question-sets) checked against a game with the runtime's own check, with a reason for every question that fails. It can play the set too |
| `dry_run` | Plays rounds with pretend players on every platform in about a second, with the built-in questions or a question set: what is on screen, who scored and when, the reveal and the scoreboard |

The dry run uses the real runtime's answer matching. Run it with 1 or 2 players to see the [house player](https://streamarena.so/docs/guides/house-player/) step in, and with 20 or more to see a busy stream.

## A first prompt

```text
Use the streamarena MCP server. Make a guess game called Song Snippet: a lyric
on screen, chat types the song. Start from new_game, read the matching and
timing guides, then run check_game and dry_run until there are no errors.
```

> **Not the review:** `check_game` catches what a machine can catch. We still play every game on a test stream with chat and phones before it goes into the gallery: see [Get your game approved](https://streamarena.so/docs/guides/review/). Play yours in the [lab](https://streamarena.so/docs/lab/) first.

> **Internal for now:** The MCP server is internal, like the SDK, and its tools will change with it. A package you can run with `npx` is planned for when makers get the SDK.
