AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
MCP verified MIT Self-run

Youtube Api Project

mcp-labeveryday-youtube-api-project · by labeveryday

This repo is focused on helping creators analyze and improve their YouTube channels

No reviews yet
0 installs
38 views
0.0% view→install

Install

$ agentstack add mcp-labeveryday-youtube-api-project

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets Used
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/mcp-labeveryday-youtube-api-project)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
stale · 1y ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Youtube Api Project? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

YouTube API MCP Server

A reliable YouTube content extraction server using Google Data API v3 for dramatically improved reliability over yt-dlp based solutions.

🎯 100% Function Success Rate - Production Ready!

Tested and verified with real YouTube content:

  • ✅ Video information extraction with engagement metrics (11.44% engagement rate)
  • ✅ Comment extraction with threading (3+ comments per video)
  • ✅ YouTube search functionality (Python programming tutorials)
  • ✅ Channel information and statistics (Du'An Lightfoot channel)
  • ✅ Video engagement analysis with industry benchmarks (Excellent tier)
  • ✅ Transcript extraction (271 segments, 884 seconds)
  • ✅ Transcript search capabilities (keyword matching)
  • Playlist information extraction ("Certifications" playlist, 8 videos)
  • ✅ Health monitoring and statistics (100% uptime)

Key Improvements Over yt-dlp

| Feature | yt-dlp | YouTube API v3 | Improvement | |---------|--------|----------------|-------------| | Success Rate | ~30-70% | 100% | +30-70% | | Video Info | Unreliable | ✅ Always works | Consistent data | | Comments | ~20% success | ✅ Reliable threading | 5x better | | Search | Not supported | ✅ Native API | New capability | | Speed | 15-30 seconds | ✅ 1-3 seconds | 10x faster | | Engagement | Basic stats | ✅ Rich metrics | Industry benchmarks |

Features

  • 100% Reliability: Uses official YouTube Data API v3 instead of scraping
  • Comprehensive Data: Video info, channel data, comments, search, playlists
  • Smart Rate Limiting: Respects API quotas with intelligent caching
  • Rich Engagement Metrics: Calculate engagement rates with industry benchmarks
  • Hybrid Transcripts: Falls back to yt-dlp only for transcript extraction
  • Full MCP Integration: 15 tools ready for Claude Desktop
  • Production Testing: Verified with real content and edge cases

Quick Start

  1. Get YouTube Data API Key:
  1. Install:

``bash uv sync # or pip install -e . ``

  1. Configure:

``bash cp .env.example .env # Edit .env and add: YOUTUBE_API_KEY=your_api_key_here ``

  1. Test:

``bash uv run python examples/basic_usage.py ``

  1. Run MCP Server:

```bash # Via entry point script (recommended) uv run python server.py

# Via installed package uv run youtube-api-mcp-server

# For MCP Inspector testing npx @modelcontextprotocol/inspector uv --directory ./ run server.py ```

Verified MCP Tools (15 total)

getvideoinfo - Extract video metadata with engagement metrics ✅ getvideocomments - Reliable comment extraction with threading ✅ getvideocommentsbatch - Extract large numbers of comments ✅ searchyoutube - Native YouTube search functionality ✅ getchannelinfo - Complete channel statistics and data ✅ analyzevideoengagement - Industry benchmark analysis ✅ getvideotranscript - Transcript extraction via yt-dlp fallback ✅ searchtranscript - Search within video transcripts ✅ getplaylistinfo - Playlist details and video lists ✅ gettrendingvideos - Regional trending content ✅ batchextracturls - Concurrent processing of multiple URLs ✅ getextractorhealth - Health monitoring and diagnostics ✅ clearextractorcache - Cache management ✅ getextractor_config - Configuration inspection

API Quota Usage

  • Free Tier: 10,000 units/day
  • Video Info: 1 unit per request
  • Comments: ~1 unit per comment thread
  • Search: 100 units per request
  • Typical Usage: ~101 units per full video analysis
  • Daily Capacity: ~99 complete video analyses

MCP Server Configuration

Claude Code Setup

Configure the YouTube MCP server with Claude Code:

# Basic configuration (local scope - default)
claude mcp add youtube-api --env YOUTUBE_API_KEY=your_api_key_here \
  -- uv --directory /path/to/youtube-api-project run python server.py

# User scope - available across all your projects
claude mcp add youtube-api --scope user \
  --env YOUTUBE_API_KEY=your_api_key_here \
  -- uv --directory /path/to/youtube-api-project run python server.py

# With additional environment variables
claude mcp add youtube-api --scope user \
  --env YOUTUBE_API_KEY=your_api_key_here \
  --env YOUTUBE_CACHE_TTL=7200 \
  --env YOUTUBE_LOG_LEVEL=DEBUG \
  -- uv --directory /path/to/youtube-api-project run python server.py

# For team sharing (creates .mcp.json file)
claude mcp add youtube-api --scope project \
  --env YOUTUBE_API_KEY=your_api_key_here \
  -- uv --directory /path/to/youtube-api-project run python server.py

Scope Options:

  • --scope local (default): Only you, current project only
  • --scope user: Available to you across all projects (recommended)
  • --scope project: Shared with team via .mcp.json file

Manage your server:

claude mcp list              # List all configured servers
claude mcp get youtube-api    # Check server details
claude mcp remove youtube-api # Remove server

Within Claude Code:

/mcp                         # Check server status
@youtube-api:                # Reference MCP resources (if supported)

Claude Desktop Setup

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "youtube-api": {
      "command": "uv",
      "args": ["run", "python", "server.py"],
      "cwd": "/path/to/youtube-api-project",
      "env": {
        "YOUTUBE_API_KEY": "your_youtube_api_key_here"
      }
    }
  }
}

