
Give your agents the ability to download videos from 1000+ sites with built-in security
概览
This MCP server provides 7 discrete tools that agents can use to check, analyze, and download videos from nearly any web page. Built on yt-dlp with security validation and fallback analysis. - - Discrete capabilities for checking, analyzing, and downloading videos - - Path validation, location restrictions, and input sanitization - - YouTube, Facebook, TikTok, and hundreds more via yt-dlp - - Pattern matching when yt-dlp doesn't support a site - - Configurable secure locations with filename templates - - Clean JSON responses and structured error handling Add to your MCP client configuration (e.g., Claude Desktop): Your agent can now download videos with simple tool calls: - - Blocks ../ directory escape attempts - - Downloads only to configured safe directories - - Allows only safe file types (video/audio/subtitles) - - Removes dangerous shell characters - - No deserialization vulnerabilities The server creates ~/.config/video-downloader-mcp/config.toml automatically.
README
以下为原文 README 节选,完整内容请查看原文。
🎬 Video Downloader MCP Server
Give your agents the ability to download videos from 1000+ sites with built-in security. This MCP server provides 7 discrete tools that agents can use to check, analyze, and download videos from nearly any web page. Built on yt-dlp with security validation and fallback analysis.
🌟 Features
- 🛠️ 7 MCP Tools - Discrete capabilities for checking, analyzing, and downloading videos
- 🔒 Built-in Security - Path validation, location restrictions, and input sanitization
- 🌐 1000+ Sites Supported - YouTube, Facebook, TikTok, and hundreds more via yt-dlp
- 🔄 Fallback Analysis - Pattern matching when yt-dlp doesn’t support a site
- 📁 Organized Downloads - Configurable secure locations with filename templates
- ⚙️ Agent-Friendly - Clean JSON responses and structured error handling
🚀 Quick Start
Installation
# Install dependencies
pip install mcp yt-dlp requests aiohttp
# For Python < 3.11, also install:
pip install tomli
# Clone the repository
git clone https://github.com/chazmaniandinkle/video-downloader-mcp.git
cd video-downloader-mcp
Configuration
Add to your MCP client configuration (e.g., Claude Desktop):
{
"mcpServers": {
"video-downloader": {
"command": "python",
"args": ["/path/to/video-downloader-mcp/server.py"]
}
}
}
First Download
Your agent can now download videos with simple tool calls:
# Agent workflow example
1. check_ytdlp_support("https://youtube.com/watch?v=example") # → supported: true
2. get_video_formats(url) # → analyze available qualities
3. download_video(url, location_id="default", format_id="best") # → download to ~/video-downloader/
🛠️ Available Tools
| Tool | Purpose | Example Usage |
|---|---|---|
check_ytdlp_support |
Quick URL validation | “Is this video URL supported?” |
get_video_info |
Extract metadata | “What’s the video duration and quality?” |
get_video_formats |
List quality options | “What download formats are available?” |
download_video |
Secure download | “Download this video in 1080p” |
get_download_locations |
Show safe locations | “Where can I save downloaded files?” |
analyze_webpage |
Fallback analysis | “yt-dlp failed, analyze the page” |
extract_media_patterns |
Pattern matching | “Find video URLs in this HTML” |
🔒 Security Features
Built-in Protection
- Path Traversal Prevention - Blocks
../directory escape attempts - Location Restrictions - Downloads only to configured safe directories
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"video-downloader": {
"command": "python",
"args": ["/path/to/video-downloader-mcp/server.py"]
}
}
}