Skip to main content
Glama
AgentX-ai

YouTube DLP MCP Server

by AgentX-ai
README.md
# YouTube DLP MCP Server

[![Website](https://img.shields.io/badge/Website-๐ŸŒ-purple)](https://www.agentx.so/mcp/youtube-dlp)
[![Discord](https://img.shields.io/badge/Discord-Join-7289DA?logo=discord&logoColor=white)](https://discord.gg/dJkAbUq9rU)

๐ŸŽฌ **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)

```bash
uvx youtube-dlp-server
```

### Install with pip

```bash
pip install youtube-dlp-server
youtube-dlp-server
```

### Install from source

```bash
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:

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

#### 2. **get-video-subtitles**

Extract subtitles and captions:

```json
{
  "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):

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

### Proxy Configuration

Set the `PROXY_URL` environment variable:

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

```bash
npx @modelcontextprotocol/inspector youtube-dlp-server
```

### Manual Testing

```bash
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](LICENSE) file for details.

## ๐Ÿ”— Links

- **Homepage**: [GitHub Repository](https://github.com/AgentX-ai/AgentX-mcp-servers/tree/main/youtube_dlp_server)
- **Issues**: [Report Issues](https://github.com/AgentX-ai/AgentX-mcp-servers/issues)
- **MCP Documentation**: [Model Context Protocol](https://modelcontextprotocol.io)

---

**Made with โค๏ธ for the AI community**

TDQS

A3.6/5.0

Scored across 3 tools

Disambiguation5/5

Each tool targets a clearly distinct data type: video metadata, subtitles, and comments. There is no overlap in purpose or expected output.

Naming Consistency5/5

All three tool names follow the exact same 'get-video-<detail>' pattern with consistent hyphenated lowercase naming. The convention is uniform and predictable.

Tool Count4/5

Three tools is on the lower end but each one earns its place for a focused YouTube metadata extraction server. The scope is narrow yet coherent.

Completeness2/5

Despite the server name referencing 'DLP' (download), there is no download or format-listing tool. The set only covers metadata, subtitles, and comments, leaving a significant gap for a server that implies downloading capability.

Maintenance

ActivityInactive
ResponsivenessUnresponsive