tubemind-secure-mcp

tubemind-secure-mcp

YouTube intelligence MCP server providing 18 tools for research, analytics, benchmarking, and content strategy, with OAuth2 and encrypted token storage.

Category
Visit Server

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

  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

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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured