# Build a stream assistant with the KickBot MCP server

> Build an AI stream assistant on the KickBot MCP server: read 30 days of channel activity, add a !clips command, set a timed message and report back.

Source: https://kickbot.com/docs/api/start/build-a-stream-assistant

This page builds one small stream assistant from start to end. It reads your channel's KickBot activity of the last 30 days, makes sure a `!clips` command links to your clip page, makes sure a timed message tells chat about `!clips`, and reports the numbers to you. It uses 5 MCP tools that exist today: `get_account_overview`, `get_channel_activity`, `set_command_by_name`, `list_timers` and `create_timer` (or `update_timer`).

You can run it in an AI app with the MCP server, or as a short script with the REST API. Both versions are below.

## What you need

- A KickBot account with your Kick channel connected, and KickBot as a moderator. See [Add KickBot as a moderator](https://kickbot.com/docs/getting-started/add-kickbot-as-moderator).
- An [API key](https://kickbot.com/docs/api/start/api-keys) with **Read and write** access, or an AI app that you connect with **Read and change settings**. A read-only key can run steps 1 and 2 only.
- If you are a team member, the **Custom commands** and **Timed messages** permissions. Other team members also need **API & MCP access**. See [Permissions and security](https://kickbot.com/docs/api/start/permissions-and-security).

## Connect the assistant to KickBot

The assistant only needs the `commands` and `timers` areas. The `account` area is always included. Use this server URL, so the AI app loads fewer tools:

```text
https://kickbot.com/api/v1/mcp?areas=commands,timers
```

- **ChatGPT, Claude, Grok and other chat apps:** add the URL as a custom connector and approve the app on the KickBot page that opens. See [Use KickBot from ChatGPT and Claude](https://kickbot.com/docs/integrations/ai-assistants).
- **Your own agent or an MCP app without OAuth:** send the API key as a header. See [Build your own agent](https://kickbot.com/docs/api/start/build-an-agent).

```json
{
  "mcpServers": {
    "kickbot": {
      "url": "https://kickbot.com/api/v1/mcp?areas=commands,timers",
      "headers": { "Authorization": "Bearer ${KICKBOT_API_KEY}" }
    }
  }
}
```

Then give the assistant its job. For example:

```text
You are my stream assistant for KickBot. Each time I ask for a check-up:
1. Call get_account_overview and stop if the plan limits or permissions block the changes.
2. Call get_channel_activity with my time zone, Europe/Berlin.
3. Make sure a !clips command posts my clip page link (set_command_by_name).
4. Make sure one timed message tells chat about !clips: call list_timers first,
   and only create a timer if none mentions !clips.
5. Report the busiest day, the top command, the top clip and what you changed.
Ask me before you change anything else.
```

## The steps, tool by tool

### 1. Check the account

The assistant calls `get_account_overview` with no arguments. It reads three things:

- `credential.scope`: `read_write` is needed for steps 3 and 4.
- `areas`: `commands` and `timers` must have `"available": true`.
- `limits.timed_messages`: `null` on Premium, `3` on the Free plan.

If `channel.kickbot_is_moderator` is `false`, the assistant asks you to type `/mod KickBot` in your Kick chat, then calls `check_moderator_status`.

### 2. Read the channel activity

```json
{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"get_channel_activity","arguments":{"time_zone":"Europe/Berlin"}}}
```

A shortened result (`structuredContent`):

```json
{
  "days": [{ "date": "2026-11-07", "total": 212, "by_feature": { "tts": 120, "commands": 70, "clips": 4, "timed_message": 18 } }],
  "totals": { "tts": 920, "commands": 610, "clips": 42, "timed_message": 268 },
  "total": 1840,
  "busiest_day": { "date": "2026-11-07", "total": 212 },
  "highlights": {
    "top_clip": { "video_id": "...", "views": 1530, "created_at": "2026-11-07T21:14:03Z", "clipper_username": "viewername" },
    "top_voice": null,
    "top_command": { "command": "discord", "count": 188 },
    "biggest_tip_cents": null
  },
  "links": { "tip_page": null, "clip_page": "https://kickbot.com/clips/yourchannel", "voice_list": null }
}
```

`days` has one entry for each of the last 30 days. The result also has `features_on`, `at_a_glance`, `tips_amount_30d_cents` and `tts_widget_last_opened_at`. Tip amounts are `null` unless you have the tipping configuration permission. These numbers count what KickBot did in your chat (TTS messages, command replies, clips and so on). They are not Kick's viewer numbers.

### 3. Set the !clips command

`set_command_by_name` creates the command, or changes it if it already exists. Run it as often as you want: it never makes a second `!clips`.

```json
{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"set_command_by_name","arguments":{"name":"clips","response":"The best clips of the channel: https://kickbot.com/clips/yourchannel","user_cooldown":30}}}
```

The result has `created` (`true` for a new command, `false` for a change) and the `command`, with `id`, `name`, `response`, `enabled` and the other command fields. On the Free plan, a new command over the limit of 5 is created switched off, and the result has a `note`.

### 4. Make sure a timed message points to !clips

Timed messages have no name, so the assistant calls `list_timers` first. The result has `timers` (each with `id`, `text`, `interval_minutes`, `spacing_messages` and `enabled`), `enabled_count` and `limit`.

- If a timer's `text` already mentions `!clips`, the assistant calls `update_timer` with that `id`, for example `{"id": 17, "enabled": true}`.
- If not, it calls `create_timer`:

```json
{"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"create_timer","arguments":{"text":"Missed a moment? Type !clips to see the best clips of the channel.","interval":45,"spacing":10}}}
```

`interval` is minutes between posts (5 to 180). `spacing` is how many viewer messages must come between two posts (1 to 30). The result uses the names `interval_minutes` and `spacing_messages`.

### 5. Report

The assistant writes a short report from the data, for example: "Your busiest day was 7 November with 212 KickBot interactions. `!discord` was the top command with 188 uses. Your top clip has 1,530 views. I added `!clips` and a timed message every 45 minutes." Every change also shows in **Recent API activity** on [kickbot.com/dashboard/api](https://kickbot.com/dashboard/api).

## The same assistant with plain HTTP

Every MCP tool is also a REST endpoint. This Node.js script (version 18 or later) does steps 2 to 4 without an AI app. Run it with `KICKBOT_API_KEY` set.

```js
const BASE = 'https://kickbot.com/api/v1';
const headers = {
	Authorization: `Bearer ${process.env.KICKBOT_API_KEY}`,
	'Content-Type': 'application/json'
};

async function call(method, path, body) {
	const res = await fetch(BASE + path, { method, headers, body: body ? JSON.stringify(body) : undefined });
	const json = await res.json();
	if (!res.ok) throw new Error(`${json.error.code}: ${json.error.message} (${json.error.request_id})`);
	return json.data;
}

// 2. Activity of the last 30 days
const activity = await call('GET', '/account/activity?time_zone=Europe/Berlin');
const clip_page = activity.links.clip_page;
if (!clip_page) throw new Error('No clip page link for this channel.');

// 3. !clips command (create or update)
const { created } = await call('PUT', '/commands/by-name/clips', {
	response: `The best clips of the channel: ${clip_page}`,
	user_cooldown: 30
});

// 4. One timed message about !clips
const { timers } = await call('GET', '/timers');
const existing = timers.find((timer) => timer.text.includes('!clips'));
const timer = existing
	? await call('PATCH', `/timers/${existing.id}`, { enabled: true })
	: await call('POST', '/timers', {
			text: 'Missed a moment? Type !clips to see the best clips of the channel.',
			interval: 45,
			spacing: 10
		});

console.log({
	busiest_day: activity.busiest_day,
	top_command: activity.highlights?.top_command,
	clips_command: created ? 'created' : 'updated',
	timer: { id: timer.id, enabled: timer.enabled, note: timer.note }
});
```

The REST paths are in the reference: [Account](https://kickbot.com/docs/api/reference/account), [Custom commands](https://kickbot.com/docs/api/reference/commands) and [Timed messages](https://kickbot.com/docs/api/reference/timers).

## Limits and errors

- **Rate limits:** 120 requests per minute and 3,000 per hour for each key or app. This assistant uses 4 or 5 calls per run.
- **`forbidden`:** the key is read-only, or you do not have the team permission.
- **`limit_reached`:** on the Free plan, up to 3 timed messages can be on at the same time. Turning on a fourth fails with this error. Do not retry. Ask the streamer which timer to turn off.
- **A new timer or command with a `note`:** it was created switched off because of the Free plan limit.
- **`not_found`:** the timer `id` no longer exists. Call `list_timers` again.

All codes are in [Errors and limits](https://kickbot.com/docs/api/start/errors-and-limits).

## Ideas for next steps

- Add `get_tts_stats` and `list_recent_tts_messages` to report on TTS use.
- Add `list_moderation_logs` to show what the chat filters removed after a stream.
- Add `list_command_clips` to list the clips viewers made with `!clip`.
- Run the HTTP script on a schedule with a read-only key that only reports, and a separate read and write key for changes.

To compare this with what Kick's own API offers, see [The Kick API explained](https://kickbot.com/docs/api/start/kick-api).
