First-party app
Twitch Twitch

Twitch

Read Twitch channels, streams, videos, clips, chat metadata and schedules over the Helix API, and update a broadcaster's own channel.

stable Video & StreamingSocial MediaCommunication

About

Twitch ships in the w6w first-party pack. It declares 28 actions, 4 health checks, and the host runs its code in a sandbox that never sees the credential.

App id
io.w6w.twitch
Version
0.1.3
Author
w6w
Licence
MIT
Categories
Video & Streaming · Social Media · Communication

Overview

Twitch is a live-streaming platform, and this app reads channel, stream, video, clip, chat and schedule data over Twitch’s Helix API, plus lets a broadcaster update their own channel.

It covers channel information (read and update), live stream and followed-stream lookups, video and clip listings including creating a new clip, category and channel search, chat settings, emotes, badges and cheermotes, and team and moderator lookups. A stream marker action lets a workflow flag a moment during a live broadcast for later reference.

Good for posting a notification when a channel goes live, pulling recent clips or videos into a highlights feed, keeping channel title and category current from a content calendar, and building a dashboard of chat and moderation metadata without touching Twitch’s own creator tools.

Build with Twitch

Three routes to the same 28 actions. The Workflow tab is generated from Twitch's own manifest and carries its real ids, so it is copy-pasteable; the Code and CLI examples are the same call for any action on any app, so every app-specific value in them is a blank you fill in.

Create Clip

create-clip

Capture a clip from a broadcaster's live stream. Requires a user access token with the clips:edit scope, and the broadcaster must be live. Twitch answers 202 Accepted with a clip ID before the clip exists — poll Get Clips with that ID to confirm, and treat 60 seconds without a result as a failure.

Create Stream Marker

create-stream-marker

Mark the current point of a live stream so it can be turned into a highlight later. Requires a user access token with the channel:manage:broadcast scope, for the broadcaster or one of their editors. Fails with 404 if the stream is not live, is a rerun, or the channel has VOD storage disabled.

Get Channel Chat Badges

get-channel-chat-badges

List a broadcaster's custom chat badges — subscriber and Bits badges. Empty if they have not created any.

Get Channel Emotes

get-channel-emotes

List a broadcaster's custom emotes — subscriber, Bits-tier and follower emotes. An empty list means they have created none.

Get Channel Followers

get-channel-followers

List the users following a broadcaster, or check whether one specific user follows them. Requires a user access token with the moderator:read:followers scope belonging to the broadcaster or one of their moderators — without that, Twitch still answers 200 but returns only the total count and an empty list.

Get Channel Information

get-channel-information

Get one or more channels' title, category, language, tags and content classification labels. Works whether or not the broadcaster is live.

Get Channel Stream Schedule

get-channel-stream-schedule

Read a broadcaster's published stream schedule — upcoming segments, their categories, and any vacation window. The segments are at data.segments; data itself is an object, not a list.

Get Channel Teams

get-channel-teams

List the Twitch teams a broadcaster is a member of. Empty for a broadcaster on no team.

Get Chat Settings

get-chat-settings

Read a channel's chat settings: emote-only, follower-only, subscriber-only, unique-chat and slow mode. The non-moderator delay fields are returned only for a user access token with the moderator:read:chat_settings scope; otherwise they are absent from the response.

Get Cheermotes

get-cheermotes

List the Cheermotes viewers can use to cheer Bits. With no broadcaster ID this returns only the global set; with one, that broadcaster's custom Cheermotes are included too.

Get Clips

get-clips

List clips by broadcaster, by category, or by clip ID — exactly one of the three per request. Setting a start date without an end date gives a one-week window, not everything since; paging is capped at roughly 1,000 clips per query.

Get Content Classification Labels

get-content-classification-labels

List Twitch's content classification labels with localised names and descriptions. Seven are returned; only six of them can be set on a channel, because MatureGame is applied by Twitch from the category.

Get Followed Channels

get-followed-channels

List the broadcasters a user follows, or check whether they follow one specific broadcaster. Requires a user access token with the user:read:follows scope, for that same user.

Get Followed Streams

get-followed-streams

List the broadcasters a user follows who are live right now, most viewers first. Requires a user access token with the user:read:follows scope, for that same user.

Get Games

get-games

Look up Twitch categories by ID, exact name, or IGDB ID — at least one of the three, at most 100 values in total. Names must match exactly; use Search Categories for partial matches.

Get Global Chat Badges

get-global-chat-badges

List the chat badges Twitch defines for every channel. Takes no parameters. Each item is a badge SET; the images live on its `versions` array.

Get Global Emotes

get-global-emotes

List the emotes Twitch makes available in every chat room. Takes no parameters. Build image URLs from the response's `template` field rather than from `images`, which only ever returns the static light-background variant.

Get Moderators

get-moderators

List the users allowed to moderate a broadcaster's chat room, or check whether specific users are among them. Requires a user access token with the moderation:read scope, for the broadcaster themselves.

Get Streams

get-streams

List live streams, most viewers first, optionally filtered by broadcaster, category or language. Only live streams are ever returned — an offline broadcaster is absent from the results rather than reported as offline.

Get Teams

get-teams

Get one Twitch team and its member list, by team name or team ID. Exactly one of the two, never both.

Get Top Games

get-top-games

List the Twitch categories with the most viewers right now, most popular first. Needs no parameters and no scope.

Get User Chat Color

get-user-chat-color

Read the hex colour one or more users' names are drawn in, in chat. An empty colour means the user never chose one, so Twitch randomises it per channel.

