Labsco
kevinwatt logo

yt-dlp

β˜… 258

from kevinwatt

Download video and audio content from various websites like YouTube, Facebook, and Tiktok using yt-dlp.

πŸ”₯πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedFreeQuick setup

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

Features β€’ Installation β€’ Tools β€’ Usage β€’ Documentation

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

πŸ› οΈ 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>

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
  • Graceful Degradation: On platforms without parent metadata, threaded mode falls back to root-only comments
</td> </tr> <tr> <td><code>ytdlp_get_video_comments_summary</code></td> <td>

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
</td> </tr> </table>

πŸ“– Documentation


πŸ—οΈ 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:

Copy & paste β€” that's it
{
  "total": 50,
  "count": 10,
  "offset": 0,
  "videos": [...],
  "has_more": true,
  "next_offset": 10
}

Markdown Format

Human-readable display:

Copy & paste β€” that's it
Found 50 videos (showing 10):

1. **Video Title**
   πŸ“Ί Channel: Creator Name
   ⏱️  Duration: 10:30
   πŸ”— URL: https://...

Comment Markdown Tree

Useful for LLM analysis when reply context matters:

Copy & paste β€” that's it
# AI-Ready Comment Threads

source_title: "Sample Video"
comments_detected: 20
root_threads: 6
reply_comments: 14

## Threads

### Thread 1

- comment_id: "abc123"
  parent_id: "root"
  depth: 0
  reply_count: 2
  text:
    | Root comment text
  - comment_id: "reply456"
    parent_id: "abc123"
    depth: 1
    reply_count: 0
    text:
      | Reply text

Comment Limits

YouTube comment extraction supports the full extractor tuple:

Copy & paste β€” that's it
youtube:comment_sort=<sort>;max_comments=<total>,<parents>,<replies>,<repliesPerThread>,<depth>

Examples:

  • Default behavior: maxComments=20 yields max_comments=20,20,20,20,2
  • Root-only comments: maxDepth=1, maxRepliesPerThread=0
  • Limited branching: maxReplies=40, maxRepliesPerThread=5, maxDepth=2

πŸ”’ 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


<div align="center">

⬆ Back to Top

</div>