Skip to main content

Let your AI to view Youtube video, get info, subtitle and more. Even downloading.

Project description

YouTube DLP MCP Server

🎬 A Model Context Protocol (MCP) server that lets your AI interact with YouTube videos - extract video information, subtitles, and top comments without downloading.

✨ Features

  • 📹 Extract Video Info - Get comprehensive metadata (title, views, likes, description, etc.)
  • 📝 Extract Subtitles - Download manual subtitles and auto-generated captions
  • 💬 Extract Comments - Get top comments sorted by likes with creator badges
  • 🌐 Proxy Support - Works with HTTP/HTTPS/SOCKS proxies
  • 🚀 Fast & Async - Non-blocking operations using asyncio
  • 🔧 Easy Integration - Standard MCP protocol for AI assistants

🚀 Quick Start

Install with uvx (Recommended)

uvx run youtube-dlp-server

Install with pip

pip install youtube-dlp-server
youtube-dlp-server

Install from source

git clone <repository-url>
cd youtube-dlp-server
pip install -e .
python -m youtube_dlp_server

🛠️ Usage

Available Tools

1. get-video-info

Extract comprehensive video metadata:

{
  "name": "get-video-info",
  "arguments": {
    "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  }
}

2. get-video-subtitles

Extract subtitles and captions:

{
  "name": "get-video-subtitles",
  "arguments": {
    "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "languages": ["en", "es"],
    "include_auto_captions": true
  }
}

3. get-top-comments

Get top comments (max 20, default 10):

{
  "name": "get-top-comments",
  "arguments": {
    "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    "count": 10
  }
}

Proxy Configuration

Set the PROXY_URL environment variable:

# HTTP/HTTPS proxy
export PROXY_URL="http://proxy.example.com:8080"

# SOCKS proxy with auth
export PROXY_URL="socks5://user:pass@127.0.0.1:1080/"

# Run with proxy
youtube-dlp-server

🧪 Testing

With MCP Inspector

npx @modelcontextprotocol/inspector youtube-dlp-server

Manual Testing

python -c "
import asyncio
from youtube_dlp_server.helper import extract_video_info
async def test():
    info = await extract_video_info('https://www.youtube.com/watch?v=dQw4w9WgXcQ')
    print(f'✅ Video: {info[\"title\"]}')
asyncio.run(test())
"

📋 Requirements

  • Python 3.11+
  • yt-dlp for YouTube processing
  • MCP framework for AI integration

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests
  5. Submit a pull request

📄 License

MIT License - see LICENSE file for details.

🔗 Links


Made with ❤️ for the AI community

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

youtube_dlp_server-0.1.0.tar.gz (24.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

youtube_dlp_server-0.1.0-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file youtube_dlp_server-0.1.0.tar.gz.

File metadata

  • Download URL: youtube_dlp_server-0.1.0.tar.gz
  • Upload date:
  • Size: 24.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.11

File hashes

Hashes for youtube_dlp_server-0.1.0.tar.gz
Algorithm Hash digest
SHA256 79fc03d1b4137dfa0d061e4c7b0b8ba3f254b372f9b1a6ed8bc0f75b79cb2295
MD5 c0c4434f4b3d98714432757f543d345d
BLAKE2b-256 84e199d5e506c7a7e7ab5b92027d4a2a35d9ffc619ee27745095eb30471f68ad

See more details on using hashes here.

File details

Details for the file youtube_dlp_server-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for youtube_dlp_server-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 30d3ffa417f1cd2d8b10d1cf40fb9cb0356d11cdc436eecbeda21a8e4c601daf
MD5 99519a275a6eed4f97cb2c0a70e682b6
BLAKE2b-256 015d3e8750ba349fcdf79114a8b2096f6a8e67bec5896f9de535cbb04b757639

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page