YouTube MCP Server Enhanced

Provides YouTube data extraction and analysis via MCP with caching, retries, and health monitoring.
  • python

5

GitHub Stars

python

Language

5 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "labeveryday-youtube-mcp-server-enhanced": {
      "command": "uv",
      "args": [
        "run",
        "--directory",
        "/path/to/youtube-mcp-server-enhanced",
        "python",
        "-m",
        "src.youtube_mcp_server.server"
      ],
      "env": {
        "YOUTUBE_TIMEOUT": "600",
        "YOUTUBE_CACHE_TTL": "3600",
        "YOUTUBE_RATE_LIMIT": "500K",
        "YOUTUBE_MAX_RETRIES": "5",
        "YOUTUBE_RETRY_DELAY": "2.0",
        "YOUTUBE_ENABLE_CACHE": "true"
      }
    }
  }
}

You can use this YouTube MCP Server Enhanced to extract and analyze data from YouTube using yt-dlp. It aggregates video, channel, playlist, comments, and transcripts with powerful search, batch processing, caching, retries, and health monitoring to help you build analytics, reports, and data-driven insights from YouTube content.

How to use

Start by choosing an MCP client to connect to the server. You can run the server locally and connect via MCP clients that support stdio configuration, or you can point an HTTP endpoint at a remote MCP server if you have one set up. The server exposes tools for gathering video info, channel stats, playlist details, comments, transcripts, searches, and trending data. Use batch operations to process several URLs at once, and rely on the built-in caching and retry mechanisms to improve reliability during flaky networks or rate limits. Health checks help you verify the server and cache status at a glance.

How to install

Prerequisites are required before you install and run the server.

  1. Install the MCP runtime tool you will use to run servers (uv). You can install it with one of these options.
# Install uv (macOS/Linux)
curl -LsSf https://astral.sh/uv/install.sh | sh

# Or via Homebrew (macOS)
brew install uv

# Or via pip
pip install uv

Run the server locally

After you install uv and clone the server repository, use uv to run the MCP server so dependencies are managed and the correct environment is loaded.

# Start the MCP server (recommended)
uv run python -m src.youtube_mcp_server.server

# Or if you have a run_server.py file
uv run python run_server.py

Configuration

Configure runtime behavior using environment variables in a .env file at the project root. You can enable caching, set rate limits, configure retries, and adjust timeouts.

# Copy the example file
cp .env.example .env

# Edit with your preferred settings
nano .env

Usage patterns with MCP clients

  • Connect to the server using an MCP client configured for stdio with the uv command, or via an HTTP endpoint if you have a remote setup.
  • Use the following capabilities for practical workflows: get video info, channel details, playlist contents, and comments; retrieve transcripts; perform searches; and fetch trending videos.
  • For high-throughput needs, enable batch processing to run multiple extractions in parallel and rely on the TTL-based cache to reduce repeated work.

Available tools

get_video_info

Extract comprehensive video metadata including id, title, description, uploader, statistics, and duration.

get_channel_info

Fetch channel information and statistics such as subscriber count, video count, and total views.

get_playlist_info

Retrieve playlist details including the video list and total duration.

get_video_comments

Extract video comments and replies with engagement metrics.

get_video_transcript

Obtain transcripts or subtitles for a video.

search_youtube

Search for videos, channels, or playlists by query.

get_trending_videos

Get trending videos for a region.

analyze_video_engagement

Analyze engagement metrics for a video with benchmarks.

search_transcript

Search within video transcripts for a query.

batch_extract_urls

Process multiple URLs concurrently to extract data in one run.

get_extractor_health

Monitor extractor health and status.

get_extractor_config

Return current extractor configuration and state.

clear_extractor_cache

Clear all cached data to free resources.

analyze-video

Comprehensive video analysis with optional comments and transcript.

compare-videos

Compare engagement metrics across multiple videos.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
YouTube MCP Server Enhanced MCP Server - labeveryday/youtube-mcp-server-enhanced | VeilStrat