YouTube MCP

io.github.mrsknetwork由 GitHub 帳號 mrsknetwork 發布v1.0.14更新於 Oct 24, 2026

Interact with YouTube data via the official Data API v3

概覽

AI 產生的概覽

透過官方 Data API v3 讓助理存取 YouTube 資料,可搜尋影片、取得轉錄和詮釋資料,並讀取留言與頻道資訊。

可以做什麼
下載影片的完整口述轉錄,可選擇語言以及手動或自動產生的字幕,不需憑證。依關鍵字、日期範圍、長度、畫質和地區搜尋影片、頻道和播放清單,並依國家和分類列出熱門影片。取得影片詮釋資料與統計、頻道資料、播放清單及其項目,以及頻道動態和頁面區塊。讀取影片的頂層留言和回覆,並列出可用的字幕軌。查詢支援的語言和地區,列出頻道的公開訂閱或透過 OAuth 列出自己的訂閱。列出自己頻道的付費會員和會員等級,並可撤銷已儲存的 OAuth 權杖。
適用情境
適合讓助理研究 YouTube 內容、依據轉錄摘要或引用影片、依統計比較頻道和影片,或查看留言與熱門話題。OAuth 模式適用於需要自己訂閱和會員資料的創作者或頻道擁有者。
執行需求
透過 npx 執行 npm 套件 @mrsknetwork/ytmcp 的本機 Node.js 程序。訪客轉錄模式需要 yt-dlp,不需憑證。公開資料工具需要啟用 YouTube Data API v3 的 Google API 金鑰,以 GOOGLE_API_KEY 傳入。私有訂閱和會員資料需要 OAuth 2.0 Web 用戶端,設定 GOOGLE_CLIENT_ID、GOOGLE_CLIENT_SECRET 以及回呼網址
安裝前請注意
OAuth 模式需要 GOOGLE_CLIENT_ID 與 GOOGLE_CLIENT_SECRET,伺服器會把登入工作階段保存在本機,直到呼叫 revoke_oauth_token 才會刪除。轉錄擷取依賴 yt-dlp 從 YouTube 下載內容,可能與 YouTube 服務條款衝突。查詢內容、影片 ID 和帳號資料都會傳送給 Google 的 YouTube Data API。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 YouTube MCP,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

YouTube MCP

Connect AI assistants to YouTube: search, transcripts, metadata, and more.

[npm] [Downloads] [Socket Badge] [MIT] [MCP]


What can it do?

Once connected, your AI can:

  • Extract clean, word-for-word video transcripts. No credentials required.
  • Search YouTube by keyword, date range, duration, quality, and region.
  • Fetch trending videos for any country and category.
  • Retrieve video stats, metadata, comments, captions, and channel details.
  • Look up channels by @handle (e.g. @MrBeast).
  • Access your own subscriptions, members, and membership tiers via OAuth.

Getting Started

The server supports three access tiers. Pick the one that fits your use case.

Guest Mode (No Setup)

Works out of the box. The get_video_transcript tool uses yt-dlp to extract transcripts without any API credentials.

json
{  "mcpServers": {    "youtube-mcp": {      "command": "npx",      "args": ["-y", "@mrsknetwork/ytmcp@latest"]    }  }}

API Key (Recommended)

Unlocks all public data tools. Best for search, metadata, comments, trending videos, and transcripts.

1. Get a Google API Key

  1. Open the Google Cloud Console.
  2. Enable YouTube Data API v3 for your project.
  3. Go to Credentials and create an API Key.

2. Add to your MCP client config or .env file

Pass GOOGLE_API_KEY via env in your MCP client config, or place GOOGLE_API_KEY=YOUR_KEY inside a .env file in the project directory.

json
{  "mcpServers": {    "youtube-mcp": {      "command": "npx",      "args": ["-y", "@mrsknetwork/ytmcp@latest"],      "env": {        "GOOGLE_API_KEY": "YOUR_GOOGLE_API_KEY"      }    }  }}

