loading…
Search for a command to run...
loading…
An advanced MCP server that enables asynchronous downloading of YouTube videos and playlists with features for job tracking and library management. It utilizes
An advanced MCP server that enables asynchronous downloading of YouTube videos and playlists with features for job tracking and library management. It utilizes yt-dlp and an SQLite database to store metadata, monitor download status, and manage content through Claude Desktop.
A comprehensive collection of Python tools for downloading YouTube content using yt-dlp, including both simple scripts and an advanced MCP server.
youtube_downloader.py)Downloads individual YouTube videos with progress tracking.
playlist_downloader.py)Downloads entire YouTube playlists with organization.
youtube_mcp_server_fastmcp.py)An advanced MCP (Model Context Protocol) server using FastMCP that provides:
downloads folder for saved videosRun the single video downloader:
python3 youtube_downloader.py
Enter a YouTube URL when prompted
The video will be downloaded to the downloads folder
Run the playlist downloader:
python3 playlist_downloader.py
Enter a YouTube playlist URL when prompted
Review playlist information and confirm download
All videos will be downloaded to a playlist-specific folder
The MCP server provides four main tools for asynchronous downloading and library management.
cd /Users/granludo/code/testing/youtube_download
uv sync
uv run python start_server.py
python3 youtube_mcp_server_fastmcp.py
$ python3 youtube_downloader.py
==================================================
YouTube Video Downloader
==================================================
Enter YouTube URL: https://www.youtube.com/watch?v=dQw4w9WgXcQ
📥 Downloading video from: https://www.youtube.com/watch?v=dQw4w9WgXcQ
✓ Download completed!
📁 Files saved to: /path/to/downloads
$ python3 playlist_downloader.py
==================================================
YouTube Playlist Downloader
==================================================
Enter YouTube Playlist URL: https://www.youtube.com/playlist?list=PLrAXtmRdnEQy5rhxJj7aKre_2qO5yQ5nI
📊 Analyzing playlist...
📋 Playlist name: My Music Playlist
🎥 Number of videos: 25
🔄 Download 25 videos? (y/N): y
📥 Downloading playlist: My Music Playlist
✓ Playlist download completed!
📁 All videos saved to: /path/to/playlists/My Music Playlist
Install and run the server:
cd /Users/granludo/code/testing/youtube_download
uv sync # Install dependencies
uv run python start_server.py # Start server
The server will start silently (no stdout output, as required by MCP protocol)
Tool 1: Download Single Video
{
"name": "download_video",
"arguments": {
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"output_dir": "downloads"
}
}
Response: "Download started successfully. Job ID: abc123-def456-ghi789"
Tool 2: Download Playlist
{
"name": "download_playlist",
"arguments": {
"url": "https://www.youtube.com/playlist?list=PLrAXtmRdnEQy5rhxJj7aKre_2qO5yQ5nI",
"output_dir": "playlists"
}
}
Response: "Playlist download started successfully. Job ID: def456-ghi789-jkl012"
Tool 3: Check Download Status
{
"name": "get_download_status",
"arguments": {
"job_id": "abc123-def456-ghi789"
}
}
Response: JSON object with job status, progress, and metadata
Tool 4: List Downloads
{
"name": "list_downloads",
"arguments": {}
}
Response:
📹 VIDEOS:
- Never Gonna Give You Up (ID: video-uuid-123)
Path: /downloads/Never Gonna Give You Up.mp4
Duration: 213s
📁 PLAYLISTS:
- Music Collection (ID: playlist-uuid-456)
Videos: 25
Path: /playlists/Music Collection
Configure Claude Desktop - Add the MCP server to your claude_desktop_config.json:
{
"mcpServers": {
"youtube-mcp-tools": {
"command": "/opt/homebrew/bin/uv",
"args": [
"--directory",
"/Users/granludo/code/testing/youtube_download",
"run",
"start_server.py"
]
}
}
}
Download a video in Claude:
"Download this YouTube video: https://www.youtube.com/watch?v=jNQXAC9IVRw"
The server will start the download and return a job ID immediately.
Check download status:
"What's the status of that download?"
List all downloads:
"Show me all my download jobs"
youtube_library.db SQLite database for metadataДобавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"youtube-video-downloader-mcp": {
"command": "npx",
"args": []
}
}
}