MCP YouTube-DLP
About
A Model Context Protocol (MCP) server that provides tools for downloading YouTube videos and audio using yt-dlp.
Details
- Author
- yorickchan
- GitHub stars
- 5
- Downloads
- 263
- Categories
- Media
Jump to
- Download YouTube videos in MP4 format
- Download YouTube audio in MP3 format
- Integration with MCP for AI assistant access
- Configurable download directory via environment variable
- Adjustable path to yt-dlp executable
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
MCP YouTube-DLPCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Clone the repository, install dependencies with pip install -e ., and start the server with python main.py. Configure the MCP client with the provided JSON block, setting the YT_DLP_PATH and DEFAULT_DOWNLOAD_DIR environment variables as needed.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"mcp youtube-dlp": {
"mcp_youtube_dlp": {
"command": "uv",
"args": [
"pip",
"install",
"-e",
"."
]
}
}
}
}
McpServers
{
"mcp_youtube_dlp": {
"command": "uv",
"args": [
"pip",
"install",
"-e",
"."
]
}
}
MCP YouTube-DLP
A Model Context Protocol (MCP) server that provides tools for downloading YouTube videos and audio using yt-dlp.
Features
- Download YouTube videos in MP4 format
- Download YouTube audio in MP3 format
- Integration with MCP for AI assistant integration
Prerequisites
- Python 3.13 or higher
- yt-dlp installed on your system
Installation
1. Clone this repository
2. Install dependencies:
pip install -e .
Or using uv:
uv pip install -e .
Usage
Running the Server
Start the MCP server:
python main.py
The server will start in stdio mode with debug enabled.
Environment Variables
- YT_DLP_PATH: Path to the yt-dlp executable (default: /usr/local/bin/yt-dlp)
- DEFAULT_DOWNLOAD_DIR: Directory where videos will be downloaded (default: ~/Downloads/youtube_downloads)
MCP Configuration
Add this configuration to your MCP setup:
{
"mcpServers": {
"mcp_youtube_dlp": {
"command": "uvx",
"args": [
"mcp[cli]",
"run",
"<install path>/mcp_youtube_dlp/main.py"
],
"env": {
"YT_DLP_PATH": "/usr/local/bin/yt-dlp",
"DEFAULT_DOWNLOAD_DIR": "~/Downloads/youtube_downloads"
}
}
}
}
Replace <install path> with the actual path where you installed this package.
Available Tools
download_youtube_video
Downloads a YouTube video in MP4 format.
Parameters:
- url: The YouTube video URL
Returns:
- A success or error message
download_youtube_audio
Downloads a YouTube video's audio in MP3 format.
Parameters:
- url: The YouTube video URL
Returns:
- A success or error message
MCP Integration
This server implements the Model Context Protocol, allowing AI assistants to access tools for downloading YouTube content. The server can be connected to any MCP-compatible client.
License
This project is licensed under the GNU General Public License, version 2 (GPL-2.0) - see the GNU website for details.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.
