Fast, minimal YouTube watch engine for AI agents — clean transcripts, no API key required.
Project description
Youtube MCP
Fast, minimal YouTube "watch" engine for AI agents. Extract clean transcripts, search, and slice any YouTube video — no API key required, no manual setup.
Install
Claude Code
claude mcp add youtube -- uvx youtube-watch-mcp
Before publish (local dev): point
uvxat the checkout instead:claude mcp add youtube -- uvx --from /path/to/youtube-mcp youtube-watch-mcp
Claude Desktop / Codex / other MCP clients
Add to the client's MCP config:
{
"mcpServers": {
"youtube": {
"command": "uvx",
"args": ["youtube-watch-mcp"]
}
}
}
CLI only
uvx --from youtube-watch-mcp youtube-watch-mcp-cli info "https://youtu.be/VIDEO_ID"
That's it. uvx pulls youtube-watch-mcp, yt-dlp, and dependencies into an isolated environment automatically. Nothing to install globally.
Optional:
ffmpegon PATH is required only for--asr(speech-to-text on caption-less videos). Core transcript extraction needs nothing.
Optional API key
A YouTube Data API key is not needed to read videos. Add one only to enable cross-YouTube search:
claude mcp add youtube -e YOUTUBE_API_KEY=your_key -- uvx youtube-watch-mcp
Transcript extraction never uses the key (YouTube only allows caption download for video owners).
Tools
| Tool | Returns | Purpose |
|---|---|---|
get_info(url) |
title, duration, chapters, has_captions | Cheap probe before fetching. |
get_transcript(url, asr=False) |
file path + word count + preview | Clean transcript to disk. Returns path, not full text. |
search_transcript(url, query) |
timestamped snippets | Grep a long video without loading it all. |
get_segment(url, start, end) |
text slice | Read one time range. |
Design principle: pull, don't dump. Transcripts write to a local cache file; tools return a path and a short preview. The agent reads or searches on demand — long videos never flood the context.
/get_info $url
/get_transcript $url
/search_transcript $url
/get_segment $url
Architecture
Adapters (thin): cli.py mcp_server.py skill
│ call
Core (all logic): fetch → clean → chunk → cache
│ uses
Backends: youtube-transcript-api · yt-dlp · faster-whisper
Fetch fallback chain:
youtube-transcript-api— fastest, no downloadyt-dlpauto-captionsyt-dlpmanual captions--asr: audio → localfaster-whisper
On yt-dlp failure the engine self-updates yt-dlp and retries once — most breakage is a stale yt-dlp.
Caching: results are keyed by video ID under ~/.cache/youtube-mcp/<id>/. Repeat calls are instant.
Cleaning: auto-captions are de-duplicated (rolling-caption overlap removed), stripped of timestamps and [Music] noise, and whitespace-collapsed before the agent ever sees them.
Requirements
- Python 3.11+ (managed automatically by
uvx) ffmpeg— optional, only for--asr
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file youtube_watch_mcp-0.1.0.tar.gz.
File metadata
- Download URL: youtube_watch_mcp-0.1.0.tar.gz
- Upload date:
- Size: 65.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f59a57bee8f614189cceb45540beff43585f0c47799002c65fcc1ac6b8765b02
|
|
| MD5 |
8c9e9d4512cd0dc77a44d637a5ec9b03
|
|
| BLAKE2b-256 |
d4070c951b634ec6d833a8b7dfd74a26eff090f951cf244fffaccd3d6783a31d
|
File details
Details for the file youtube_watch_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: youtube_watch_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
177d3095a835867842192e3ef16508f897bc4a989329251466f5943db51df016
|
|
| MD5 |
a1c5e58def9ba2cc789fbfd46ba8a085
|
|
| BLAKE2b-256 |
8aa7b607b1adc149831a7efa3bf2e72d05a032a0c86d94a8363f9b9ceb4a169c
|