
Youtube Mcp
io.github.miller-joe由 GitHub 帳號 miller-joe 發布v0.1.2更新於 Oct 24, 2026
MCP server for YouTube creator-ops with a ComfyUI bridge for AI thumbnail generation.
概覽
一個經 OAuth 驗證的 YouTube 創作者營運 MCP 伺服器,讓助理編輯影片、字幕、播放清單和留言,查詢頻道分析,並透過 ComfyUI 產生並設定 AI 縮圖。
- 可以做什麼
- 列出並檢視本頻道的影片和 Shorts,更新標題、說明、標籤、分類或隱私設定,或在標題完全相符的確認下刪除影片。列出、上傳和刪除字幕軌。建立播放清單並將影片加入其中。讀取留言串、回覆留言,以及對留言執行保留、核准或拒絕。依日期範圍查詢頻道和 Shorts 分析資料。設定 ComfyUI 位址後,可在一次呼叫中產生縮圖並設定到影片上。
- 適用情境
- 適合希望助理對自己的 YouTube 頻道執行實際寫入操作的頻道擁有者,例如修改中繼資料、管理留言、維護播放清單、上傳字幕和查詢分析,而不只是讀取公開資料。也適合想在對話中直接把 AI 產生的縮圖推送到 YouTube 的情境。
- 執行需求
- 透過 npx 或 Docker 在本機執行(需 Node 20+)。需要一個綁定 YouTube 頻道的 Google 帳號、一個已啟用 YouTube Data API v3 和 YouTube Analytics API 的 Google Cloud 專案,以及 Desktop 類型的 OAuth 用戶端。憑證來自 YOUTUBE_CLIENT_SECRET_FILE,或 YOUTUBE_CLIENT_ID 加 YOUTUBE_CLIENT_SECRET;需先執行一次互動式授權,將更新權杖儲存到 YOUTUBE_TOKEN_FILE。選用的 COMFYUI_URL 可啟用縮圖橋接。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Youtube Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
youtube-mcp
OAuth-authenticated YouTube MCP for channel owners. Edit video metadata, reply to and moderate comments, manage playlists, query channel analytics, and generate or set AI thumbnails via a ComfyUI bridge. Goes beyond the read-only Data API v3 wrappers that dominate this space.
The pitch
Most existing YouTube MCPs use an API key against Data API v3. Search videos, fetch public metadata, read-only. This one uses OAuth 2.0 (Authorization Code + PKCE) so it can actually write to your channel: update video titles, descriptions and tags, reply to comments, moderate spam, manage playlists. It also hits the separate YouTube Analytics API for channel stats, and generates a thumbnail via ComfyUI and pushes it to YouTube in a single MCP call.
ComfyUI renders 1280×720, youtube-mcp fetches the bytes, and POSTs to thumbnails.set. Done.
Install
Setup: Google Cloud one-time (~10 min)
-
Google account plus YouTube channel. Use a personal account, not a workspace one you might lose.
-
Google Cloud project at https://console.cloud.google.com. Call it whatever you want (e.g.
youtube-mcp). -
Enable APIs:
- YouTube Data API v3
- YouTube Analytics API
-
OAuth consent screen: External, App name, support email. In Scopes, add:
youtube.uploadyoutube.force-sslyt-analytics.readonly
-
Stay in Testing mode. Add yourself as a test user (required). As the project owner, your refresh token won't expire.
-
Create OAuth Client ID: Application type = Desktop app. Download the JSON.
-
Run the interactive auth flow:
A browser opens, you log in to the Google account tied to your YouTube channel, and grant the requested scopes. On success, a refresh token is saved to
~/.config/youtube-mcp/token.json. -
Start the server:
Or provide the client credentials via env:
YOUTUBE_CLIENT_SECRET_FILE, orYOUTUBE_CLIENT_ID+YOUTUBE_CLIENT_SECRET.
Connect an MCP client
Or point your MCP gateway at the Streamable HTTP endpoint.
Configuration
Transports
The server speaks streamable HTTP by default (great for Claude Code, MetaMCP, raw fetch). Pass --stdio (or set MCP_TRANSPORT=stdio) to switch into stdio mode, which is what stdio-first clients like Claude Desktop and the MCP Inspector expect:
Stdio mode skips the OAuth-token preflight check — the server boots even without a stored token and surfaces auth errors at tool-call time. Run youtube-mcp --auth --client-secret-file <path> once in HTTP mode to seed the refresh token before pointing Claude Desktop at it.
Tools
Videos
list_my_videos: paginated list of the authenticated channel's uploads.get_video: full detail for one video.update_video_metadata: title, description, tags, category, privacy.delete_video: permanently delete a video. Requiresconfirm_video_titleto match the current title exactly, as a guard against deleting the wrong video.
Captions
list_captions: list caption tracks on a video (language, name, status, draft flag).upload_caption: upload an SRT or WebVTT caption track to a video.delete_caption: delete a caption track.
Shorts
list_my_shorts: find Shorts in recent uploads (filters by duration ≤60s).get_shorts_analytics: YouTube Analytics query restricted to Shorts (creatorContentType==SHORTS).
Playlists
create_playlist: create a playlist (default private).add_to_playlist: add a video to an existing playlist.
Comments
list_comments: top-level comment threads on a video.reply_to_comment: reply to a top-level comment.moderate_comment: hold, approve, or reject a comment.
Analytics
query_channel_analytics: date-ranged metrics with optional dimensions and filters.
Bridge (when COMFYUI_URL is configured)
generate_and_set_thumbnail: generate a thumbnail via ComfyUI and set it on a video in one call.
Quota notes
YouTube Data API free tier = 10,000 units/day. Key operation costs:
videos.list,commentThreads.list: 1 unit each.videos.update,comments.insert,thumbnails.set: 50 units each.videos.insert(upload): 1,600 units, so about 6 uploads per day on the free tier.
Most creator-ops workflows stay well under the free cap.
Architecture
OAuth refresh tokens are cached locally and refreshed just-in-time before expiry. The bridge tool downloads image bytes from ComfyUI internally, so ComfyUI does not need to be publicly reachable.
Development
Requires Node 20+.
Roadmap
Shipped:
- Videos: list, get, update metadata, delete with title-match confirm guard.
- Captions: upload, list, delete.
- Shorts:
list_my_shorts(duration filter) andget_shorts_analytics(creatorContentType==SHORTS). - Playlists: create, add-to.
- Comments: list, reply, moderate.
- Analytics: channel analytics query.
- ComfyUI thumbnail bridge:
generate_and_set_thumbnail.
Planned:
- Video upload (
video_upload) with resumable-upload support. - Reporting API for bulk historical data exports.
License
MIT © Joe Miller
Support
If this saves you time, consider supporting development:
來源:README.md,提交 13f70c4
工具
0版本歷史
1- v0.1.2最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分