tubemind-secure-mcp
YouTube intelligence MCP server providing 18 tools for research, analytics, benchmarking, and content strategy, with OAuth2 and encrypted token storage.
README
<h1 align="center">tubemind-secure-mcp</h1>
<p align="center"> <b>YouTube intelligence, powered by Claude. Secure by design.</b><br/> Model Context Protocol server with 18 tools for YouTube research, analytics, benchmarking and content strategy. </p>
<p align="center"> <a href="https://www.npmjs.com/package/tubemind-secure-mcp"><img src="https://img.shields.io/npm/v/tubemind-secure-mcp?style=flat-square&color=CB3837&logo=npm" alt="npm version"/></a> <a href="https://www.npmjs.com/package/tubemind-secure-mcp"><img src="https://img.shields.io/npm/dm/tubemind-secure-mcp?style=flat-square" alt="downloads"/></a> <a href="https://github.com/dewtech-technologies/tubemind-secure-mcp/blob/main/SECURITY.md"><img src="https://img.shields.io/badge/security-OWASP_Top_10-5A67D8?style=flat-square" alt="OWASP"/></a> <a href="https://github.com/dewtech-technologies/tubemind-secure-mcp/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/tubemind-secure-mcp?style=flat-square&color=blue" alt="MIT License"/></a> <a href="https://modelcontextprotocol.io"><img src="https://img.shields.io/badge/MCP-1.26-5A67D8?style=flat-square" alt="MCP SDK"/></a> </p>
<p align="center"> <b>📦 18 tools · 🔐 OAuth2 + AES-256-GCM · 🛡️ OWASP Top 10 · 🤖 Claude Desktop ready</b> </p>
🎯 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.
✨ 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-mcp
Requires 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/callback - Copy 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=production
3) Run the OAuth flow
pnpm auth
# or: npx tsx --env-file=.env src/auth-server.ts
Open 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 | search_trending_topics |
Discover trending topics by region/category |
get_keyword_stats |
Search volume signals for keywords | |
suggest_tags |
Tag recommendations from a seed | |
| Video | get_video_tags |
Read tags from a video |
update_video_metadata |
Update title/description/tags (write scope) | |
list_channel_videos |
Paginate channel uploads | |
| Analytics | get_channel_analytics |
Views, watch time, retention (Analytics API) |
score_best_publish_window |
Best day/hour heatmap to publish | |
| Benchmark | benchmark_channel |
Compare channel vs. peers |
| Heuristics | estimate_keyword_difficulty |
Difficulty score 0–100 |
analyze_title_patterns |
Common patterns in top videos | |
detect_content_gaps |
Topics competitors cover that you don't | |
| Heuristics+ | estimate_ctr_potential |
CTR estimate from title/thumbnail signals |
suggest_hook_angles |
Hook angles for a topic | |
find_trending_keywords |
Rising-momentum keywords | |
analyze_retention_signals |
Retention-shaping factors | |
generate_content_calendar |
N-day content plan | |
| Competitor | get_competitor_videos |
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 | .env.example template, no defaults that leak |
| A07 — AuthN Failures | OAuth2 PKCE-style flow, encrypted token storage |
| A08 — Software/Data Integrity | Pinned deps, pnpm audit in CI, dependabot |
| A09 — Logging Failures | Audit log of every tool call (timestamp, tool, success) |
| A10 — SSRF | Outbound calls restricted to googleapis.com family |
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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。