The Yt Dlp Mcp server integrates yt-dlp functionality with Claude and other MCP-compatible AI agents, enabling video discovery, metadata extraction, transcript retrieval, and media downloads through natural language. It provides tools for searching YouTube, downloading videos at specified resolutions, extracting audio, retrieving subtitles and transcripts in multiple languages, and accessing comprehensive video metadata—all without requiring direct content downloads for metadata operations. The server prioritizes user privacy through direct downloads via yt-dlp, implements input validation with Zod schemas, and supports multiple video platforms beyond YouTube including Facebook.
A powerful MCP server that brings video platform capabilities to your AI agents
Integrate yt-dlp with Claude, Dive, and other MCP-compatible AI systems. Download videos, extract metadata, get transcripts, and more — all through natural language.
Features • Installation • Tools • Usage • Documentation
🔍 Search & Discovery
📊 Metadata Extraction
📝 Transcript & Subtitles
|
🎥 Video Downloads
🎵 Audio Extraction
🛡️ Privacy & Safety
|
Install yt-dlp on your system:
| Platform | Command |
|---|---|
| 🪟 Windows | winget install yt-dlp |
| 🍎 macOS | brew install yt-dlp |
| 🐧 Linux | pip install yt-dlp |
Add the following config to your MCP client:
{
"mcpServers": {
"yt-dlp": {
"command": "npx",
"args": ["-y", "@kevinwatt/yt-dlp-mcp@latest"]
}
}
}
Use the Claude Code CLI to add the yt-dlp MCP server (guide):
claude mcp add yt-dlp npx @kevinwatt/yt-dlp-mcp@latest
Add to your claude_desktop_config.json:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json{
"mcpServers": {
"yt-dlp": {
"command": "npx",
"args": ["-y", "@kevinwatt/yt-dlp-mcp@latest"]
}
}
}
Go to Cursor Settings -> MCP -> New MCP Server. Use the config provided above.
Install via the VS Code CLI:
code --add-mcp '{"name":"yt-dlp","command":"npx","args":["-y","@kevinwatt/yt-dlp-mcp@latest"]}'
Or follow the MCP install guide with the standard config from above.
Follow the configure MCP guide using the standard config from above.
Follow Cline MCP configuration guide and use the config provided above.
Go to Settings | AI | Manage MCP Servers -> + Add to add an MCP Server. Use the config provided above.
Go to Settings | Tools | AI Assistant | Model Context Protocol (MCP) -> Add. Use the config provided above.
npm install -g @kevinwatt/yt-dlp-mcp
All tools are prefixed with ytdlp_ to avoid naming conflicts with other MCP servers.
| Tool | Description |
|---|---|
ytdlp_search_videos |
Search YouTube with pagination and date filtering support
|
| Tool | Description |
|---|---|
ytdlp_list_subtitle_languages |
List all available subtitle languages for a video
|
ytdlp_download_video_subtitles |
Download subtitles in VTT format with timestamps
|
ytdlp_download_transcript |
Generate clean plain text transcript
|
| Tool | Description |
|---|---|
ytdlp_download_video |
Download video to Downloads folder
|
ytdlp_download_audio |
Extract and download audio only
|
| Tool | Description |
|---|---|
ytdlp_get_video_metadata |
Extract comprehensive video metadata in JSON
|
ytdlp_get_video_metadata_summary |
Get human-readable metadata summary
|
| Tool | Description |
|---|---|
ytdlp_get_video_comments |
Extract comments in flat JSON, threaded JSON, or AI-friendly Markdown
|
ytdlp_get_video_comments_summary |
Get a human-readable summary of comments
|
"Search for Python programming tutorials"
"Find the top 20 machine learning videos"
"Search for 'react hooks tutorial' and show results 10-20"
"Search for JavaScript courses in JSON format"
"Get metadata for https://youtube.com/watch?v=..."
"Show me the title, channel, and view count for this video"
"Extract just the duration and upload date"
"Give me a quick summary of this video's info"
"Get the top 20 comments for https://youtube.com/watch?v=..."
"Get comments as threaded JSON for this video"
"Extract comments as markdown_tree so the reply branches stay intact"
"Get newest comments with maxDepth 1 and maxRepliesPerThread 0"
"Summarize comments in threaded view"
"List available subtitles for https://youtube.com/watch?v=..."
"Download English subtitles from this video"
"Get a clean transcript of this video in Spanish"
"Download Chinese (zh-Hant) transcript"
"Download this video in 1080p: https://youtube.com/watch?v=..."
"Download audio from this YouTube video"
"Download this video from 1:30 to 2:45"
"Save this Facebook video to my Downloads"
# Downloads directory (default: ~/Downloads)
YTDLP_DOWNLOADS_DIR=/path/to/downloads
# Default resolution (default: 720p)
YTDLP_DEFAULT_RESOLUTION=1080p
# Default subtitle language (default: en)
YTDLP_DEFAULT_SUBTITLE_LANG=en
# Character limit (default: 25000)
YTDLP_CHARACTER_LIMIT=25000
# Max transcript length (default: 50000)
YTDLP_MAX_TRANSCRIPT_LENGTH=50000
To access private videos, age-restricted content, or avoid rate limits, configure cookies:
⚠️ Important: Cookie authentication requires a JavaScript runtime (deno) to be installed. When using cookies, YouTube uses authenticated API endpoints that require JavaScript challenge solving. Without deno, downloads will fail with "n challenge solving failed" error.
Install deno: https://docs.deno.com/runtime/getting_started/installation/
# Extract cookies from browser (recommended)
YTDLP_COOKIES_FROM_BROWSER=chrome
# Or use a cookie file
YTDLP_COOKIES_FILE=/path/to/cookies.txt
MCP Configuration with cookies:
{
"mcpServers": {
"yt-dlp": {
"command": "npx",
"args": ["-y", "@kevinwatt/yt-dlp-mcp@latest"],
"env": {
"YTDLP_COOKIES_FROM_BROWSER": "chrome"
}
}
}
}
Supported browsers: brave, chrome, chromium, edge, firefox, opera, safari, vivaldi, whale
See Cookie Configuration Guide for detailed setup instructions.
Perfect for programmatic processing:
{
"total": 50,
"count": 10,
"offset": 0,
"videos": [...],
"has_more": true,
"next_offset": 10
}
Human-readable display:
Found 50 videos (showing 10):
1. **Video Title**
📺 Channel: Creator Name
⏱️ Duration: 10:30
🔗 URL: https://...
Useful for LLM analysis when reply context matters:
# AI-Ready Comment Threads
source_title: "Sample Video"
comments_detected: 20
root_threads: 6
reply_comments: 14
## Threads
### Thread 1
- comment_id: "abc123"
parent_id: "root"
depth: 0
reply_count: 2
text:
| Root comment text
- comment_id: "reply456"
parent_id: "abc123"
depth: 1
reply_count: 0
text:
| Reply text
YouTube comment extraction supports the full extractor tuple:
youtube:comment_sort=<sort>;max_comments=<total>,<parents>,<replies>,<repliesPerThread>,<depth>
Examples:
maxComments=20 yields max_comments=20,20,20,20,2maxDepth=1, maxRepliesPerThread=0maxReplies=40, maxRepliesPerThread=5, maxDepth=2Contributions are welcome! Please check out our Contributing Guide.
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.
io.github.socialapishub/social-media-api
io.github.xpaysh/social-media
com.thenextgennexus/youtube-media-mcp-server
io.github.ludmila-omlopes/youtube-video-analyzer
csoai-org/social-media-ai-mcp
com.ezbizservices/social-media