yts-mcp
Provides tools for retrieving YouTube video transcripts, listing available subtitles, fetching video metadata, and managing cookies to bypass rate limits and captcha errors.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@yts-mcpget transcript for https://youtu.be/dQw4w9WgXcQ"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
yts — YouTube Transcript MCP Server
Minimal MCP server that downloads YouTube video transcripts via the yt-dlp CLI.
Runs over stdio (for Claude Code / IDE integrations) or SSE (for Docker deploys
and remote clients).
Tools
Tool | Description |
| Download subs for a video. |
| List which subtitle and auto-caption languages the video offers. |
| Return metadata (title, channel, duration, description, tags). |
| Load Netscape-format cookies for this process. Bypasses rate-limit / captcha errors. |
| Discard the in-memory cookies. Idempotent. |
| Probe a random video from the built-in list (or an explicit |
| Return |
All success responses are dict. Failures surface as MCP protocol errors
(isError: true), so clients see red error UI rather than a "success" wrapping
a {"error": "..."} payload.
Related MCP server: youtube-mcp
Bypassing "This video is not available" / captcha errors
YouTube's bot detection rate-limits guest sessions to ~300 videos/hour per IP. When it triggers, yt-dlp masks the real reason as "This video is not available". The fix is authenticated cookies from a signed-in browser:
In your browser, sign in to YouTube.
Install a cookies-export extension (e.g. "Get cookies.txt LOCALLY" — Chrome/Firefox).
Export cookies for
youtube.com— the extension gives you Netscape-format text.Call
set_cookies(cookies_text=<the exported text>)on the running server (via MCP Inspector, Claude Code, etc.).All subsequent tool calls will run with
--cookiesinjected automatically.
Cookies live only in the server process (chmod-600 tempfile). They do not
survive docker compose restart — re-inject after each restart. Call
clear_cookies() any time to drop them.
Requirements
Python 3.10+
yt-dlpon PATH (installed automatically bysetup.shinside the venv, or by the Docker image)ffmpeg— optional but recommended (handles subtitle format conversion)A JS runtime (
node,deno,bun, orquickjs) — strongly recommended. YouTube protects many videos with a JSnchallenge; without a runtime, yt-dlp masks the failure as "This video is not available". The Docker image installsnodejsby default. Locally, install one you already have (brew install nodeon macOS).
Quick start (Docker Compose)
Every push to main publishes a multi-arch image to Docker Hub:
josetonyp/yts-mcp:latest (see the CI / published image section below).
If you just want to run the server without building:
docker compose pull # fetch the pre-built image
docker compose up -d # start it
curl -N http://localhost:8765/sse # verify the SSE endpoint responds
docker compose logs -f yts-mcp # follow the yt-dlp trace log
docker compose down # stop & removeTo build locally from your working tree instead (dev flow):
docker compose up -d --buildPoint at a different published tag (e.g. a specific commit) with the
YTS_IMAGE env var:
YTS_IMAGE=josetonyp/yts-mcp:sha-abc1234 docker compose up -dThen register with your MCP client:
{
"mcpServers": {
"yts": { "url": "http://127.0.0.1:8765/sse" }
}
}Docker CLI (no Compose)
If you don't want to use Compose, the same server runs via docker build +
docker run:
# 1. Build the image (tag it 'yts-mcp' for convenience).
docker build -t yts-mcp .
# 2. Run it. --rm auto-removes on stop; -d detaches; -p publishes the SSE port.
docker run -d --rm \
--name yts-mcp \
-p 8765:8765 \
yts-mcp
# 3. Verify.
curl -N http://localhost:8765/sse
docker logs -f yts-mcp # stream yt-dlp command logCommon variants
# Run in the foreground (Ctrl+C to stop) — useful for one-off debugging:
docker run --rm -p 8765:8765 yts-mcp
# Bind to a different host port:
docker run -d --rm --name yts-mcp -p 9000:8765 yts-mcp
# Tighter timeout (default is 120s per yt-dlp call):
docker run -d --rm --name yts-mcp -p 8765:8765 \
-e YTDLP_TIMEOUT=60 \
yts-mcp
# Verbose logs (adds yt-dlp stderr on successful calls):
docker run -d --rm --name yts-mcp -p 8765:8765 \
-e YTS_LOG_LEVEL=DEBUG \
yts-mcp
# Pin a specific yt-dlp release at build time:
docker build --build-arg YTDLP_VERSION=2025.09.05 -t yts-mcp:pinned .
docker run -d --rm --name yts-mcp -p 8765:8765 yts-mcp:pinned
# Stop, restart, remove:
docker stop yts-mcp
docker start yts-mcp
docker rm -f yts-mcpUpgrading yt-dlp
YouTube changes their internals often; yt-dlp ships fixes weekly.
# With Compose:
docker compose build --no-cache --build-arg YTDLP_VERSION=latest
docker compose up -d
# With plain Docker CLI:
docker build --no-cache --build-arg YTDLP_VERSION=latest -t yts-mcp .
docker rm -f yts-mcp
docker run -d --rm --name yts-mcp -p 8765:8765 yts-mcpVerify with the health tool from your MCP client, or:
docker exec yts-mcp yt-dlp --versionCI / published image
.github/workflows/docker.yml builds a multi-arch (amd64 + arm64)
image and pushes it to Docker Hub.
Image URL: josetonyp/yts-mcp
Tags produced per push:
Tag | Meaning |
| Default branch ( |
| Every pushed branch keeps a tag |
| Every commit — for reproducible pins |
| Git tags matching |
Triggers:
Push to
main/master→ build and pushTag
v*→ build and push semver tagsPull request → build only (validates the Dockerfile), no push
workflow_dispatch→ manual runs from the Actions tab
First-time setup
Create a Docker Hub access token: https://hub.docker.com/settings/security → New Access Token → scope
Read, Write, Delete. Copy it — shown once.Create the repo on Docker Hub ahead of first push (recommended so it starts Public): https://hub.docker.com/repository/create → name
yts-mcp→ Public. Skipping this makes the first push auto-create it Private, and public consumers getdeniederrors.Add two GitHub repository secrets: Settings → Secrets and variables → Actions → New repository secret.
DOCKERHUB_USERNAME=josetonypDOCKERHUB_TOKEN= the token from step 1
Init the repo and push to GitHub:
git init && git add . && git commit -m "initial" git remote add origin git@github.com:<owner>/<repo>.git git push -u origin mainWait ~3-5 min for the multi-arch build. Then:
docker compose pull docker compose up -d
Environment variables
Var | Default | Purpose |
|
| SSE bind address |
|
| SSE bind port |
| (unset) | Set to |
| (auto-detect: venv sibling → PATH) | Override the yt-dlp binary path |
|
| Max seconds a single |
|
|
|
Pass these to docker run with -e VAR=value or set them in
docker-compose.yml under environment:.
Local (stdio) setup
bash setup.shThe script creates .venv/, installs mcp and yt-dlp, and prints an
.mcp.json snippet like:
{
"mcpServers": {
"yts": {
"type": "stdio",
"command": "/absolute/path/to/yts/.venv/bin/python3",
"args": ["/absolute/path/to/yts/src/server.py"]
}
}
}Local (SSE) dev mode
bash dev.sh # binds 127.0.0.1:8765
bash dev.sh --port 8888 # custom portFile layout
yts/
├── src/
│ ├── server.py ← FastMCP init, tool registration, composition root
│ ├── cookie_store.py ← CookieStore + InvalidCookiesError (standalone)
│ └── transcript/ ← yt-dlp adapter package — one class per file
│ ├── __init__.py ← public API re-exports
│ ├── cue.py ← Cue (frozen dataclass)
│ ├── transcript.py ← Transcript (dataclass + to_dict)
│ ├── video_info.py ← VideoInfo (dataclass + from_yt_json)
│ ├── probe_videos.py ← PROBE_VIDEOS list used by check_cookies
│ ├── ytdlp_client.py ← YtDlpClient + 4 error classes
│ └── parsers/ ← subtitle-format parsers
│ ├── __init__.py
│ └── vtt_parser.py ← VttParser (WebVTT → cues, stateless)
├── .github/
│ └── workflows/
│ └── docker.yml ← CI: build+push multi-arch image to GHCR
├── requirements.txt ← mcp + minimal HTTP deps
├── Dockerfile ← Python 3.12-slim + ffmpeg + nodejs + yt-dlp (pip)
├── docker-compose.yml ← Uses Docker Hub image; falls back to local build
├── setup.sh ← Local venv + smoke test
├── dev.sh ← Launch SSE dev server
├── ARCHITECTURE.md ← Design decisions and layer contracts
└── README.mdSee ARCHITECTURE.md for the design rationale.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityBmaintenanceAn MCP server that enables users to retrieve YouTube transcripts and perform video or channel searches without requiring Google API keys. It supports transcript chunking and provides tools for detailed video content analysis and channel metadata extraction.Last updated51034MIT
- AlicenseAqualityCmaintenanceAn MCP server that enables the extraction of transcripts and detailed metadata from YouTube videos. It allows users to retrieve video information like titles and descriptions, as well as transcripts with optional timestamps and language selection.Last updated2MIT
- AlicenseAqualityAmaintenanceMCP server that fetches YouTube video transcripts and optionally summarizes them. Supports multiple transcript formats (text, JSON, SRT, WebVTT), multi-language retrieval, and flexible YouTube URL parsing.Last updated64MIT
- AlicenseAqualityDmaintenanceMCP server to fetch transcripts for YouTube videos, enabling users to retrieve and summarize video content via natural language.Last updated172MIT
Related MCP Connectors
MCP server for Google Veo AI video generation
MCP server for AI dialogue using various LLM models via AceDataCloud
MCP server for Hailuo (MiniMax) AI video generation
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/josetonyp/yts-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server