YouTube Downloader

by kevinwatt

84 stars
9k downloads
Not rated
GitHub

About

Integrates with YouTube using yt-dlp to enable downloading of videos and subtitles for content analysis and processing tasks.

Details

Author
kevinwatt
Repository
kevinwatt/yt-dlp-mcp
GitHub stars
84
Downloads
9,049
License
MIT License
Categories
Web Scraping, Other, Media, Productivity, Developer Tools, Design, AI, Project Management, Infrastructure
Tags
#mobile, #integration

<table>
<tr>
<td width="50%">

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:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name YouTube Downloader
    Command (node, npx, python, etc.) npx
    Arguments
    • Argument 1 -y
    • Argument 2 @kevinwatt/yt-dlp-mcp@latest

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Add the following config to your MCP client:

{
  "mcpServers": {
    "yt-dlp": {
      "command": "npx",
      "args": ["-y", "@kevinwatt/yt-dlp-mcp@latest"]
    }
  }
}

<details open>
<summary><strong>Dive</strong></summary>

1. Open Dive Desktop
2. Click "+ Add MCP Server"
3. Paste the config provided above
4. Click "Save" and you're ready!

</details>

<details>
<summary><strong>Claude Code</strong></summary>

Use the Claude Code CLI to add the yt-dlp MCP server (guide):

claude mcp add yt-dlp npx @kevinwatt/yt-dlp-mcp@latest

</details>

<details>
<summary><strong>Claude Desktop</strong></summary>

Add to your claude_desktop_config.json:

- macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
- Windows: %APPDATA%\Claude\claude_desktop_config.json
- Linux: ~/.config/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "yt-dlp": {
      "command": "npx",
      "args": ["-y", "@kevinwatt/yt-dlp-mcp@latest"]
    }
  }
}

</details>

<details>
<summary><strong>Cursor</strong></summary>

Go to Cursor Settings -> MCP -> New MCP Server. Use the config provided above.

</details>

<details>
<summary><strong>VS Code / Copilot</strong></summary>

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.

</details>

<details>
<summary><strong>Windsurf</strong></summary>

Follow the configure MCP guide using the standard config from above.

</details>

<details>
<summary><strong>Cline</strong></summary>

Follow Cline MCP configuration guide and use the config provided above.

</details>

<details>
<summary><strong>Warp</strong></summary>

Go to Settings | AI | Manage MCP Servers -> + Add to add an MCP Server. Use the config provided above.

</details>

<details>
<summary><strong>JetBrains AI Assistant</strong></summary>

Go to Settings | Tools | AI Assistant | Model Context Protocol (MCP) -> Add. Use the config provided above.

</details>

npm install -g @kevinwatt/yt-dlp-mcp

---


All tools read your yt-dlp config file (~/.config/yt-dlp/config), so any
--proxy, --cookies or other options set there apply automatically. This is
the only channel available to MCP clients that cannot pass environment
variables to the server process.

These are alternatives — set only the one you need:

| Setting | Effect |
|---------|--------|
| YTDLP_PROXY=socks5://127.0.0.1:1080 | Route all requests through this proxy |
| YTDLP_PROXY= (empty) | Force a direct connection, overriding a proxy in the yt-dlp config file |
| YTDLP_IGNORE_CONFIG=1 | Skip all yt-dlp config files |

Supported proxy schemes: http, https, socks4, socks5, socks5h.

> YTDLP_IGNORE_CONFIG=1 is not a straight revert to 0.9.x. The search,
> metadata and comments tools always read the config file, so this setting
> stops them from doing so as well.

MCP Configuration with a proxy:

json
{
"mcpServers": {
"yt-dlp": {
"command": "npx",
"args": ["-y", "@kevinwatt/yt-dlp-mcp@latest"],
"env": {
"YTDLP_PROXY": "socks5://127.0.0.1:1080"
}
}
}
}

If your MCP client cannot pass environment variables to the server, put the
options in ~/.config/yt-dlp/config instead — every tool reads that file:


--proxy socks5://127.0.0.1:1080
--cookies /path/to/cookies.txt

> Note: Your config file applies to downloads as well. Options that change
> the output format (-x, --remux-video, --recode-video) change what the
> download tools produce; the tools report the file yt-dlp actually wrote, so
> the reported name stays correct. Output-location options (-o, -P) have no
> effect, because the tools always pass an absolute --output on the command
> line, which takes precedence.
>
> Note: yt-dlp config files can contain options that execute commands
> (--exec, --postprocessor-args, --ffmpeg-location). These now run on
> tool invocations too, including ones triggered by an AI assistant. Set
> YTDLP_IGNORE_CONFIG=1 if you would rather the server ignore your config
> file entirely.

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/

bash

ytdlp_search_videos

