tubemind-secure-mcp
Provides 18 tools for YouTube research, analytics, benchmarking and content strategy using the YouTube Data API v3 and YouTube Analytics API.
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., "@tubemind-secure-mcp show me my channel's analytics for last week"
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.
đŻ Why tubemind-secure-mcp?
Turn Claude into a YouTube growth strategist â without ever handing it your raw OAuth tokens.
⥠Plug-and-play with Claude Desktop â drop one config block, get 18 production tools.
đ Secure by default â tokens encrypted at rest (AES-256-GCM), SSRF guard, rate limiting, audit log, Zod-validated inputs. OWASP Top 10 mapped end-to-end.
đ Real data, not scraping â official YouTube Data API v3 + YouTube Analytics API. Brand Accounts supported.
đ§ Beyond raw API â built-in heuristics for CTR, retention, keyword difficulty, content gaps, hook angles and N-day content calendars.
đȘ¶ Tiny footprint â 3 runtime deps (
@modelcontextprotocol/sdk,googleapis,zod). Node â„ 20.
Related MCP server: MCP YouTube Intelligence
âš Overview
tubemind-secure-mcp is a Model Context Protocol (MCP) server that gives Claude Desktop (and any MCP client) 18 production-grade tools for working with YouTube:
đ Search & SEO â trending topics, keyword stats, tag suggestions
đș Video & Channel â list videos, read/update metadata, get tags
đ Analytics â channel analytics (views, watch time, retention) via YouTube Analytics API
đ Benchmark â compare your channel against competitors
đ§ Heuristics â keyword difficulty, title patterns, content gaps, hook angles, CTR potential, retention signals, content calendar
đ”ïž Competitor research â competitor video discovery
Built secure by design: OAuth2 (Brand Account ready), AES-256-GCM token encryption at rest, SSRF guard, rate limiting, audit logging, Zod input validation â mapped to OWASP Top 10.
đŠ Installation
# Global install
npm install -g tubemind-secure-mcp
# Or run on demand
npx tubemind-secure-mcpRequires Node.js â„ 20.
đ OAuth Setup (one-time)
YouTube APIs need an OAuth2 token. The package ships with an auth server that walks you through it.
1) Create OAuth credentials in Google Cloud
Go to Google Cloud Console â APIs & Services â Credentials
Enable YouTube Data API v3 and YouTube Analytics API
Create OAuth 2.0 Client ID â Web application
Authorized redirect URI:
http://localhost:4000/oauth/callbackCopy the Client ID and Client Secret
2) Configure environment
Copy .env.example to .env and fill in:
YOUTUBE_CLIENT_ID=your-client-id.apps.googleusercontent.com
YOUTUBE_CLIENT_SECRET=your-client-secret
YOUTUBE_REDIRECT_URI=http://localhost:4000/oauth/callback
# Generate with: openssl rand -hex 32
TOKEN_ENCRYPTION_KEY=your-64-char-hex-key
RATE_LIMIT_PER_MINUTE=60
REQUEST_TIMEOUT_MS=10000
AUDIT_LOG_PATH=./logs/audit.log
NODE_ENV=production3) Run the OAuth flow
pnpm auth
# or: npx tsx --env-file=.env src/auth-server.tsOpen http://localhost:4000, sign in with the Google account that owns the channel (Brand Accounts supported), authorize, and the encrypted token is saved to ./tokens/youtube.token.json.
đ€ Use with Claude Desktop
Add to claude_desktop_config.json:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"tubemind": {
"command": "npx",
"args": ["-y", "tubemind-secure-mcp"],
"env": {
"YOUTUBE_CLIENT_ID": "your-client-id.apps.googleusercontent.com",
"YOUTUBE_CLIENT_SECRET": "your-client-secret",
"YOUTUBE_REDIRECT_URI": "http://localhost:4000/oauth/callback",
"TOKEN_ENCRYPTION_KEY": "your-64-char-hex-key",
"RATE_LIMIT_PER_MINUTE": "60",
"REQUEST_TIMEOUT_MS": "10000",
"AUDIT_LOG_PATH": "./logs/audit.log",
"NODE_ENV": "production"
}
}
}
}Restart Claude Desktop. The 18 tools will appear automatically.
đ ïž Tools
Category | Tool | Description |
Search |
| Discover trending topics by region/category |
| Search volume signals for keywords | |
| Tag recommendations from a seed | |
Video |
| Read tags from a video |
| Update title/description/tags (write scope) | |
| Paginate channel uploads | |
Analytics |
| Views, watch time, retention (Analytics API) |
| Best day/hour heatmap to publish | |
Benchmark |
| Compare channel vs. peers |
Heuristics |
| Difficulty score 0â100 |
| Common patterns in top videos | |
| Topics competitors cover that you don't | |
Heuristics+ |
| CTR estimate from title/thumbnail signals |
| Hook angles for a topic | |
| Rising-momentum keywords | |
| Retention-shaping factors | |
| N-day content plan | |
Competitor |
| Top videos from a competitor channel |
All inputs are validated with Zod. All errors return safe messages (stack traces only when NODE_ENV=development).
đ Security
tubemind-secure-mcp is built secure-by-default. See SECURITY.md for the full posture mapped to OWASP Top 10.
Control | Implementation |
A01 â Broken Access Control | OAuth2 scopes least-privilege, audit log per call |
A02 â Cryptographic Failures | AES-256-GCM at rest for tokens, secrets via env only |
A03 â Injection | Zod schemas on every tool input |
A04 â Insecure Design | Rate limit, request timeout, SSRF guard (host whitelist) |
A05 â Misconfiguration |
|
A07 â AuthN Failures | OAuth2 PKCE-style flow, encrypted token storage |
A08 â Software/Data Integrity | Pinned deps, |
A09 â Logging Failures | Audit log of every tool call (timestamp, tool, success) |
A10 â SSRF | Outbound calls restricted to |
Found a vulnerability? Email wleandro.oliveira@gmail.com â 72h response.
đ§° Local development
pnpm install
pnpm dev # tsx watch on src/index.ts
pnpm build # tsc â dist/
pnpm typecheck
pnpm test
pnpm audit:securityđ License
MIT © Wanderson Leandro de Oliveira / Dewtech
Available Tools
18 toolsanalyze_retention_signalsA
Analisa proxies de retenção (engagement rate, amplification, duração, capĂtulos) dos top vĂdeos do nicho. Identifica padrĂ”es estruturais dos vĂdeos com alta retenção e gera recomendaçÔes de roteiro.
Inputs: niche (required), minViews, regionCode, videoCount.
analyze_title_patternsA
Analisa os padrĂ”es estruturais dos tĂtulos dos vĂdeos mais bem-sucedidos em um nicho. Identifica fĂłrmulas recorrentes (nĂșmero, pergunta, como-fazer, contraste, urgĂȘncia) e retorna os templates que dominam o nicho.
Inputs: niche (required), regionCode, videoCount.
benchmark_channelA
Compara seu canal autenticado com 1 a 3 canais concorrentes. Retorna tabela comparativa com inscritos, views totais, views mĂ©dias por vĂdeo, engagement rate e views/inscritos. Mostra onde vocĂȘ estĂĄ Ă frente e onde estĂĄ atrĂĄs.
Inputs: competitorChannelIds (required).
detect_content_gapsA
Identifica subtĂłpicos do nicho que estĂŁo sendo buscados mas pouco explorados pelos criadores. Classifica cada subtĂłpico como Gap Real (entre agora), Oportunidade ou Saturado. Equivalente ao "Content Gaps" do VidIQ.
Inputs: niche (required), regionCode, yourChannelId.
estimate_ctr_potentialA
Estima o CTR potencial de atĂ© 5 tĂtulos candidatos usando heurĂsticas de copywriting. Pontua cada tĂtulo de 0â100 e classifica como Alto, MĂ©dio ou Baixo potencial. Lista pontos positivos e melhorias por tĂtulo.
Inputs: niche (required), titles (required), regionCode.
estimate_keyword_difficultyA
Calcula um score de dificuldade (0â100) para ranquear um vĂdeo em uma keyword no YouTube. Analisa views/dia, tamanho dos canais concorrentes e idade dos vĂdeos ranqueados. Substitui o "Competition Score" do VidIQ sem dados proprietĂĄrios.
Inputs: keyword (required), maxVideos, regionCode.
find_trending_keywordsA
Detecta keywords emergentes no nicho analisando padrĂ”es de vĂdeos recentes, views e tamanho dos canais. Classifica cada keyword como Emergente, Crescendo ou EstĂĄvel.
Inputs: niche (required), regionCode, maxKeywords.
generate_content_calendarA
Gera um calendĂĄrio de conteĂșdo de 14 a 30 dias para o nicho. Identifica gaps e keywords emergentes, sugere tĂtulos usando padrĂ”es dos top vĂdeos e organiza por semana com dias e horĂĄrios ideais.
Inputs: niche (required), periodDays, regionCode, postsPerWeek, +1 more.
get_channel_analyticsB
Retorna mĂ©tricas reais do canal autenticado via YouTube Analytics API: views, likes, comentĂĄrios, inscritos ganhos, minutos assistidos e duração mĂ©dia. Agrupa por dia no perĂodo informado.
Inputs: endDate (required), startDate (required), metrics.
get_competitor_videosA
Lista os vĂdeos de um canal concorrente com tĂtulo, views, likes, duração e data. Ătil para analisar estratĂ©gia de conteĂșdo de competidores. Requer o Channel ID (começa com UC).
Inputs: channelId (required), order, maxResults.
get_keyword_statsA
Analisa uma keyword no YouTube: retorna os top vĂdeos ranqueados, estimativa de dificuldade baseada em tamanho dos canais e idade dos vĂdeos, e sugestĂ”es de Ăąngulos com menor concorrĂȘncia.
Inputs: keyword (required), maxVideos, regionCode.
get_video_tagsA
Extrai as tags de qualquer vĂdeo pĂșblico do YouTube pelo ID do vĂdeo.
Inputs: videoId (required).
list_channel_videosA
Lista os vĂdeos de um canal YouTube com tĂtulo, views, likes e data de publicação. Use channelId para Brand Accounts (ex: canal @dewtech = UC_x33Gz4LvnOZuC_4v7Qucg). Sem channelId usa o canal da conta autenticada.
Inputs: order, channelId, maxResults.
score_best_publish_windowA
Analisa os vĂdeos do canal autenticado e retorna o melhor dia e horĂĄrio para publicar novos vĂdeos, baseado em views/dia dos vĂdeos jĂĄ publicados. Agrupa por dia da semana + faixa horĂĄria e retorna top 3 melhores e 2 piores slots.
Inputs: videoCount.
search_trending_topicsA
Busca vĂdeos em alta no YouTube para um tema ou keyword. Retorna tĂtulo, canal, views e link de cada vĂdeo encontrado.
Inputs: query (required), order, maxResults, regionCode.
suggest_hook_anglesA
Gera 5 Ăąngulos de gancho (hook) para a abertura de um vĂdeo. Usa padrĂ”es detectados nos vĂdeos mais populares do tĂłpico para priorizar o gancho mais eficaz no nicho.
Inputs: niche (required), videoTopic (required), regionCode, targetAudience.
suggest_tagsA
Sugere tags estratĂ©gicas para um vĂdeo analisando os top vĂdeos que ranqueiam para uma keyword. Extrai padrĂ”es de tags e agrupa por relevĂąncia.
Inputs: keyword (required), regionCode, videoCount.
update_video_metadataA
Aplica tĂtulo, descrição e tags otimizados em um vĂdeo jĂĄ publicado no canal autenticado.
Inputs: tags (required), title (required), videoId (required), description (required), +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogâŠ
TDQS
Scored across 18 tools
Most tools have distinct purposes, but list_channel_videos and get_competitor_videos are nearly identical (both list videos for a channel), and the trend/keyword research tools (search_trending_topics, find_trending_keywords, get_keyword_stats) overlap in functionality, which could cause misselection.
All tool names follow a consistent verb_noun snake_case pattern (e.g., get_keyword_stats, analyze_title_patterns, generate_content_calendar), making them predictable and easy to distinguish.
At 18 tools, the server is on the heavier side for a niche tool, but each tool serves a specific function within YouTube content optimization, so the count is still understandable.
The server covers most key aspects of YouTube SEO research, optimization, and publishing, but lacks video-level analytics and direct video retrieval, which are minor gaps given the tool's focus.
Maintenance
Related MCP Connectors
Real-time YouTube transcripts, comments, channels & video search MCP. Local npx or hosted OAuth.
YouTube discovery, transcripts, library search, and monitors with API keys or OAuth.
OAuth-enabled MCP server that extracts structured data from public social media posts.
YouTube MCP â wraps the YouTube Data API v3 (BYO API key)
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server that enables interaction with the YouTube Data API, allowing users to search videos, get video and channel details, analyze trends, and fetch video transcripts.-
- AlicenseAqualityCmaintenanceAn MCP server for intelligent YouTube video analysis that provides token-optimized summaries, sentiment analysis, and entity extraction from transcripts. It enables AI assistants to perform video reporting, channel monitoring, and comprehensive YouTube searches through structured data tools.1053Apache 2.0
- AlicenseAqualityDmaintenanceA FastMCP server providing 25 tools for interacting with the YouTube Data API v3 and YouTube Analytics API. It enables comprehensive management of videos, channels, playlists, and comments, alongside retrieval of performance analytics.25MIT
- AlicenseAqualityBmaintenanceA comprehensive MCP server integrating YouTube Data, Analytics, and Reporting APIs, providing 40 tools for channel management, analytics, video publishing, transcripts, SEO, and comments.4031MIT