Let AI control your stream - 118 tools for OBS and Twitch integration
This guide walks you through setting up OBS + Twitch MCP Server from scratch. No programming experience required - if you can copy-paste commands and edit a text file, you’re good.
Time needed: About 15-20 minutes
Before starting, make sure you have:
uv is a fast Python package manager. It’s like npm for Python.
Linux/macOS:
curl -LsSf https://astral.sh/uv/install.sh | sh
Windows (PowerShell):
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
After installing, restart your terminal.
# Clone the repo
git clone https://github.com/struktured-labs/obs-twitch-mcp.git
# Enter the directory
cd obs-twitch-mcp
# Install dependencies (this may take a minute)
uv sync
# Install browser automation (needed for some features)
uv run playwright install chromium
The MCP server talks to OBS through WebSocket. You need to enable it:
You need API credentials to control Twitch:
http://localhost:17563# Copy the example config
cp setenv.example.sh setenv.sh
# Open it in a text editor
nano setenv.sh # or: code setenv.sh, notepad setenv.sh, etc.
Fill in your values:
# Twitch credentials (from Step 4)
export TWITCH_CLIENT_ID="your_client_id_here"
export TWITCH_CLIENT_SECRET="your_client_secret_here"
export TWITCH_CHANNEL="your_twitch_username"
# OBS credentials (from Step 3)
export OBS_WEBSOCKET_PASSWORD="your_obs_password"
export OBS_WEBSOCKET_PORT="4455"
# Leave TWITCH_OAUTH_TOKEN empty for now - we'll generate it
export TWITCH_OAUTH_TOKEN=""
Save and close the file.
Now run the authentication script:
# Load your credentials
source setenv.sh
# Run the auth script
uv run python auth.py
This will:
After it’s done, your setenv.sh will have the TWITCH_OAUTH_TOKEN filled in.
Add the MCP server to Claude Code’s config. Edit ~/.claude/settings.json:
Linux/macOS:
{
"mcpServers": {
"obs-twitch": {
"command": "bash",
"args": [
"-c",
"source /full/path/to/obs-twitch-mcp/setenv.sh && uv run --directory /full/path/to/obs-twitch-mcp python -m src.server"
]
}
}
}
Windows:
First, create setenv.bat in the obs-twitch-mcp folder:
@echo off
set TWITCH_CLIENT_ID=your_client_id
set TWITCH_CLIENT_SECRET=your_client_secret
set TWITCH_OAUTH_TOKEN=oauth:your_token
set TWITCH_CHANNEL=your_channel
set OBS_WEBSOCKET_PASSWORD=your_password
set OBS_WEBSOCKET_PORT=4455
Then in settings.json:
{
"mcpServers": {
"obs-twitch": {
"command": "cmd",
"args": ["/c", "setenv.bat && uv run python -m src.server"],
"cwd": "C:\\full\\path\\to\\obs-twitch-mcp"
}
}
}
Important: Replace /full/path/to/obs-twitch-mcp with the actual path where you cloned the repo!
claude
If you see your scenes listed, everything is working!
uv run python auth.py againTWITCH_CHANNEL is your username (lowercase)source setenv.sh && uv run python -m src.server# Make sure you're in the right directory
cd /path/to/obs-twitch-mcp
# Reinstall dependencies
uv sync
Now that you’re set up:
For uploading recordings directly to YouTube:
setenv.sh:
export YOUTUBE_CLIENT_ID="your_client_id"
export YOUTUBE_CLIENT_SECRET="your_client_secret"
The first upload will open a browser for authorization.
If you want to try the translation features, you’ll also need:
setenv.sh:
export ANTHROPIC_API_KEY="your_api_key_here"
See the Translation Guide for full setup.