npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

twitch-mcp-server

v1.1.3

Published

Twitch MCP Server - AI integration for Twitch chat

Readme

Twitch MCP Server

AI-powered tools for Twitch streamers. This package provides an easy way to connect AI assistants like Claude, Qwen Code, or LM Studio to your Twitch chat.

🚀 Quick Start

npx twitch-mcp-server --channel your_channel --auth oauth:your_token --client-id your_client_id --broadcaster-id your_broadcaster_id

That's it! No need to install Java, Maven, or clone repositories.

📋 Prerequisites

  • Node.js 14 or later (comes with npx)
  • Java 11 or later

⚙️ Configuration

Command Line Options

npx twitch-mcp-server \
  --channel your_twitch_username \
  --auth oauth:your_twitch_oauth_token \
  --client-id your_twitch_client_id \
  --broadcaster-id your_twitch_broadcaster_id \
  [--show-connection-message] \
  [--jar-path /path/to/custom/jar]

Environment Variables

You can also configure using environment variables:

export TWITCH_CHANNEL=your_twitch_username
export TWITCH_AUTH=oauth:your_twitch_oauth_token
export TWITCH_CLIENT_ID=your_twitch_client_id
export TWITCH_BROADCASTER_ID=your_twitch_broadcaster_id
export TWITCH_SHOW_CONNECTION_MESSAGE=true

npx twitch-mcp-server

Optional JSON Config File

You can store settings in a JSON file and point to it via --config (or let the tool discover it at a standard path):

{
  "channel": "your_twitch_username",
  "auth": "oauth:your_twitch_oauth_token",
  "clientId": "your_twitch_client_id",
  "broadcasterId": "your_twitch_broadcaster_id",
  "showConnectionMessage": true
}

Default locations searched automatically when --config is not provided:

  • Windows: %APPDATA%/twitch-mcp/config.json
  • macOS: ~/Library/Application Support/twitch-mcp/config.json
  • Linux: ~/.config/twitch-mcp/config.json

Run with an explicit config file:

npx twitch-mcp-server --config ./twitch-mcp.config.json

Getting Your Twitch Credentials

  1. Channel Name: Your Twitch username (e.g., ninja)
  2. OAuth Token: Get from https://twitchtokengenerator.com/
    • Click "Generate Token"
    • Select required scopes:
      • chat:read - Read chat messages
      • chat:edit - Send chat messages
      • channel:moderate - Timeout/ban users
      • channel:manage:broadcast - Change title/category
      • clips:edit - Create clips
      • channel:manage:polls - Create polls
      • channel:manage:predictions - Create predictions
    • Copy the "Access Token" (includes oauth: prefix)
  3. Client ID: Also from twitchtokengenerator.com
  4. Broadcaster ID: Get from https://www.streamweasels.com/tools/convert-twitch-username-to-user-id/

🤖 Connect with AI Tools

Once running, connect with your preferred AI tool:

For Qwen Code (Recommended)

  1. Open Qwen Code settings
  2. Add this MCP configuration:
    {
      "mcpServers": {
        "twitch-mcp": {
         "command": "npx",
         "args": [
           "twitch-mcp-server",
           "--config", "C:/Users/<you>/AppData/Roaming/twitch-mcp/config.json"
         ]
        }
      }
    }

For LM Studio

  1. Open LM Studio
  2. Go to Settings → Developer → MCP Settings
  3. Add this configuration:
    {
      "mcpServers": {
        "twitch-mcp": {
         "command": "npx",
         "args": [
           "twitch-mcp-server",
           "--config", "/home/<you>/.config/twitch-mcp/config.json"
         ]
        }
      }
    }

🛠️ Features

  • Chat Interaction: Send and read Twitch chat messages
  • Moderation: Timeout/ban users based on chat behavior
  • Stream Management: Update title, category, create clips
  • Interactive Tools: Create polls and predictions
  • Chat Analysis: Analyze recent chat activity and topics

📖 Usage Examples

Once connected to an AI tool, you can ask:

  • "Send a message to my Twitch chat saying 'Hello viewers!'"
  • "What are people talking about in my chat?"
  • "Create a poll asking viewers what game to play next"
  • "Timeout the user who's being toxic"
  • "Update my stream title to 'Epic Gaming Session!'"
  • "Create a clip of that awesome moment"

🐛 Troubleshooting

Common Issues

"Java not found" error:

  • The tool will attempt to download Java automatically
  • If that fails, manually install Java 11+ from https://adoptium.net/

"Connection refused" or "Authentication failed":

  • Double-check your Twitch credentials
  • Ensure your OAuth token has all required scopes
  • Verify your broadcaster ID matches your channel

AI assistant can't see Twitch tools:

  • Make sure the server is running
  • Check that all 4 configuration values are correct
  • Try restarting your AI application

📄 License

This project is open source and available under the MIT License.

🙏 Acknowledgments

Based on TomCools' Twitch MCP Server, expanded with additional Twitch integration features.