Sponsored by Deepsite.site

YouTube Comment Downloader MCP Server

Created By
suckerfish6 months ago
YouTube Comment Downloader MCP server that allows AI systems to download and analyze YouTube video comments without requiring API keys
Content

YouTube Comment Downloader MCP Server

A Model Context Protocol (MCP) server that provides AI systems with the ability to download and analyze YouTube video comments without requiring API keys.

Features

  • 4 specialized tools for different comment analysis needs
  • No authentication required - uses web scraping
  • Context-efficient statistics tool to avoid token bloat
  • Built-in capacity planning with memory and timeout limits
  • Engagement analysis with actual like-count sorting

MCP Client Configuration

Add this configuration block to your MCP client (e.g., Claude Desktop):

"ytcomment-mcp": {
  "command": "uv",
  "args": [
    "run",
    "--directory",
    "/Users/chad.kunsman/Documents/PythonProject/ytcomment_mcp",
    "src/server.py"
  ]
}

Available Tools

1. download_youtube_comments

Download raw comment data with full details.

  • Parameters: video_id, limit (1-10000), sort (0=popular, 1=recent)
  • Returns: Full comment dataset with all metadata
  • Use case: When you need complete comment data for analysis

2. get_comment_stats

Get statistical analysis without full comment data (context-efficient).

  • Parameters: video_id, limit, sort
  • Returns: Statistics + 5 sample comments (~200 tokens vs ~25,000)
  • Use case: Quick engagement insights without context bloat
  • Triggers: "how engaged", "what's the engagement", "comment patterns"

3. search_comments

Search for specific terms within comments.

  • Parameters: video_id, search_term, limit, sort
  • Returns: Matching comments + search metadata
  • Use case: Finding mentions, sentiment analysis, topic research
  • Triggers: "find comments about", "search for", "mentions of"

4. get_top_comments_by_likes

Get most-liked comments sorted by actual like count (not YouTube's "popular").

  • Parameters: video_id, top_count (1-100), sample_size (100-2000, default: 500)
  • Returns: Top comments ranked by likes + engagement stats
  • Use case: Finding viral comments that YouTube's algorithm might not surface first
  • Triggers: "most popular", "most liked", "viral comments", "best comments"

Quick Start

# Install dependencies
uv venv && source .venv/bin/activate
uv pip install -e .

# Test functionality
python test_server.py

# Run MCP server
python src/server.py

Data Structure

Each comment contains 11 fields:

  • cid, text, time, time_parsed, author, channel
  • votes (likes), replies, photo, heart, reply

Capacity: ~1.8KB memory, ~25 tokens per comment

Key Limitations & Performance

  • Flat structure: No hierarchical reply threading
  • Mixed results: Top-level + replies mixed together (~10%/90% split)
  • Rate limited: Built-in delays, ~30-90 sec per 500-1,000 comments
  • Timeout handling: Larger requests may timeout; tool includes fallbacks
  • No API quotas: Web scraping approach, but respect YouTube's terms

Performance Optimizations

  • Reduced timeouts: 90s default (was 120s) for faster failure detection
  • Smaller defaults: 500 comment samples (was 1000) for better reliability
  • Timeout fallbacks: get_top_comments_by_likes tries recent sort if popular fails
  • Context efficiency: Stats tool uses ~200 tokens vs ~25,000 for full data

Example Usage

# Get engagement overview (context-efficient)
stats = await get_comment_stats("dQw4w9WgXcQ", limit=1000)

# Find specific mentions
results = await search_comments("dQw4w9WgXcQ", "rickroll", limit=500) 

# Get viral comments by actual likes
top = await get_top_comments_by_likes("dQw4w9WgXcQ", top_count=20)

Built with FastMCP and youtube-comment-downloader.

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Amap Maps高德地图官方 MCP Server
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
ChatWiseThe second fastest AI chatbot™
WindsurfThe new purpose-built IDE to harness magic
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Playwright McpPlaywright MCP server
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
DeepChatYour AI Partner on Desktop
Tavily Mcp
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
CursorThe AI Code Editor
Serper MCP ServerA Serper MCP Server
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors