YouTube Intelligence MCP
Integrates with Google OAuth and Google APIs, including YouTube Data API v3 and YouTube Analytics API v2, to access authenticated channel metrics, video details, and top comments for private channel audits.
Provides YouTube intelligence tools for flexible video/channel search, competitor channel analysis, outlier detection, competitor comparison, niche discovery, viral idea mining, video deep dives, and visual/OCR inspection of video frames. It can also connect to a YouTube channel to retrieve private analytics such as watch time, retention, CTR, and traffic sources.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@YouTube Intelligence MCP analyze @mkbhd's channel and show me its outlier videos"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🎯 YouTube Intelligence MCP
A powerful, self-hosted vidIQ alternative & YouTube channel command center for AI Agents.
Zero-quota competitor scraping, mathematical outlier detection, on-screen video vision OCR, international content arbitrage, and private channel analytics via OAuth2.
⚡ Why This Exists (The Problem with Traditional Tools)
Traditional YouTube intelligence platforms (like vidIQ or TubeBuddy) charge $40 to $100+/month, lock your historical data behind walled gardens, and give generic AI suggestions.
On the engineering side, building on the official Google YouTube Data API v3 carries a critical trap: the 10,000 units/day quota limit (a single search consumes 100 units, hitting rate-limits in minutes).
YouTube Intelligence MCP solves this with a Hybrid Engine Architecture:
Competitor & Market Intelligence (Zero Quota): Fast flat-playlist scraping via
yt-dlpextracts views, engagement, and metadata without spending a single Google API quota unit.True Outlier Math: Uses sample-median baseline calculation ($Multiplier = \frac{Views}{Median(Views_{last20})}$) to separate genuine breakout videos ($2.5\times$ to $25\times$) from channel subscriber momentum.
AI Video Vision & OCR: Extracts keyframes with FFmpeg and reads on-screen code, terminal commands, slides, and editor tabs using local Tesseract OCR.
International Content Arbitrage: Automatically discovers foreign breakout videos in your niche (e.g. US/EU creators with 20k subs getting 1M views) and adapts titles/hooks for the local market.
Private Channel Audit (via Google OAuth): Securely connects your channels to pull watch time, average retention %, CTR, and traffic source distribution (Search vs Browse/Suggested).
Related MCP server: riocloud-reader
🏗️ Architecture
graph TD
AI[AI Agent: Hermes / Claude / Codex / Cursor] -->|MCP Protocol / stdio| SERVER[FastMCP Server: yt-intelligence]
subgraph Market Intelligence [Zero API Quota Engine]
SERVER -->|Scrapes Flat Playlists| COMP[Competitor Engine: yt-dlp]
SERVER -->|Calculates Outlier Scores| OUTLIER[Outlier Math Engine: Medians & Multipliers]
SERVER -->|Discovers Viral Gringo Outliers| ARBITRAGE[International Content Arbitrage]
SERVER -->|Extracts Frames + OCR| VISION[Video Vision: FFmpeg + Tesseract]
SERVER -->|Niche Gaps & Durations| RADAR[Niche Radar Engine]
end
subgraph Owned Channels [Authenticated Engine]
SERVER -->|OAuth2 Refresh Tokens| AUTH[Headless OAuth Manager]
AUTH -->|Private Metrics & Retention| YT_ANALYTICS[YouTube Analytics API v2]
AUTH -->|Video Details & Top Comments| YT_DATA[YouTube Data API v3]
end🛠️ MCP Tools Catalog
This server exposes 9 comprehensive tools ready for any MCP-compliant client:
Tool Name | Description | Data Source | Quota Cost |
| Ultra-flexible YouTube search engine (filter by today, this week, view count, length, channel vs video, min/max views). | yt-dlp | 0 |
| Computes baseline median views and identifies outlier breakout videos for any channel. | yt-dlp | 0 |
| Returns only breakout videos exceeding the channel's performance threshold ($2.0\times+$). | yt-dlp | 0 |
| Side-by-side benchmark comparing subscribers, median views, and top breakout videos across 2-5 channels. | yt-dlp | 0 |
| Mines international viral videos in a niche and generates high-CTR localized angles and hooks. | Arbitrage Engine | 0 |
| Scans a topic to detect dominant channels, winning keywords, and optimal video duration. | Niche Engine | 0 |
| Extracts hidden creator tags, engagement rates (like/comment ratios), and audience questions. | Google API / yt-dlp | Minimal |
| Extracts key visual frames via FFmpeg and runs OCR to read code, slides, and editor text on screen. | FFmpeg + OCR | 0 |
| 30-day channel diagnostic: average retention %, subscriber conversion velocity, and traffic sources. | YouTube Analytics API | Minimal |
| Real-time overview of your connected channel (subscribers, views, recent uploads). | YouTube Data API | 1 unit |
🚀 Quickstart
1. Installation
# Clone the repository
git clone https://github.com/LucasOliveira09/yt-intelligence-mcp.git
cd yt-intelligence-mcp
# Create virtual environment and install dependencies
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt2. Standalone CLI Usage
The repository includes a rich terminal CLI for quick research without launching an agent:
# 1. Analyze any competitor channel for outliers (Zero Quota)
python -m src.cli analyze @BeroODev --limit 20
# 2. Mine international viral content opportunities (Content Arbitrage)
python -m src.cli arbitrage "GTA 6" --views 50000
# 3. Flexible search with filters (e.g., videos posted today, sorted by views)
python -m src.cli search "AI agents" --period this_week --sort view_count --limit 10
# 4. Connect your own YouTube channel via Google OAuth
python -m src.cli add-account my_channel🤖 MCP Client Setup
A. Hermes Agent (~/.hermes/config.yaml)
mcp_servers:
yt-intelligence:
command: /path/to/yt-intelligence-mcp/run_server.sh
enabled: trueB. Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"yt-intelligence": {
"command": "/path/to/yt-intelligence-mcp/.venv/bin/python",
"args": ["-m", "src.server"],
"cwd": "/path/to/yt-intelligence-mcp"
}
}
}C. Cursor (.cursor/mcp.json)
{
"mcpServers": {
"yt-intelligence": {
"command": "/path/to/yt-intelligence-mcp/run_server.sh"
}
}
}🔐 Security & Privacy Posture
Zero Credential Leaks: Refresh tokens and OAuth credentials are saved strictly to
data/accounts.jsonwithchmod 600permissions and are permanently ignored in.gitignore.Safe VPS Execution: Temporary video streams downloaded for frame extraction are deleted immediately after keyframe capture to prevent disk consumption.
Local First: Runs 100% on your own hardware or VPS over stdio without third-party telemetry.
📄 License
Distributed under the MIT License. Built by Lucas Leite de Oliveira.
Available Tools
13 toolsyt_analyze_competitorB
Analisa os vídeos recentes de um canal concorrente no YouTube. Calcula a mediana de visualizações e identifica os vídeos que furaram a bolha (outliers). Zero consumo de cota da API oficial do Google.
Inputs: channel (required), limit, threshold. Returns: result
yt_channel_audit_reportB
Gera um relatório de auditoria e diagnóstico estratégico do canal próprio nos últimos N dias. Avalia retenção média, conversão de inscritos, fontes de tráfego (Busca vs Sugeridos/Home) e prescreve um plano de ação para melhorar as próximas publicações.
Inputs: account_alias (required), days. Returns: result
yt_compare_competitorsB
Compara múltiplos canais concorrentes lado a lado. Compara base de inscritos, mediana de views e o principal vídeo outlier de cada criador.
Inputs: channels (required), limit_per_channel. Returns: result
yt_detect_outliersB
Retorna apenas a lista filtrada de vídeos outliers de um canal (performance >= threshold da mediana). Essencial para modelagem de títulos, ganchos e temas com tração comprovada.
Inputs: channel (required), limit, threshold. Returns: result
yt_get_video_transcriptB
Extrai a transcrição/legendas de um vídeo do YouTube para dissecação de roteiro e estrutura de gancho.
Inputs: video_url_or_id (required), lang. Returns: result
yt_inspect_video_visualsA
Inspeciona visualmente o que aparece na tela do vídeo (slides, código no editor, gráficos, telas). Extrai frames-chave com FFmpeg, roda OCR com Tesseract para ler o texto da tela, e disponibiliza os frames para análise visual detalhada da IA. Suporta arquivo local na VPS ou URL do YouTube (requer cookies.txt na VPS para streams do YouTube).
Inputs: video_source (required), max_frames, interval_seconds. Returns: result
yt_list_my_channelsA
Lista todas as contas próprias do YouTube autenticadas via OAuth2 no servidor. Exibe alias (ex: canal_dev, galuzera), nome do canal e channel_id.
Inputs: no named parameters. Returns: result
yt_mine_viral_gringo_ideasB
Minera ideias e pautas gringas virais (Arbitragem de Conteúdo Internacional). Localiza vídeos em canais médios/pequenos do exterior que explodiram o algoritmo (multiplicador >= 2.5x), analisa a estrutura do título e sugere a adaptação pronta para o público brasileiro (Galuzera / Dev). Zero cota de API.
Inputs: topic, min_views, seed_channels, min_multiplier. Returns: result
yt_my_channel_overviewB
Retorna métricas em tempo real de um canal próprio autenticado: total de inscritos, visualizações acumuladas, total de vídeos e últimos uploads.
Inputs: account_alias (required). Returns: result
yt_niche_radarB
Escaneia um nicho ou termo de busca no YouTube. Identifica:
Canais dominantes no topo das buscas.
Termos-chave e palavras mais repetidas nos títulos com alta performance.
Duração média ideal dos vídeos para reter o público desse nicho.
Padrão de formato recomendado (rápido, médio ou long-form).
Inputs: topic (required), sample_size. Returns: result
yt_search_flexibleA
Motor de busca completo e ultra-flexível do YouTube sem limite de cota de API. Permite filtrar exatamente o que você precisa:
sort_by: 'relevance', 'upload_date' (mais recentes primeiro), 'view_count' (mais vistos), 'rating'
upload_period: 'hour', 'today', 'this_week', 'this_month', 'this_year', ou None (todos)
duration: 'short' (<4 min), 'medium' (4-20 min), 'long' (>20 min), ou None (qualquer)
content_type: 'video', 'channel' (procurar criadores), 'playlist'
min_views: filtrar apenas vídeos acima de X visualizações
max_views: filtrar canais gigantes para achar canais pequenos/médios
exclude_shorts: True para ignorar Shorts (vídeos <= 60s) e focar em conteúdo longo
limit: quantidade de resultados (padrão 20)
Inputs: query (required), limit, sort_by, duration, +5 more. Returns: result
yt_search_trendsB
Busca rápida de vídeos recentes no YouTube sobre um tópico sem gastar cota de API.
Inputs: query (required), limit. Returns: result
yt_video_deep_diveB
Executa um Raio-X completo em qualquer vídeo do YouTube (próprio ou concorrente). Extrai:
Tags reais ocultas cadastradas pelo criador.
Taxa de like e taxa de comentários (nível real de engajamento).
Tópicos classificados pelo algoritmo do YouTube.
Mineração de dúvidas da audiência nos comentários (ideias de conteúdo que o concorrente deixou passar).
Inputs: video_url_or_id (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Several tools meaningfully overlap: yt_search_trends (quick recent search) is largely a subset of yt_search_flexible (full engine with filters), and yt_analyze_competitor already identifies outliers that yt_detect_outliers separately returns. yt_channel_audit_report vs yt_my_channel_overview and yt_niche_radar vs the search tools also share territory, though descriptions do provide hints to differentiate them.
All names use a clean yt_ prefix with snake_case, which is highly consistent. Most are verb_noun or verb_noun_modifier (yt_get_video_transcript, yt_analyze_competitor), with minor deviations into noun phrases (yt_my_channel_overview, yt_video_deep_dive, yt_niche_radar), but nothing jarring.
13 tools sit comfortably in the well-scoped 3-15 range for a YouTube analytics/intelligence server. Each tool maps to a distinct analytical capability (transcript, audit, search, competitor, outlier, visual, niche) and none feel like padding.
Coverage is broad and coherent for a creator-intelligence domain: own-channel metrics/audit, competitor analysis, outlier detection, niche scanning, transcripts, and visual OCR. Minor gaps exist around deeper single-video metadata or playlist-level operations, but core workflows are well supported.
Maintenance
Related MCP Connectors
Social media data for AI agents: creators, posts, comments, insights, trending across 6 platforms.
Social media analytics, video analysis, and competitor intel for any MCP-compatible AI agent.
Social media data API for AI agents. Live data from any public link, handle or search.
TikTok search demand, videos, creators, comments and captions for AI agents. OAuth or API key.
Related MCP Servers
AlicenseNot gradedqualityCmaintenanceSocial media analytics, post insights, and competitor benchmarking for AI agents.7MIT
riocloud-readerofficial
AlicenseNot gradedqualityDmaintenanceEnables AI agents to fetch and digest content from 30+ platforms (Twitter, YouTube, Reddit, etc.) via a unified API. Supports multi-format output, transcription, and direct Obsidian sync.18BSD 2-Clause "Simplified"- AlicenseNot gradedqualityCmaintenanceBrings social media analytics and content intelligence into any MCP-compatible AI agent, enabling analysis of your own videos, competitor research, and creator discovery via a hosted OAuth-authenticated server.11MIT
- AlicenseAqualityCmaintenanceEnables AI agents to search YouTube like a database, retrieve transcripts and channel data, and mine videos for claims, numbers, and demand signals — without needing an API key.676 npmMIT