Search YouTube with pagination and date filtering support. Parameters: query, maxResults, offset, response_format, uploadDateFilter. Date Filter: hour, today, week, month, year (optional). Returns: Video list with titles, channels, durations, URLs. Supports: JSON and Markdown formats.

ytdlp_list_subtitle_languages

List all available subtitle languages for a video. Parameters: url. Returns: Available languages, formats, auto-generated status.

ytdlp_download_video_subtitles

Download subtitles in VTT format with timestamps. Parameters: url, language (optional). Returns: Raw VTT subtitle content.

ytdlp_download_transcript

Generate clean plain text transcript. Parameters: url, language (optional). Returns: Cleaned text without timestamps or formatting.

ytdlp_download_video

Download video to Downloads folder. Parameters: url, resolution, startTime, endTime. Resolutions: 480p, 720p, 1080p, best. Supports: Video trimming.

ytdlp_download_audio

Extract and download audio only. Parameters: url. Format: Best quality M4A/MP3.

ytdlp_get_video_metadata

Extract comprehensive video metadata in JSON. Parameters: url, fields (optional array). Returns: Complete metadata or filtered fields. Includes: Views, likes, upload date, tags, formats, etc.

ytdlp_get_video_metadata_summary

Get human-readable metadata summary. Parameters: url. Returns: Formatted text with key information.

ytdlp_get_video_comments

Extract comments in flat JSON, threaded JSON, or AI-friendly Markdown. Parameters: url, maxComments, sortOrder, view, responseFormat, maxParents, maxReplies, maxRepliesPerThread, maxDepth. Views: flat (default) or threaded. Formats: json (default) or markdown_tree (markdown_tree requires threaded view). Returns: Comment objects with depth, reply_count, root_threads, reply_comments, orphan_comments.

ytdlp_get_video_comments_summary

Get a human-readable summary of comments. Parameters: url, maxComments, view. Views: flat (linear summary) or threaded (grouped reply trees). Returns: Readable comment digest with author badges, time, likes, and grouped replies.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "youtube downloader": {
            "cwd": null,
            "env": {},
            "args": [
                "-y",
                "@kevinwatt/yt-dlp-mcp@latest"
            ],
            "shell": false,
            "command": "npx"
        }
    }
}

Linux

{
    "cwd": null,
    "env": [],
    "args": [
        "-y",
        "@kevinwatt/yt-dlp-mcp@latest"
    ],
    "shell": false,
    "command": "npx"
}

Macos

{
    "cwd": null,
    "env": [],
    "args": [
        "-y",
        "@kevinwatt/yt-dlp-mcp@latest"
    ],
    "shell": false,
    "command": "npx"
}

Windows

{
    "cwd": null,
    "env": [],
    "args": [
        "/c",
        "npx",
        "-y",
        "@kevinwatt/yt-dlp-mcp@latest"
    ],
    "shell": false,
    "command": "cmd"
}

🎬 yt-dlp-mcp

<div align="center">

A powerful MCP server that brings video platform capabilities to your AI agents

npm version
License: MIT
Node.js Version
TypeScript

Integrate yt-dlp with Claude, Dive, and other MCP-compatible AI systems. Download videos, extract metadata, get transcripts, and more — all through natural language.

FeaturesInstallationToolsUsageDocumentation

</div>

---

✨ Features

<table>
<tr>
<td width="50%">

🔍 Search & Discovery

- Search YouTube with pagination - JSON or Markdown output formats - Filter by relevance and quality

📊 Metadata Extraction

- Comprehensive video information - Channel details and statistics - Upload dates, tags, categories - No content download required

📝 Transcript & Subtitles

- Download subtitles in VTT format - Generate clean text transcripts - Multi-language support - Auto-generated captions

</td>
<td width="50%">

🎥 Video Downloads

- Resolution control (480p-1080p) - Video trimming support - Platform-agnostic (YouTube, Facebook, etc.) - Saved to Downloads folder

🎵 Audio Extraction

- Best quality audio (M4A/MP3) - Direct audio-only downloads - Perfect for podcasts & music

🛡️ Privacy & Safety

- No tracking or analytics - Direct downloads via yt-dlp - Zod schema validation - Character limits for LLM safety

</td>
</tr>
</table>

---

🚀 Installation

Prerequisites

Install yt-dlp on your system:

<table>
<tr>
<th>Platform</th>
<th>Command</th>
</tr>
<tr>
<td>🪟 <strong>Windows</strong></td>
<td><code>winget install yt-dlp</code></td>
</tr>
<tr>
<td>🍎 <strong>macOS</strong></td>
<td><code>brew install yt-dlp</code></td>
</tr>
<tr>
<td>🐧 <strong>Linux</strong></td>
<td><code>pip install yt-dlp</code></td>
</tr>
</table>

Getting Started

Add the following config to your MCP client:

