YouTube Downloader logo

YouTube Downloader

Community
kevinwatt

A Model Context Protocol (MCP) server that bridges Video & Audio content with Large Language Models using yt-dlp.

Publisherkevinwatt
Repositoryyt-dlp-mcp
LanguageTypeScript
Forks
55
Stars
237
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    YouTube Downloader exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    237 stars and 55 forks from the linked repository.

🎬 yt-dlp-mcp

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


✨ Features

🔍 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

🎥 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

🚀 Installation

Prerequisites

Install yt-dlp on your system:

Getting Started

Add the following config to your MCP client:

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

MCP Client Configuration

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

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

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

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
json
{
  "mcpServers": {
    "yt-dlp": {
      "command": "npx",
      "args": ["-y", "@kevinwatt/yt-dlp-mcp@latest"]
    }
  }
}

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

Install via the VS Code CLI:

bash
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.

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

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

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

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

Manual Installation

bash
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

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

📝 Subtitles & Transcripts

List all available subtitle languages for a video

  • Parameters: url
  • Returns: Available languages, formats, auto-generated status

Download subtitles in VTT format with timestamps

  • Parameters: url, language (optional)
  • Returns: Raw VTT subtitle content

Generate clean plain text transcript

  • Parameters: url, language (optional)
  • Returns: Cleaned text without timestamps or formatting

🎥 Video & Audio Downloads

Download video to Downloads folder

  • Parameters: url, resolution, startTime, endTime
  • Resolutions: 480p, 720p, 1080p, best
  • Supports: Video trimming

Extract and download audio only

  • Parameters: url
  • Format: Best quality M4A/MP3

📊 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.

Get human-readable metadata summary

  • Parameters: url
  • Returns: Formatted text with key information

💡 Usage Examples

Search Videos

"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

"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"

Download Subtitles & Transcripts

"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 Content

"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"

📖 Documentation


🔧 Configuration

Environment Variables

bash
# 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

Cookie Configuration

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
# Extract cookies from browser (recommended)
YTDLP_COOKIES_FROM_BROWSER=chrome

# Or use a cookie file
YTDLP_COOKIES_FILE=/path/to/cookies.txt

MCP Configuration with cookies:

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

Supported browsers: brave, chrome, chromium, edge, firefox, opera, safari, vivaldi, whale

See Cookie Configuration Guide for detailed setup instructions.


🏗️ Architecture

Built With

  • yt-dlp - Video extraction engine
  • MCP SDK - Model Context Protocol
  • Zod - TypeScript-first schema validation
  • TypeScript - Type safety and developer experience

Key Features

  • Type-Safe: Full TypeScript with strict mode
  • Validated Inputs: Zod schemas for runtime validation
  • Character Limits: Automatic truncation to prevent context overflow
  • Tool Annotations: readOnly, destructive, idempotent hints
  • Error Guidance: Actionable error messages for LLMs
  • Modular Design: Clean separation of concerns

📊 Response Formats

JSON Format

Perfect for programmatic processing:

json
{
  "total": 50,
  "count": 10,
  "offset": 0,
  "videos": [...],
  "has_more": true,
  "next_offset": 10
}

Markdown Format

Human-readable display:

markdown
Found 50 videos (showing 10):

1. **Video Title**
   📺 Channel: Creator Name
   ⏱️  Duration: 10:30
   🔗 URL: https://...

🔒 Privacy & Security

  • No Tracking: Direct downloads, no analytics
  • Input Validation: Zod schemas prevent injection
  • URL Validation: Strict URL format checking
  • Character Limits: Prevents context overflow attacks
  • Read-Only by Default: Most tools don't modify system state

🤝 Contributing

Contributions are welcome! Please check out our Contributing Guide.

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.


🙏 Acknowledgments

  • yt-dlp - The amazing video extraction tool
  • Anthropic - For the Model Context Protocol
  • Dive - MCP-compatible AI platform

📚 Related Projects


⬆ Back to Top

Installation

TypingMind
Prerequisites:

Node.js 18+

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

Use YouTube Downloader MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once YouTube Downloader is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add YouTube Downloader as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the YouTube Downloader MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "youtube-downloader": {
      "command": "npx",
      "args": [
        "-y",
        "@kevinwatt/yt-dlp-mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the YouTube Downloader MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the YouTube Downloader MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use YouTube Downloader to help me with this task?
YouTube Downloader
Sure. I read it.
Here is what I found using YouTube Downloader.

Frequently asked questions

What is the YouTube Downloader MCP server used for?

YouTube Downloader is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use YouTube Downloader MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use YouTube Downloader with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use YouTube Downloader MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With YouTube Downloader connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect YouTube Downloader MCP to TypingMind?

YouTube Downloader runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does YouTube Downloader MCP provide in TypingMind?

YouTube Downloader exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use YouTube Downloader MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If YouTube Downloader requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