CTDO YTB MCP
It is an all-in-one YouTube MCP server for research, analytics, transcripts, local RAG, and managing your own channel via OAuth.
Search YouTube videos, Shorts, channels, playlists, trending charts, and categories with filters.
Batch-fetch video metadata, chapters, SponsorBlock segments, and ReturnYouTubeDislike stats.
Fetch, search, chapter-split, translate, sponsor-strip, or save transcripts.
Analyze channels: stats, emails/links, upload cadence, videos, Shorts, top videos, playlists, and RSS.
List comments or mine audience intelligence: questions, requests, pain points, timestamps, sentiment.
Fetch playlist metadata and video items.
Find viral outliers, related competitor outliers, consistent outlier channels, and trending title formats.
Discover related channels, find creators, analyze niche opportunity/RPM, and compare channels.
Audit packaging: title CTR, hook WPM/open loops, SEO tags, thumbnails.
Build/search a local hybrid RAG knowledge base with timestamped transcript moments.
Export subtitles, thumbnails, JSON metadata, or yt-dlp audio stream URLs.
Manage your own YouTube channel via @handle binding or Google OAuth: status, analytics, edit videos, set thumbnails, reply to comments, manage playlists, upload videos, disconnect.
Inspect cache/quota/system status and clear cache.
Provides comprehensive YouTube research and content tools: search videos, channels, playlists, and trends; fetch video metadata, transcripts, comments, SponsorBlock segments, and dislikes; analyze channels, outliers, niches, packaging, and audience insights; index transcripts for local RAG; and export subtitles, thumbnails, or audio.
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., "@CTDO YTB MCP search YouTube for beginner Python tutorials and summarize the top video's transcript"
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.
⚡ CTDO YTB MCP (ctdo-ytb-mcp v1.2.0)
Ultra-Fast, Ultra-Lightweight, Zero-Bloat All-in-One YouTube MCP Server + YouTube Studio OAuth2 & Apple HIG 2026 Media Engine Tổng hợp toàn diện mọi công nghệ, logic và chức năng từ các YouTube MCP hàng đầu (
ia-programming/youtube-mcp,TubeLab YouTube MCP,ZubeidHendricks/youtube-mcp-server,@kirbah/mcp-youtube) + tích hợp Quản trị kênh chính chủ YouTube Studio OAuth 2.0, Bộ kết xuất Banner tràn viền & Thumbnail Dual-Aspect (16:9/9:16Shorts) chuẩn Apple HIG 2026, SponsorBlock, Comment Mining và SQLite FTS5/Vector RAG.
📖 Tài liệu hướng dẫn chi tiết lấy Token, Google OAuth 2.0 & Xử lý lỗi 403: Xem ngay tại docs/HUONG_DAN_TOKEN_OAUTH.md!
🌟 Điểm Đột Phá Của CTDO YTB MCP v1.2.0
Hạng mục | Các YouTube MCP thông thường | ⚡ CTDO YTB MCP v1.2.0 |
Yêu cầu API Key | Bắt buộc Google Cloud API Key hoặc tốn credit trả phí | Chạy ngay 100% với 0 API Key (2026 InnerTube |
Kết nối Kênh Cá Nhân & YouTube Studio | Chỉ đọc dữ liệu công khai, không thể quản trị kênh |
|
Thiết kế Ảnh Bìa & Thumbnail tự động | Không có | Tích hợp sẵn Engine |
Độ nặng cài đặt & Khởi động |
| Chỉ 2 thư viện runtime ( |
Độ nặng Context Schema | 30–40 tool rời rạc tốn ~12,000+ tokens mỗi lượt chat | 3 chế độ trọng lượng ( |
Tốc độ & Cache | Không có cache hoặc bắt cài MongoDB ngoài | 2 tầng Cache tích hợp: L1 Memory LRU ( |
Outlier, Niche & RAG | Tốn phí credit hoặc lỗi tiếng Việt | Miễn phí 100%: Outlier Video Finder, Consistent Outlier Channels, Trending Title Formats, Niche RPM Validator, Comment Mining, SponsorBlock & SQLite FTS5 BM25 + Vector RRF ( |
Related MCP server: YouTube MCP Server
🚀 Cài Đặt Nhanh (Quick Start)
git clone https://github.com/thanhdo1110/CTDO-YTB-MCP.git
cd CTDO-YTB-MCP
npm install
npm run build
# Tuỳ chọn: Liên kết lệnh toàn cục để gọi `ctdo-ytb-mcp` ở mọi nơi
npm link1️⃣ Cấu hình MCP Client ở chế độ Zero-Config (Không cần Token/API Key!)
Thêm vào ~/.gemini/config/mcp_config.json (Antigravity), claude_desktop_config.json (Claude) hoặc .cursor/mcp.json (Cursor):
{
"mcpServers": {
"ctdo-ytb-mcp": {
"command": "node",
"args": ["/đường/dẫn/tuyệt/đối/tới/CTDO-YTB-MCP/dist/cli.js"],
"env": {
"CTDO_TOOL_MODE": "compact",
"CTDO_OUTPUT_FORMAT": "compact"
}
}
}
}2️⃣ Kết nối Kênh YouTube Cá Nhân & YouTube Studio (OAuth 2.0)
Cách A — Gắn nhanh bằng @handle (1 giây, không cần OAuth, dùng để theo dõi & audit kênh):
ctdo-ytb-mcp bind @ten_kenh_cua_banCách B — Đăng nhập Google OAuth 2.0 Chủ Kênh (Mở khóa YouTube Studio Analytics + Sửa SEO + Upload + Đổi Banner/Thumbnail):
Trên Google Cloud Console:
Bật YouTube Data API v3 và YouTube Analytics API.
Vào Google Auth Platform → Audience → Test users bấm + Add users thêm Gmail chủ kênh của bạn (bắt buộc để tránh lỗi
403: access_denied).Vào Credentials → + Create Credentials → OAuth client ID → chọn loại
Desktop app→ tải file JSON về máy.
Chạy lệnh đăng nhập (tự động mở trình duyệt và lưu
refresh_tokentự gia hạn ngầm vào~/.ctdo-ytb-mcp/account.jsonvới quyền0600):ctdo-ytb-mcp login --client-secret=/đường/dẫn/tới/client_secret.jsonThêm
GOOGLE_CLIENT_IDvàGOOGLE_CLIENT_SECRETvào khốienvtrongmcp_config.jsonđể MCP tự làm mới token ngầm trọn đời. 👉 Xem hướng dẫn từng bước chi tiết tại docs/HUONG_DAN_TOKEN_OAUTH.md.
🛠️ Danh Sách 13 Power Tools (compact mode — Bao phủ 100% 46 công cụ)
yt_search: Tìm kiếmvideo,short,channel,playlist,trending,categorieskèm lọc subscribers, creator-only, thời lượng, ngày đăng.yt_videos: Batch tối đa 50 videos/lần lấy metadata gọn nhẹ, tỷ lệ tương tác,chapters, SponsorBlock & ReturnYouTubeDislike.yt_transcript: Lấy phụ đề đa chế độ (key_segmentsHook 45s + Outro 35s tiết kiệm 85% token,full,timestamped,chapters,search,srt,vtt), dịch tức thì (translateTo: "vi"), cắt quảng cáo (stripSponsors), lưu thẳng ra đĩa (saveToFile).yt_channels: Hồ sơ kênh qua@handle/URL/ID + các tabvideos,shorts,top_videos,playlists,rss+ bóc tách Email/Social Links & phân loại Creator vs Brand.yt_comments: Xem bình luận (list) hoặc chạy Audience Intelligence (mine): tự động phân nhóm câu hỏi khán giả, yêu cầu làm video mới, điểm chê/lỗi, mốc thời gian khán giả nhắc tới & điểm cảm xúc.yt_playlists: Chi tiết Playlist & toàn bộ danh sách video.yt_outliers: Động cơ nghiên cứu viral chuẩn TubeLab & Kirbah:videos(Outlier Score =views/subs),related_outliers,consistent_channels(4-phase),trending_formats(công thức tiêu đề viral).yt_discover: Nghiên cứu đối thủ & ngách:related_channels,find_creators,analyze_niche(chấm điểm cơ hội ngách 0–100 & ước tính CPM/RPM USD),compare_channels(đối sánh 2–10 kênh).yt_packaging: Chấm điểm CTR tiêu đề, nhịp độ nói 40s đầu (WPM), cấu trúc Open-Loop, mật độ SEO tags & link ảnh Thumbnail gốc.yt_kb: Kho tri thức Hybrid RAG nội bộ (SQLite FTS5 BM25 + 256-dim Cosine Vector RRF / Gemini / OpenAI Embeddings) tìm chính xác câu nói kèm link timestamphttps://youtu.be/ID?t=Xstrong<2ms.yt_export: Xuất phụ đề.srt/.vtt, ảnh Thumbnail chất lượng cao, JSON hoặc trích xuất luồng audio quayt-dlp.yt_studio(Mới trong v1.1–v1.2): Quản trị kênh chính chủ & Thiết kế tự động chuẩn Apple HIG 2026:status/bind_channel/start_oauth/my_overview/list_my_videos(publicOnly: truemặc định).analytics: Truy vấn báo cáo nội bộ YouTube Studio v2 (7d/28d/90d/365dtheo ngày, từng video, nguồn trafficYT_SEARCH/SHORTS...).update_video: Tối ưu Title (<=100ký tự), Description, Chapters, Tags (<=450ký tự), Category, ngôn ngữ & Privacy.update_channel_branding: Cập nhật Ảnh bìa kênh2560×1440+ Giới thiệu kênh + Từ khóa kênh & tự động đồng bộ đa ngôn ngữ (localizations.vi_VN/en_US).render_hig_banner&render_hig_thumbnail: Kết xuất trực tiếp Banner tràn viền mọi thiết bị (Desktop+Mobile+4K TV) và Thumbnail chuẩn kép16:9(1920×1080) /9:16Shorts (1080×1920shortsAspectRatio) phong cách Apple HIG 2026 & Liquid Glass (kèmapplyImmediately: trueđẩy thẳng lên YouTube!).upsert_creator_comment&reply_comment: Cập nhật bình luận chủ kênh tại chỗ (giữ nguyên huy hiệu Ghim sẵn có) hoặc tạo bình luận chủ kênh mới.upload_video: Tải lên video/Shorts.MOV/.MP4qua Resumable Upload, tự động chờ YouTube xử lý xong (processingStatus === "succeeded") để kích hoạt ảnh bìa dọcshortsAspectRatio=1080x1920và tự đăng bình luận chủ kênh!
yt_system: Giám sát tỉ lệ trúng cache L1/L2, độ trễ, hạn mức API key pool tiết kiệm được & dọn cache.
(Khi đặt CTDO_TOOL_MODE=full, server hiển thị tường minh toàn bộ 46 công cụ bao gồm tất cả tên hàm gốc của TubeLab, Zubeid, Kirbah và IA-Programming).
🧪 Kiểm Thử & Benchmark
npm test # Chạy bộ Unit + Live E2E MCP Protocol Tests
npm run bench # Đo trọng lượng Schema Token & tốc độ L1/SQLite Cache
npm run start:http # Chạy chế độ StreamableHTTP tại http://127.0.0.1:8088/mcp📄 License
Phát hành theo giấy phép MIT — Thiết kế & phát triển bởi CTDO (@thanhdo1110).
Available Tools
13 toolsyt_channelsB
Get channel stats, emails/links, creator classification, upload cadence, and recent videos/Shorts/top_videos/playlists/RSS by @handle, URL, or ID.
Inputs: channels (required), format, include, maxItems.
yt_commentsA
List video comments OR run Audience Intelligence Mining (questions, video requests, pain points, viewer timestamps, sentiment).
Inputs: video (required), action, format, sortBy, +2 more.
yt_discoverB
Niche & Competitor Suite: find similar channels, discover creators mentioning a topic, validate niche saturation/RPM, or compare channels side-by-side.
Inputs: action (required), query, format, sortBy, +7 more.
yt_exportA
Export subtitles (SRT/VTT/TXT), high-res thumbnails, full JSON metadata to disk, or extract direct audio stream URL via yt-dlp.
Inputs: video (required), target (required), lang, subFormat, +1 more.
yt_kbC
Local Hybrid RAG Knowledge Base (SQLite FTS5 BM25 + Vector RRF): index video transcripts and semantically search exact timestamped moments.
Inputs: action (required), lang, limit, query, +3 more.
yt_outliersC
TubeLab & Kirbah Outlier Engine: find viral outlier videos (views/subs), related competitor outliers, consistent outlier channels, or trending title templates.
Inputs: query, action, format, maxSubs, +9 more.
yt_packagingC
Audit video packaging: Title CTR score, First-40s Hook speaking WPM & open-loop triggers, SEO tag density, and high-res thumbnails.
Inputs: videos (required), format, includeHook.
yt_playlistsC
Fetch YouTube playlist metadata and video items.
Inputs: playlist (required), format, maxResults.
yt_searchC
Search YouTube videos, Shorts, channels, playlists, trending charts, or categories (works with 0 API key or API v3).
Inputs: sort, query, format, target, +10 more.
yt_studioC
Connect & manage YOUR OWN YouTube channel: instant @handle binding OR full Google OAuth2 YouTube Studio Analytics (retention, watch time, traffic, revenue), edit video title/tags/privacy, upload thumbnails/videos, manage playlists, and reply to comments.
Inputs: tags, text, title, video, +16 more.
yt_systemC
Inspect L1/L2 cache hit rate, latency, YouTube API key pool & quota saved, Knowledge Base stats, TubeLab balance, or clear cache.
Inputs: action, namespace.
yt_transcriptB
Fetch, search, chapter-split, sponsor-strip, or translate transcripts for 1 or multiple videos (0 API cost).
Inputs: videos (required), lang, mode, query, +4 more.
yt_videosB
Batch-fetch lean video metadata, views/likes/velocity, chapters, SponsorBlock segments, and ReturnYouTubeDislike stats.
Inputs: videos (required), format, includeTags, includeChapters, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Each tool is anchored to a distinct resource or job (search, videos, transcript, channels, comments, playlists, outliers, discover, packaging, KB, export, studio, system), so selection is usually clear. A few boundaries blur: yt_search vs yt_discover (both can surface channels/topics), yt_outliers vs yt_search trending, and yt_export vs yt_transcript (subtitle export) could be confused, though the descriptions mostly disambiguate.
All names follow a uniform `yt_` prefix in snake_case, which makes the set instantly recognizable and sortable. Minor deviation: most suffixes are resource nouns (videos, channels, comments) while a few are verbs or vague nouns (search, discover, system, kb, studio), so the semantic pattern isn't perfectly predictable.
13 tools sits squarely in the well-scoped range, and each one maps to a recognizable YouTube workflow (search, metadata, transcripts, own-channel ops, competitive research, QA, export, diagnostics). Nothing feels redundant or missing at the count level.
Coverage is broad: read paths (search, video/channel/playlist metadata, comments, transcripts), write paths (upload, edit metadata, playlists, comment replies via yt_studio), analytics, competitive research, and local RAG indexing/export. Gaps are minor—no dedicated live-stream/trending or scheduling tool, and write/full-lifecycle operations are bundled inside the yt_studio mega-tool rather than being individually addressable.
Maintenance
Related MCP Connectors
Real-time YouTube transcripts, comments, channels & video search MCP. Local npx or hosted OAuth.
Unofficial YouTube MCP — wraps the YouTube Data API v3 (BYO API key)
YouTube discovery, transcripts, library search, and monitors with API keys or OAuth.
YouTube transcripts, search, channel/playlist listings and upload tracking for AI agents.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables YouTube content browsing, video searching, and metadata retrieval via the YouTube Data API v3. It also facilitates fetching video transcripts for summarization and analysis within MCP-compatible AI clients.71MIT
- FlicenseNot gradedqualityDmaintenanceProvides YouTube video search, comment analysis, AI-powered text tools, and content generation via MCP protocol and REST API.7-
- AlicenseAqualityDmaintenanceEnables YouTube search, video details, channels, playlists, and comments scraping via MCP, no API key required.1023 npm1MIT
- AlicenseAqualityBmaintenanceMCP server for extracting structured intelligence from YouTube channels and videos — transcripts, topics, and competitive signals for AI-powered research workflows.1257 npmMIT