Environment Variables

All environment variables use the YOUTUBE_ prefix:

Required:

  • YOUTUBE_API_KEY - Your YouTube Data API v3 key

Optional Configuration:

# API Configuration
YOUTUBE_API_VERSION=v3                           # Default: v3
YOUTUBE_MY_CHANNEL_ID=your_channel_id           # For private data
YOUTUBE_MY_UPLOADED_VIDEO_PLAYLIST_ID=playlist  # Your uploads playlist

# Rate Limiting
YOUTUBE_DAILY_QUOTA_LIMIT=10000                  # Default: 10000
YOUTUBE_REQUESTS_PER_SECOND=10.0                 # Default: 10.0

# Caching
YOUTUBE_CACHE_ENABLED=true                       # Default: true
YOUTUBE_CACHE_TTL=3600                          # Default: 3600 seconds
YOUTUBE_CACHE_MAX_SIZE=1000                     # Default: 1000 entries

# Fallback & Logging
YOUTUBE_ENABLE_YTDLP_FALLBACK=true              # Default: true
YOUTUBE_YTDLP_RATE_LIMIT=500K                   # Default: 500K
YOUTUBE_LOG_LEVEL=INFO                          # Default: INFO

Advanced Claude Desktop Config:

{
  "mcpServers": {
    "youtube-api": {
      "command": "uv",
      "args": ["run", "python", "server.py"],
      "cwd": "/path/to/youtube-api-project",
      "env": {
        "YOUTUBE_API_KEY": "your_api_key_here",
        "YOUTUBE_CACHE_TTL": "7200",
        "YOUTUBE_LOG_LEVEL": "DEBUG",
        "YOUTUBE_REQUESTS_PER_SECOND": "5.0"
      }
    }
  }
}

Alternative Entry Points

# Direct script execution
uv run python server.py

# Installed package command
uv run youtube-api-mcp-server

# With environment variables
YOUTUBE_API_KEY=your_key uv run python server.py

Testing Results

Latest Test Results (verified with real content):

  • ✅ Video: "10 Reasons You Are Not Successful in Your I.T. Career"
  • ✅ Channel: Du'An Lightfoot analysis
  • ✅ Comments: 3+ extracted with threading
  • ✅ Engagement: 11.44% (Excellent tier)
  • ✅ Transcript: 271 segments, 884 seconds
  • Playlist: "Certifications" with 8 videos successfully extracted
  • Function Success Rate: 100% (9/9 functions working)
  • ✅ API Usage: Efficient quota management

Migration from yt-dlp

This server provides the same MCP interface as yt-dlp based servers but with dramatically higher reliability.

Migration Benefits:

  • Reliability: 30-70% → 100% success rate
  • Speed: 15-30s → 1-3s response times
  • Data Quality: Inconsistent → Structured, comprehensive
  • New Features: Engagement analysis, proper search, comment threading, playlist support

See MIGRATION_GUIDE.md for detailed migration instructions and comparison.

Examples

Run the examples to see all features in action:

uv run python examples/basic_usage.py      # Test all major functions
uv run python examples/api_setup_guide.py  # Validate API setup
uv run python examples/comparison_demo.py  # See reliability improvements

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.