> ## Documentation Index
> Fetch the complete documentation index at: https://docs.totemlabs.io/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP overview

> Connect an AI coding tool to Totem's five publishing tools.

export const LastVerified = ({date, source}) => <div className="totem-verified">
    <span>Last verified: {date}</span>
    {source ? <span>Source: {source}</span> : null}
  </div>;

export const StatusBadge = ({state = "available", children}) => {
  const labels = {
    available: "Available",
    "early-access": "Early access",
    planned: "Planned",
    internal: "Internal draft"
  };
  return <span className={`totem-status totem-status--${state}`}>
      {children || labels[state] || state}
    </span>;
};

<StatusBadge state="available" />

The Totem MCP server gives your AI coding tool five actions for creating, uploading, publishing, listing, and measuring browser games.

<LastVerified date="2026-08-14" source="Totem V1 contract" />

## Server

Totem uses stateless HTTP MCP at:

```text theme={null}
https://api.play.totemlabs.io/mcp
```

## Authentication

Every tool call sends:

```http theme={null}
Authorization: Bearer ttm_<your-key>
```

Create the key in the dashboard. Totem shows its plaintext once and stores only a hash afterward.

## Self-documenting connection

A connected agent does not need to guess the publish flow.

* The MCP initialize response includes an `instructions` string covering the full sequence.
* Every tool and parameter has a description.
* Every validation violation includes a `remediation` sentence.
* Three read-only resources expose the current build rules.

| Resource                     | What it returns                                               |
| ---------------------------- | ------------------------------------------------------------- |
| `totem://limits`             | Archive size, file-count, and upload-lifetime limits.         |
| `totem://allowed-extensions` | The exact 79-extension allowlist from the validator constant. |
| `totem://build-guide`        | Archive layout and publishing guidance for an agent.          |

## Tools

| Tool             | Outcome                                                   |
| ---------------- | --------------------------------------------------------- |
| `create_game`    | Create a game and receive a temporary upload URL.         |
| `request_upload` | Receive a new upload URL for an existing game.            |
| `list_games`     | List the games owned by the current account.              |
| `publish`        | Validate an uploaded build and create a playable version. |
| `get_analytics`  | Read daily and total game data.                           |

Asking about another account's game returns the same not-found result as asking about a game that does not exist.

## Publish sequence

`create_game` or `request_upload` → HTTP `PUT` to `upload_url` → `publish`.

Upload URLs expire in 900 seconds.

## Rate limits

The MCP server accepts 60 requests per minute per owner. Score submission has its own player-facing limit of one submission per ten seconds per player per game.
