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

# MCP Server

> Connect Claude, Cursor, or any MCP-compatible assistant directly to your Bota project

The Bota MCP server exposes your project's data as tools — list devices, inspect recordings, trigger test webhooks, and more — without leaving your IDE. It works for two audiences:

* **Developer tier** — authenticated with your `sk_live_*` or `sk_test_*` key. Full project access.
* **End user tier** — authenticated with an `eut_*` token you issue on behalf of a specific end user. Scoped to their recordings only.

**MCP endpoint:** `https://api.bota.dev/mcp`

***

## Developer Setup

Connect with your existing API key. No new credentials needed.

<Tabs>
  <Tab title="Claude Code">
    ```bash theme={null}
    claude mcp add --transport http bota https://api.bota.dev/mcp \
      --header "Authorization: Bearer sk_live_..."
    ```
  </Tab>

  <Tab title="Cursor">
    In Cursor settings → **MCP Servers**, add:

    ```json theme={null}
    {
      "bota": {
        "url": "https://api.bota.dev/mcp",
        "transport": "http",
        "headers": {
          "Authorization": "Bearer sk_live_..."
        }
      }
    }
    ```
  </Tab>
</Tabs>

Once connected, you can ask your assistant things like:

* *"List my devices and show me which ones haven't synced in 24 hours"*
* *"Get the transcription for recording rec\_abc123"*
* *"Trigger a test recording.uploaded event to my webhook"*

### Developer Tier Tools

| Tool                    | Description                                                               |
| :---------------------- | :------------------------------------------------------------------------ |
| `list_end_users`        | List end users with optional filters                                      |
| `get_end_user`          | Get a single end user by Bota ID or external\_id                          |
| `list_devices`          | List devices, optionally filtered by end user                             |
| `get_device`            | Get device details including battery, connectivity, and last heartbeat    |
| `get_fleet_stats`       | Fleet health summary: device counts by status and battery level           |
| `list_recordings`       | List recordings across all end users with status/device filters           |
| `get_recording`         | Recording metadata + transcription + summary in one call                  |
| `create_transcription`  | Trigger ASR transcription for an uploaded recording                       |
| `create_summary`        | Generate a summary from a transcription using a template or custom prompt |
| `list_webhooks`         | List registered webhook endpoints                                         |
| `trigger_webhook_event` | Fire a test event to a registered webhook endpoint                        |

***

## End User Tokens

You can give an end user a scoped MCP token so they can query their own recordings with an AI assistant. The token is tied to a specific `end_user_id` and cannot access any other user's data.

### Issue a token

```bash theme={null}
curl -X POST https://api.bota.dev/v1/end-users/eu_abc123/user-token \
  -H "Authorization: Bearer sk_live_..."
```

```json theme={null}
{
  "token": "eut_...",
  "key_hint": "eut_...xxxx",
  "end_user_id": "eu_abc123",
  "connection_command": "claude mcp add --transport http bota https://api.bota.dev/mcp --header \"Authorization: Bearer eut_...\"",
  "created_at": "2026-01-15T10:00:00Z"
}
```

The `token` is shown only once. Copy the `connection_command` and send it to your end user.

Issuing a new token automatically revokes any previous token for that end user.

### Revoke a token

```bash theme={null}
curl -X DELETE https://api.bota.dev/v1/end-users/eu_abc123/user-token \
  -H "Authorization: Bearer sk_live_..."
```

### End User Tier Tools

Once connected with an `eut_*` token, the end user can query their own data:

| Tool                   | Description                                                         |
| :--------------------- | :------------------------------------------------------------------ |
| `list_my_recordings`   | Their recordings — filter by status                                 |
| `get_my_recording`     | Single recording with transcription and summary                     |
| `get_my_transcription` | Full transcript with speaker labels and timestamps                  |
| `get_my_summary`       | AI-generated summary for a recording                                |
| `get_download_url`     | Presigned S3 URL to download the audio file (expires in 15 minutes) |
| `list_my_devices`      | Devices assigned to this end user                                   |

No admin operations. No access to other end users' data.

***

## Docs Search MCP

A separate Mintlify-hosted MCP server is available for searching Bota documentation:

```bash theme={null}
claude mcp add --transport sse bota-docs https://docs.bota.dev/mcp
```

This exposes `search_bota` — useful when you want an AI assistant to look up Bota API details on demand.
