io.github.dewtech-technologies/tubemind-secure-mcp
Secure MCP server for YouTube intelligence β 18 tools, OAuth2, OWASP Top 10 controls.
Ask AI about io.github.dewtech-technologies/tubemind-secure-mcp
Powered by Claude Β· Grounded in docs
I know everything about io.github.dewtech-technologies/tubemind-secure-mcp. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
tubemind-secure-mcp
YouTube intelligence, powered by Claude. Secure by design.
Model Context Protocol server with 18 tools for YouTube research, analytics, benchmarking and content strategy.
π¦ 18 tools Β· π OAuth2 + AES-256-GCM Β· π‘οΈ OWASP Top 10 Β· π€ Claude Desktop ready
π― 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
