mcpField
T
tubemind-secure-mcp

tubemind-secure-mcp

Local
github.com/dewtech-technologiesSocial Media0Updated 25w ago

About tubemind-secure-mcp

tubemind-secure-mcp is an MCP server for YouTube research, analytics, and content planning, aimed at channel operators and their AI clients. It combines official YouTube APIs with analysis tools and token-focused security controls.

Key features

  1. 01YouTube topic, keyword, and tag research
  2. 02Video and channel metadata operations
  3. 03Channel analytics and peer benchmarking
  4. 04Content gap, title, and CTR analysis
  5. 05Competitor discovery and calendar planning
  6. 06Encrypted OAuth tokens and security controls

Use cases

  1. 01Find rising topics and keywords for a channel
  2. 02Review retention, views, and publishing windows
  3. 03Compare channel performance with competitors
  4. 04Plan content using gaps, hooks, and calendar tools

MCP support

Exposes 18 YouTube research, analytics, metadata, benchmarking, and planning tools to MCP clients, including Claude Desktop. Uses OAuth2 and encrypts stored tokens with AES-256-GCM.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"dewtech-technologies-tubemind-secure": {
"command": "npx",
"args": [
"-y",
"tubemind-secure-mcp"
],
"env": {
"YOUTUBE_CLIENT_ID": "<YOUTUBE_CLIENT_ID>",
"YOUTUBE_CLIENT_SECRET": "<YOUTUBE_CLIENT_SECRET>",
"YOUTUBE_REDIRECT_URI": "<YOUTUBE_REDIRECT_URI>",
"TOKEN_ENCRYPTION_KEY": "<TOKEN_ENCRYPTION_KEY>",
"RATE_LIMIT_PER_MINUTE": "<RATE_LIMIT_PER_MINUTE>",
"REQUEST_TIMEOUT_MS": "<REQUEST_TIMEOUT_MS>",
"AUDIT_LOG_PATH": "<AUDIT_LOG_PATH>",
"NODE_ENV": "<NODE_ENV>"
}
}
}
}
Run commandnpx -y tubemind-secure-mcp
Environment variables to set
YOUTUBE_CLIENT_IDGoogle OAuth2 Client ID for YouTube Data API v3 + Analytics API
YOUTUBE_CLIENT_SECRETSecretGoogle OAuth2 Client Secret
YOUTUBE_REDIRECT_URIOAuth2 redirect URI (must match Google Cloud Console)
TOKEN_ENCRYPTION_KEYSecret64-char hex key for AES-256-GCM token encryption at rest. Generate with: openssl rand -hex 32
RATE_LIMIT_PER_MINUTEMax tool invocations per minute
REQUEST_TIMEOUT_MSHTTP request timeout (ms)
AUDIT_LOG_PATHPath to the audit log file
NODE_ENVproduction | development

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmtubemind-secure-mcp0.1.3

Tools

18

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
orderstringNoSort order: relevance, viewCount, date, rating
querystringYesTopic or keyword to search
maxResultsnumberNoNumber of results (1-50)
regionCodestringNoRegion code: BR, US, PT, ES, AR

Details

From the project README

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.

npm version downloads OWASP MIT License MCP SDK

📦 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
  1. Go to Google Cloud Console → APIs & Services → Credentials
  2. Enable YouTube Data API v3 and YouTube Analytics API
  3. Create OAuth 2.0 Client ID → Web application
  4. Authorized redirect URI: http://localhost:4000/oauth/callback
  5. 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

CategoryToolDescription
Searchsearch_trending_topicsDiscover trending topics by region/category
get_keyword_statsSearch volume signals for keywords
suggest_tagsTag recommendations from a seed
Videoget_video_tagsRead tags from a video
update_video_metadataUpdate title/description/tags (write scope)
list_channel_videosPaginate channel uploads
Analyticsget_channel_analyticsViews, watch time, retention (Analytics API)
score_best_publish_windowBest day/hour heatmap to publish
Benchmarkbenchmark_channelCompare channel vs. peers
Heuristicsestimate_keyword_difficultyDifficulty score 0–100
analyze_title_patternsCommon patterns in top videos
detect_content_gapsTopics competitors cover that you don't
Heuristics+estimate_ctr_potentialCTR estimate from title/thumbnail signals
suggest_hook_anglesHook angles for a topic
find_trending_keywordsRising-momentum keywords
analyze_retention_signalsRetention-shaping factors
generate_content_calendarN-day content plan
Competitorget_competitor_videosTop 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.

ControlImplementation
A01 — Broken Access ControlOAuth2 scopes least-privilege, audit log per call
A02 — Cryptographic FailuresAES-256-GCM at rest for tokens, secrets via env only
A03 — InjectionZod schemas on every tool input
A04 — Insecure DesignRate limit, request timeout, SSRF guard (host whitelist)
A05 — Misconfiguration.env.example template, no defaults that leak
A07 — AuthN FailuresOAuth2 PKCE-style flow, encrypted token storage
A08 — Software/Data IntegrityPinned deps, pnpm audit in CI, dependabot
A09 — Logging FailuresAudit log of every tool call (timestamp, tool, success)
A10 — SSRFOutbound calls restricted to googleapis.com family

Found a vulnerability? Email [email protected] — 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

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.