Get Users

get-users

Look up Twitch users by ID or login name. Leave both empty with a user access token to get the token's own user. Works with an app access token when at least one ID or login is given.

Get Videos

get-videos

List published videos by ID, by broadcaster, or by category. Exactly one of those three is allowed per request; the language, period, sort and type filters apply only to the broadcaster and category forms.

Modify Channel Information

modify-channel-information

Update the broadcaster's own stream title, category, language, tags, content classification labels or branded-content flag. Requires a user access token with the channel:manage:broadcast scope, for the same user as the broadcaster ID.

Search Categories

search-categories

Find Twitch categories whose name contains every word of the query, case-insensitively. This is the fuzzy lookup; Get Games is the exact one.

Search Channels

search-channels

Find channels whose name starts with the query and that have streamed within the past six months. Turning on "Live only" changes the matching as well as the filtering: Twitch then matches the broadcaster's display name and category rather than the login name.

Send Chat Announcement

send-chat-announcement

Post a highlighted announcement into a channel's chat room. Requires a user access token with the moderator:manage:announcements scope, belonging to the moderator ID given. Twitch allows one announcement every two seconds and answers 204 with no body.

A workflow step names the app and the action, and the editor fills in the connection when you pick one. This is the Step shape from the workflow spec, carrying Twitch's real ids.

{
  "manifestVersion": "2",
  "name": "twitch-example",
  "steps": [
    {
      "id": "create-clip",
      "uses": {
        "app": "io.w6w.twitch",
        "action": "create-clip",
        "connection": "conn_YOUR_CONNECTION_ID"
      },
      "with": {
        "broadcasterId": "<broadcasterId>"
      }
    }
  ]
}

Here are some of the things you can do

  • Create Clip

    perform
    create-clip
  • Create Stream Marker

    perform
    create-stream-marker
  • Get Channel Chat Badges

    read
    get-channel-chat-badges
  • Get Channel Emotes

    read
    get-channel-emotes
  • Get Channel Followers

    read
    get-channel-followers

+23 more actions available

Every app-specific value here is a blank you have to fill in. An app action is reached through the connection that authenticates it, so the address is a connection id, not the app id — and connections belong to your account, so a public page cannot know yours. Create one for Twitch, then fill in the three blanks: conn_YOUR_CONNECTION_ID, the action key, and the parameters that action declares. The call itself is real — the shape is transcribed from the studio's own snippet builder, which prints the same kind of blanks — but nothing in it is specific to Twitch. The Workflow tab is where this app's real ids are.

Install
npm install @w6w/sdk
yarn add @w6w/sdk
pnpm add @w6w/sdk
deno add npm:@w6w/sdk
Code
import { W6wClient, isActionRun } from "@w6w/sdk";

// Reads W6W_BASE_URL and W6W_TOKEN from the environment when omitted.
const client = new W6wClient();

const envelope = await client.run({
  urn: "conn_YOUR_CONNECTION_ID",
  action: "create-clip",
  payload: {
    broadcasterId: "<value>",
    // title: "<value>",
    // duration: "<value>",
  },
});

if (isActionRun(envelope)) console.log(envelope.value);
Install the CLI
npm install -g @w6w/cli
CLI
w6w run conn_YOUR_CONNECTION_ID --action create-clip --payload '{"broadcasterId":"<value>"}'

Give an AI agent Twitch — without giving it Twitch's credentials. One MCP endpoint exposes every app, function and workflow the caller is entitled to, as tools it can discover and run. Access is granted per team while we onboard.

One tool call
{
  "name": "w6w_invoke",
  "arguments": {
    "ref": "app:io.w6w.twitch#create-clip",
    "input": {
      "broadcasterId": "<broadcasterId>"
    }
  }
}

Every tool names its target with a single ref. The app: form above doesn't name a connection at all — the host resolves which of the caller's Twitch connections to sign with, and refuses rather than guesses when the answer is ambiguous.

What the agent gets

Credentials it can't read

The token is attached host-side, at the moment of the call. It is never a tool argument, never in the model's context, and never in a transcript — so a prompt injection has nothing to exfiltrate.

A tool surface scoped to the caller

Tools are derived per end user from what that person has actually connected and is entitled to — not one shared bot identity carrying the union of everyone's access.

A durable workflow in one call

Multi-step work runs on the workflow engine and returns a run handle the agent can poll — retries, branching and state survive the conversation that started them.

Health-aware discovery

Twitch's declared health checks are on the surface too, so an agent can tell "the vendor is down" from "your credential expired" before it burns a retry on either.

The MCP surface is part of the hosted platform. Twitch itself is MIT, and the runtime that executes it is source-available (FSL).

Request MCP access

Health checks

Twitch declares its own checks, so its health is a property of the app rather than something the host guesses at.

service

Twitch platform status

Component status from status.twitch.com — Login, Web, Chat, Video (Watching), Video (Broadcasting) and Purchases. Note that Twitch publishes no component for the Helix API itself; see the `api-status` and `api` checks.

service

Vendor status for the Helix API

dependency

Helix API reachable

Unauthenticated probe of api.twitch.tv. A JSON 401 in Twitch's documented error shape is a pass — it proves the API resolved and answered from its own application layer. Whether a credential is valid is the derived auth checks' job.

quota

Rate-limit headroom

Points left in this connection's Twitch token bucket, read from the Ratelimit-Limit, Ratelimit-Remaining and Ratelimit-Reset headers of a cheap Helix call. App-token and user-token connections have separate buckets; this reports the one this connection uses.