
YouTube Research MCP
io.github.coyaSONG由 GitHub 帳號 coyaSONG 發布v2.0.0更新於 Oct 24, 2026
Citation-ready YouTube transcript research and optional channel intelligence for AI agents.
概覽
把 YouTube 影片轉成附時間戳與可跳轉連結、可直接引用的字幕證據,並可選擇透過 YouTube Data API 提供搜尋、留言與頻道分析。
- 可以做什麼
- 檢索影片字幕,回傳附時間戳與可跳轉引用連結的片段,支援關鍵字、時間範圍與分頁篩選
- 對 2–5 支影片同時執行同一查詢並比對證據
- 擷取完整、增強、分段或關鍵時刻字幕,可指定字幕語言
- 搜尋影片、讀取留言,取得影片與頻道統計、熱門、分類及比較(需 API 金鑰)
- 以資源形式讀取影片、頻道與字幕資料,並使用內建提示產生摘要與逐段分析
- 適用情境
- 適合讓助理引用或查核某支 YouTube 影片的具體說法、在多支影片之間比對觀點,或不必貼上整份字幕就能瀏覽長篇演講與多語言字幕。搜尋、留言與統計功能適合頻道或主題研究。
- 執行需求
- 透過 npx 以 stdio 在本機執行,或從儲存庫複製、用 Docker 啟動 Streamable HTTP 服務(預設連接埠 3000)。需要 Node.js 22 或更新版本。字幕功能不需金鑰;YOUTUBE_API_KEY 用於啟用搜尋、留言、統計與頻道分析。遠端部署可設定 MCP_BEARER_TOKEN、CORS_ORIGIN、MAX_SESSIONS 與 SESSION_IDLE_TIMEOUT_MS。需要連線至 YouTube 的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 YouTube Research MCP,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
YouTube Research MCP
[CI] [npm] [npm downloads] [GitHub stars] [LightNow MCP capabilities] [MIT License]
Turn YouTube videos into citation-ready research for Codex, Claude, Cursor, and other MCP clients. Paste a video URL and get transcript evidence with timestamps and links that open at the exact quoted moment.
[YouTube Research MCP turns a video URL into focused timestamp-linked evidence]
No YouTube API key is required for transcript research.
Why this server
- Citation-ready research — every transcript segment includes a timestamp and source URL.
- Zero-key quick start — transcripts work immediately; add an API key only for search and analytics.
- URL-first input — accepts normal, short, Shorts, embed, live, and raw video-ID formats.
- Agent-efficient filtering — search inside transcripts and return nearby context instead of spending tokens on the entire video.
- Full YouTube intelligence — optional API mode adds comments, video/channel statistics, trends, and comparisons.
- Remote-native MCP — Streamable HTTP transport at
/mcp, plus Docker and Smithery support.
Architecture and trust boundary
The MCP layer validates inputs and returns structured evidence; it does not ask a model to invent summaries or citations. Transcript tools derive timestamps and canonical links from caption segments. Data API tools return an explicit key-required error when YOUTUBE_API_KEY is unavailable, and remote authentication is enforced before MCP session handling.
Focused evidence, not a transcript dump
The included live smoke test asks a focused question about a public video and compares the response with the full timestamped transcript:
This measures response characters, not model-specific tokens. Reproduce it against the default public fixture—or substitute your own video and query:
Quick start — no API key
Requirements: Node.js 22 or newer.
The shortest local install uses stdio and needs no API key:
For Claude Desktop and other MCPB-compatible desktop clients, download the latest one-click MCP bundle and open it. The bundle vendors its runtime dependencies, starts locally over stdio, and asks for a YouTube API key only if you want the optional analytics tools.
Or install from the VS Code command line:
For Claude Desktop, Cursor, and other stdio clients, use command npx with arguments -y @coyasong/youtube-mcp-server@latest.
To run the Streamable HTTP transport instead:
The server starts at http://localhost:3000/mcp in transcript-only mode. Confirm it with:
Connect from Codex
With the HTTP server running:
Then ask Codex:
Connect with MCP Inspector
Install through Smithery
Enable search, comments, and analytics
Set a YouTube Data API v3 key to switch from transcript-only to full mode:
YOUTUBE_API_KEY is optional. PORT defaults to 3000. For stdio clients, set YOUTUBE_API_KEY in the MCP server environment configuration.
Secure a remote deployment
Do not expose a full-mode server publicly without authentication: unauthenticated users could consume your YouTube API quota. Set a strong bearer token and restrict browser origins when deploying outside localhost:
Browser origins are denied by default. CORS_ORIGIN accepts a comma-separated
allowlist of exact http:// or https:// origins; wildcard origins are rejected.
Connect Codex using an environment variable rather than writing the secret into its configuration:
/health remains public for container health checks. MCP requests return 401 when authentication is enabled and the bearer token is missing or invalid. Idle sessions are removed automatically, and MAX_SESSIONS bounds memory use.
Best first tool
research-video accepts:
video: a YouTube URL or 11-character video IDlanguage: optional caption language such asen,ko, orjaquery: optional phrase to find inside the transcriptcontextLines: surrounding segments to retain, from 0 to 5matchMode:word(default) orsubstringstartSeconds/endSeconds: optional time windowoffset: result offset for paginationmaxSegments: response cap from 1 to 1,000 (default: 200)
It returns structured JSON containing the video title and channel identity, canonical video URL, full caption-track duration and segment count, matching transcript segments, human-readable citation labels, timestamps, directly navigable citation URLs, and pagination metadata. For long videos, use a query or time window first; follow nextOffset only when more evidence is needed.
Compare evidence across videos
research-videos applies one focused query to 2–5 video URLs concurrently. It returns the same structured, timestamp-linked evidence for each source while capping results per video. This is useful for comparing interviews, checking whether multiple sources support a claim, or researching a topic across a short watchlist.
See YouTube Research Recipes for copy-paste workflows for fact-checking claims, comparing interviews, navigating long talks, researching multilingual captions, and building citation-ready notes.
Capability modes
Captions must be available for the requested video. Age-restricted, private, region-restricted, or caption-disabled videos may not return a transcript.
If this project saves you research time, consider starring the repository so other agent builders can discover it.
See the broader AI tooling portfolio for the
reliability principles shared with ralph-research and tmuxicate.
Docker
Development
Maintainers can follow the release guide. Published GitHub releases run the complete npm, MCP Registry, MCPB, and Smithery delivery pipeline.
API Reference
Resources
youtube://video/{videoId}- Get detailed information about a specific videoyoutube://channel/{channelId}- Get information about a specific channelyoutube://transcript/{videoId}- Get transcript for a specific video- Optional query parameter:
?language=LANGUAGE_CODE(e.g.,en,ko,ja)
- Optional query parameter:
Tools
Basic Tools
research-video- Get citation-ready transcript evidence from a URL or video ID without an API keyresearch-videos- Compare timestamp-linked evidence across 2–5 videos without an API keysearch-videos- Search for YouTube videos with advanced filtering optionsget-video-comments- Get comments for a specific videoget-video-transcript- Get transcript for a specific video with optional languageenhanced-transcript- Advanced transcript extraction with filtering, search, and multi-video capabilitiesget-key-moments- Extract key moments with timestamps from a video transcript for easier navigationget-segmented-transcript- Divide a video transcript into segments for easier analysis
Tools requiring YOUTUBE_API_KEY are search, comments, statistics, discovery, and channel analysis. enhanced-transcript needs the key only when includeMetadata is true.
Statistical Tools
get-video-stats- Get statistical information for a specific videoget-channel-stats- Get subscriber count, view count, and other channel statisticscompare-videos- Compare statistics across multiple videos
Discovery Tools
get-trending-videos- Retrieve trending videos by region and categoryget-video-categories- Get available video categories for a specific region
Analysis Tools
analyze-channel-videos- Analyze performance trends of videos from a specific channel
Prompts
video-analysis- Generate an analysis of a YouTube videotranscript-summary- Generate a summary of a video based on its transcript with customizable length and keywords extractionsegment-by-segment-analysis- Provide detailed breakdown of content by analyzing each segment of the video
Examples
Accessing a Video Transcript
Getting a Transcript in a Specific Language
Using the Statistical Tools
Using the Transcript Summary Prompt
Using the Enhanced Transcript Tool
Using the Enhanced Transcript Analysis Features
Error Handling
The server handles various error conditions, including:
- Invalid or missing API key for Data API tools
- Video or channel not found
- Transcript not available
- Network issues
License
MIT
Acknowledgements
Comment pagination and evidence limits
search-videos accepts the provider pageToken. get-video-comments preserves the next top-level token and accepts searchTerms for YouTube-side filtering.
Use includeReplies: true for the embedded reply subset, or completeReplies: true for bounded reply pagination. Full retrieval defaults to 100 replies per thread; maxRepliesPerThread accepts 1–1000. Across all threads, each call returns at most 1000 replies and 1 MiB of reply JSON and makes at most 20 additional reply requests. Each Data API request times out after 10 seconds and does not retry automatically.
Inspect each thread's replyCoverage: available is the provider's reported count, returned counts unique replies, complete confirms full observed coverage, and truncated indicates a local budget or pagination guard stopped collection. Counts may change while YouTube comments are being edited. Missing IDs or early provider termination do not establish complete coverage. Reduce the top-level maxResults to reserve more of the shared budget for each thread; pageToken continues top-level threads, not an incomplete reply list.
Research source metadata includes captionRequestedLanguage, captionTrackLanguage, captionLanguage, captionOrigin (manual, youtube_asr, or translated) and captionSourceOrigin. Unknown provenance is null.
來源:README.md,提交 9c92d24
工具
0版本歷史
2- v2.0.0最新Oct 11, 2026
- v1.2.0Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
