home / mcp / youtube dlp mcp server

Youtube DLP MCP Server

Provides MCP access to YouTube metadata, subtitles, and top comments for AI integration.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "agentx-ai-youtube-dlp-server": {
      "command": "python",
      "args": [
        "-m",
        "youtube_dlp_server"
      ],
      "env": {
        "PROXY_URL": "http://proxy.example.com:8080"
      }
    }
  }
}

You can use this MCP server to let AI agents interact with YouTube videos through a standard MCP interface. It can extract video metadata, subtitles, and top comments without downloading the video, and it supports using proxies for remote environments. This makes it easy to build AI-assisted workflows that analyze YouTube content safely and efficiently.

How to use

To work with this MCP server, connect your MCP client and choose one of the available endpoints to perform the actions you need. You can retrieve comprehensive video information, fetch subtitles and captions, or obtain the top comments for a video. Use these tools to enrich your AI prompts, generate summaries, or perform content analysis without embedding large media assets.

How to install

Prerequisites you need before installing: - Python 3.11 or newer - yt-dlp for YouTube processing - MCP framework for AI integration (required to expose MCP endpoints)

# Install with uvx (Recommended)
uvx 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

Additional setup and testing

Proxy configuration lets you route requests through HTTP, HTTPS, or SOCKS proxies. Set the PROXY_URL environment variable before starting the server.

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

# SOCKS proxy with auth
export PROXY_URL="socks5://user:[email protected]:1080/"

# Run with proxy
youtube-dlp-server

Testing the server

You can verify the server works by performing a quick test to extract video info directly from Python code or by using an inspector tool during development.

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

Ensure you have Python 3.11+, yt-dlp installed, and the MCP framework ready to integrate with your AI workflows.

Notes

No large media files are downloaded when using this server. Only metadata, subtitles, and top comments are retrieved to enable efficient analysis and content understanding by your AI agents.

Available tools

get-video-info

Fetches comprehensive video metadata including title, views, likes, description, and other details.

get-video-subtitles

Downloads manual subtitles and auto-generated captions for specified languages.

get-top-comments

Retrieves the top YouTube comments by likes, with creator badges, up to a specified count.