YouTube Video Information Extractor MCP Server with Proxies
Extract YouTube video info with proxies using an MCP server for fast, reliable metadata retrieval and IP-managed requests.
Overview
This MCP (Model Context Protocol) server extracts YouTube video metadata while routing requests through configurable proxy pools. It’s intended for developers who need fast, reliable access to YouTube video information (title, description, thumbnails, duration, uploader, tags, etc.) without exposing a single source IP that might be rate-limited or blocked by YouTube. By combining a small HTTP extraction service with proxy management and optional caching, the server helps applications scale metadata collection and maintain uptime under IP-based throttling.
The server is implemented as a lightweight MCP-compatible service that accepts video URLs or IDs and returns normalized JSON metadata. It’s useful for analytics pipelines, content moderation systems, archiving tools, search/indexing crawlers, and any downstream system that requires consistent YouTube metadata without embedding scraping logic or proxy rotation in multiple places.
Features
- Extracts standard YouTube metadata: title, description, thumbnails, duration, view counts, upload date, author, tags, available formats.
- Configurable proxy pool with rotation strategies (round-robin, random).
- HTTP API compatible with MCP-style inference services for easy integration.
- Optional request-level timeouts and retry logic to handle transient failures.
- Caching layer to reduce repeated requests for the same video and lower proxy usage.
- Health and status endpoints for monitoring proxy health and server availability.
- Example client and CLI snippets for quick local testing.
Installation / Configuration
Clone the repository and install dependencies (Python example):
Environment configuration (example .env):
MCP_HOST=
MCP_PORT=8080
PROXIES_FILE=./config/proxies.txt
PROXY_ROTATION=round_robinREQUEST_TIMEOUT=15CACHE_ENABLED=true
CACHE_TTL=3600LOG_LEVEL=info
Example proxies file (proxies.txt). Each proxy on its own line; support for HTTP(S) proxies with auth:
http://username:[email protected]:3128
http://12.34.56.79:8080
socks5://user:[email protected]:1080
Start the server (example with uvicorn):
Or run with Docker (example Dockerfile provided in repo):
Available Tools / Resources
- HTTP API endpoint (MCP-style): POST /v1/extract — submit JSON payload containing a YouTube URL or ID and receive normalized metadata.
- Health endpoint: GET /health — basic liveness and readiness checks.
- Proxy manager: monitors proxy pool, performs basic validation and rotation.
- Example client: examples/client.py — demonstrates how to call the extraction endpoint and handle responses.
- Config templates: config/proxies.txt, config/example.env — starting points for production configuration.
API Example and Response Schema
Example request:
Typical JSON response fields:
| Field | Type | Description |
|---|---|---|
| id | string | YouTube video ID |
| title | string | Video title |
| description | string | Full description text |
| thumbnails | array | List of thumbnail URLs + sizes |
| duration | number | Duration in seconds |
| viewCount | number | View count (if available) |
| likeCount | number | Likes (if available) |
| author | object | Channel name and ID |
| uploadDate | string | ISO date of upload |
| tags | array | List of tags |
| formats | array | Available streaming formats / mime types |
| extractedAt | string | ISO timestamp when extraction happened |
| sourceProxy | string | Proxy used for the request (for debugging) |
Use Cases
- Scalable metadata ingestion: periodically extract metadata for large playlists or channel inventories while distributing requests across many proxies to avoid IP throttles.
- Content moderation pipelines: fetch descriptions, titles, tags and thumbnails for automated classifiers without embedding proxy logic in your moderation worker.
- Search and discovery: power a video indexer that needs up-to-date metadata and more reliable availability under rate limits.
- Archival and backup: gather consistent metadata snapshots for long-term storage, with caching to avoid repeated fetches of identical items.
- Regional testing: route requests through geo-located proxies to verify region-specific availability or metadata differences.
Best Practices & Troubleshooting
- Use HTTPS-capable proxies and ensure they support the required protocols (HTTP, HTTPS, or SOCKS5).
- Start with a modest proxy pool and increase size if you see rate limits or blocking; monitor /health and logs to detect failing proxies.
- Enable caching for frequently requested videos to reduce load and proxy usage.
- Tune REQUEST_TIMEOUT and retry logic to balance responsiveness and resilience against slow proxies.
- If extraction failures persist, rotate to fresh proxies and check whether YouTube responses require additional headers or