{
  "mcpServers": {
    "yt-dlp": {
      "command": "npx",
      "args": ["-y", "@kevinwatt/yt-dlp-mcp@latest"]
    }
  }
}

MCP Client Configuration

<details open>
<summary><strong>Dive</strong></summary>

1. Open Dive Desktop
2. Click "+ Add MCP Server"
3. Paste the config provided above
4. Click "Save" and you're ready!

</details>

<details>
<summary><strong>Claude Code</strong></summary>

Use the Claude Code CLI to add the yt-dlp MCP server (guide):

claude mcp add yt-dlp npx @kevinwatt/yt-dlp-mcp@latest

</details>

<details>
<summary><strong>Claude Desktop</strong></summary>

Add to your claude_desktop_config.json:

- macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
- Windows: %APPDATA%\Claude\claude_desktop_config.json
- Linux: ~/.config/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "yt-dlp": {
      "command": "npx",
      "args": ["-y", "@kevinwatt/yt-dlp-mcp@latest"]
    }
  }
}

</details>

<details>
<summary><strong>Cursor</strong></summary>

Go to Cursor Settings -> MCP -> New MCP Server. Use the config provided above.

</details>

<details>
<summary><strong>VS Code / Copilot</strong></summary>

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.

</details>

<details>
<summary><strong>Windsurf</strong></summary>

Follow the configure MCP guide using the standard config from above.

</details>

<details>
<summary><strong>Cline</strong></summary>

Follow Cline MCP configuration guide and use the config provided above.

</details>

<details>
<summary><strong>Warp</strong></summary>

Go to Settings | AI | Manage MCP Servers -> + Add to add an MCP Server. Use the config provided above.

</details>

<details>
<summary><strong>JetBrains AI Assistant</strong></summary>

Go to Settings | Tools | AI Assistant | Model Context Protocol (MCP) -> Add. Use the config provided above.

</details>

Manual Installation

npm install -g @kevinwatt/yt-dlp-mcp

---

🛠️ Available Tools

All tools are prefixed with ytdlp_ to avoid naming conflicts with other MCP servers.

🔍 Search & Discovery

<table>
<tr>
<th width="30%">Tool</th>
<th width="70%">Description</th>
</tr>
<tr>
<td><code>ytdlp_search_videos</code></td>
<td>

Search YouTube with pagination and date filtering support
- Parameters: query, maxResults, offset, response_format, uploadDateFilter
- Date Filter: hour, today, week, month, year (optional)
- Returns: Video list with titles, channels, durations, URLs
- Supports: JSON and Markdown formats

</td>
</tr>
</table>

📝 Subtitles & Transcripts

<table>
<tr>
<th width="30%">Tool</th>
<th width="70%">Description</th>
</tr>
<tr>
<td><code>ytdlp_list_subtitle_languages</code></td>
<td>

List all available subtitle languages for a video
- Parameters: url
- Returns: Available languages, formats, auto-generated status

</td>
</tr>
<tr>
<td><code>ytdlp_download_video_subtitles</code></td>
<td>

Download subtitles in VTT format with timestamps
- Parameters: url, language (optional)
- Returns: Raw VTT subtitle content

</td>
</tr>
<tr>
<td><code>ytdlp_download_transcript</code></td>
<td>

Generate clean plain text transcript
- Parameters: url, language (optional)
- Returns: Cleaned text without timestamps or formatting

</td>
</tr>
</table>

🎥 Video & Audio Downloads

<table>
<tr>
<th width="30%">Tool</th>
<th width="70%">Description</th>
</tr>
<tr>
<td><code>ytdlp_download_video</code></td>
<td>

Download video to Downloads folder
- Parameters: url, resolution, startTime, endTime
- Resolutions: 480p, 720p, 1080p, best
- Supports: Video trimming

</td>
</tr>
<tr>
<td><code>ytdlp_download_audio</code></td>
<td>

Extract and download audio only
- Parameters: url
- Format: Best quality M4A/MP3

</td>
</tr>
</table>

📊 Metadata

<table>
<tr>
<th width="30%">Tool</th>
<th width="70%">Description</th>
</tr>
<tr>
<td><code>ytdlp_get_video_metadata</code></td>
<td>

Extract comprehensive video metadata in JSON
- Parameters: url, fields (optional array)
- Returns: Complete metadata or filtered fields
- Includes: Views, likes, upload date, tags, formats, etc.

</td>
</tr>
<tr>
<td><code>ytdlp_get_video_metadata_summary</code></td>
<td>

Get human-readable metadata summary
- Parameters: url
- Returns: Formatted text with key information

</td>
</tr>
</table>

💬 Comments

<table>
<tr>
<th width="30%">Tool</th>
<th width="70%">Description</th>
</tr>
<tr>
<td><code>ytdlp_get_video_comments</code></td>
<td>

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.