OAuth 2.0

Required for private subscriptions, memberships, and account activity.

1. Create an OAuth 2.0 Client

  1. Open the Google Cloud Console.
  2. Enable YouTube Data API v3 for your project.
  3. Go to Credentials > Create Credentials > OAuth 2.0 Client ID.
  4. Set Application type to Web application.
  5. Add this exact Redirect URI: http://localhost:31415/oauth2callback.
  6. Go to OAuth Consent Screen > Test Users and add your Gmail address.

2. Add to your MCP client config

Credentials are passed securely via environment variables in the MCP config. They are never stored in files.

json
{  "mcpServers": {    "youtube-mcp": {      "command": "npx",      "args": ["-y", "@mrsknetwork/ytmcp@latest"],      "env": {        "GOOGLE_CLIENT_ID": "your-client-id.apps.googleusercontent.com",        "GOOGLE_CLIENT_SECRET": "your-client-secret"      }    }  }}

3. First-time login

On your first tool call, the AI will share a login link. Click it, authorize the app in your browser, then tell the AI you are done. Your session is saved. You will not need to log in again unless you revoke access.

4. Signing out

Ask your AI to call revoke_oauth_token to sign out and delete your stored credentials at any time.


Available Tools

ToolAuthDescription
get_video_transcriptNoneDownload a full spoken transcript using yt-dlp. Specify language_code (e.g. en, es) and whether to prefer manual or auto-generated captions. Returns source metadata with the text.
search_contentAPI KeySearch YouTube for videos, channels, or playlists. Filter by order, published_after, published_before, video_duration, video_definition, and region_code. Supports pagination.
get_video_metadataAPI KeyFetch title, description, tags, duration, and stats (views, likes, comments) for one or more videos by ID.
get_channel_metadataAPI KeyFetch channel profile, subscriber count, video count, and uploads playlist ID. Accepts a channel ID or @handle.
list_trending_videosAPI KeyFetch the most popular videos on YouTube for a given region_code and optional category_id. Supports pagination.
list_playlistsAPI KeyList playlists for a channel, or fetch specific playlists by ID. Returns title, description, and item count.
list_playlist_itemsAPI KeyList all videos inside a playlist in order. Returns title, position, and video ID for each entry.
list_video_commentsAPI KeyFetch top-level comment threads for a video or channel. Filter by keyword with search_terms. Supports pagination.
list_comment_repliesAPI KeyFetch replies to a specific comment thread by parent_comment_id. Supports pagination.
list_video_captionsAPI KeyList available caption tracks for a video, including language code and type (manual or auto-generated).
list_video_categoriesAPI KeyList YouTube video category names and IDs for a given region. Use the IDs with search_content or list_trending_videos.
list_channel_activitiesAPI KeyFetch a channel's recent activity feed, including uploads and playlist additions.
list_channel_sectionsAPI KeyList the shelf sections displayed on a channel's page, in order.
list_supported_languagesAPI KeyList all languages supported by YouTube, with language codes and localized names.
list_supported_regionsAPI KeyList all regions supported by YouTube, with region codes and names.
list_subscriptionsAPI Key / OAuthList public subscriptions for a channel by channel_id (API Key), or your own subscriptions with mine=true (OAuth).
list_channel_membersOAuthList current paying members of your channel. Requires an active memberships program.
list_membership_levelsOAuthList the membership tier names and levels configured for your channel.
revoke_oauth_tokenOAuthSign out and permanently delete your stored Google credentials from the server.

Building from Source

Instructions for running the server locally.
bash
git clone https://github.com/mrsknetwork/ytmcp.gitcd ytmcpnpm installnpm run buildcp .env.example .env # Set GOOGLE_API_KEY inside .envnode build/server/index.js

License

Licensed under the MIT License.

來源:README.md,提交 c4ca227

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.14最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分