yt-dlp-mcp is a powerful Model Context Protocol (MCP) server that brings video platform capabilities to AI agents. It allows you to search YouTube, download videos, extract metadata, get transcripts, and more through natural language commands, integrating with AI systems like Claude and Dive.
You need to install yt-dlp on your system first:
Windows:
winget install yt-dlp
macOS:
brew install yt-dlp
Linux:
pip install yt-dlp
{
"mcpServers": {
"yt-dlp": {
"command": "npx",
"args": ["-y", "@kevinwatt/yt-dlp-mcp"]
}
}
}
npm install -g @kevinwatt/yt-dlp-mcp
All tools are prefixed with ytdlp_ to avoid naming conflicts with other MCP servers.
ytdlp_list_subtitle_languages: List all available subtitle languages
ytdlp_download_video_subtitles: Download subtitles in VTT format
ytdlp_download_transcript: Generate clean plain text transcript
ytdlp_download_video: Download video to Downloads folder
ytdlp_download_audio: Extract and download audio only
ytdlp_get_video_metadata: Extract comprehensive video metadata
ytdlp_get_video_metadata_summary: Get human-readable metadata summary
"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"
"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
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://...
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "yt-dlp" '{"command":"npx","args":["-y","@kevinwatt/yt-dlp-mcp"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:
{
"mcpServers": {
"yt-dlp": {
"command": "npx",
"args": [
"-y",
"@kevinwatt/yt-dlp-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json2. Add this to your configuration file:
{
"mcpServers": {
"yt-dlp": {
"command": "npx",
"args": [
"-y",
"@kevinwatt/yt-dlp-mcp"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect