Skip to main content
Glama
BryanCaves

Twitch MCP Server

by BryanCaves

Twitch MCP Server

A Model Context Protocol (MCP) server that provides access to Twitch API data for channel statistics, viewership, and discovery.

Features

  • Channel Statistics: Get channel information, follower counts, and recent followers

  • Viewership Data: Check stream status, current viewer counts, and stream details

  • Discovery Tools: Search for channels and game categories

  • Real-time Data: All data fetched directly from Twitch's API

Related MCP server: Twitch MCP Server

Prerequisites

  • Node.js 18 or higher

  • A Twitch Developer Application (for API credentials)

Setup

  1. Create a Twitch Developer Application:

  2. Install dependencies:

    npm install
  3. Configure API credentials:

    cp .env.example .env
    # Edit .env with your actual credentials
  4. Build the project:

    npm run build

Available Tools

Channel Statistics

  • get_channel_info: Get basic channel information (game, title, language)

  • get_channel_followers: Get follower count and recent followers

Viewership Data

  • get_stream_info: Get current stream status and viewer count

Discovery

  • search_channels: Search for channels by name or keyword

  • search_categories: Search for Twitch game categories

Usage

With Claude Desktop

Add this server to your Claude Desktop MCP settings (usually in ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "twitch": {
      "command": "node",
      "args": ["path/to/twitch-mcp/dist/index.js"],
      "env": {
        "TWITCH_CLIENT_ID": "your_actual_client_id",
        "TWITCH_CLIENT_SECRET": "your_actual_client_secret"
      }
    }
  }
}

Command Line Usage

# Start the server
TWITCH_CLIENT_ID=your_id TWITCH_CLIENT_SECRET=your_secret npm start

# Development mode
TWITCH_CLIENT_ID=your_id TWITCH_CLIENT_SECRET=your_secret npm run dev

Example Commands

  • Get channel info: get_channel_info with channel name

  • Check if channel is live: get_stream_info with channel name

  • Get follower stats: get_channel_followers with channel name

  • Search channels: search_channels with search query

  • Find games: search_categories with category name

Testing

You can test the MCP server using the MCP Inspector:

npx @modelcontextprotocol/inspector \
  TWITCH_CLIENT_ID=your_id TWITCH_CLIENT_SECRET=your_secret \
  node dist/index.js

Contributing

  1. Fork the repository

  2. Create your feature branch (git checkout -b feature/amazing-feature)

  3. Commit your changes (git commit -m 'Add some amazing feature')

  4. Push to the branch (git push origin feature/amazing-feature)

  5. Open a Pull Request

License

This project is licensed under the ISC License.

Related MCP Connectors

Related MCP Servers