
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 分