youtube-studio-mcp
YouTube Studio & Channel Analytics MCP Server
一个面向 YouTube Studio 与频道智能的生产级 Model Context Protocol (MCP) 服务器
赋能 AI 助手(Claude、Cursor、Antigravity 等)分析您的 YouTube 频道、跟踪视频指标、深入研究 YouTube Studio 分析、发现受众流量来源,并分析社区情感 — 完全通过 .env 进行配置。
🚀 功能与 MCP 工具套件
YouTube Studio MCP 提供 8 个专用工具:
工具 | 类别 | 描述 |
| 频道统计 | 返回频道标题、频道句柄、订阅者数量、累计观看次数、视频数量、主题类别和描述。 |
| Studio 分析 | 在任何时间范围( |
| 受众特征与流量 | 按维度提供详细细分: |
| 视频智能 | 按观看次数、观看分钟数或新增订阅者数对您表现最佳的视频进行排名,支持任何日期范围。 |
| 视频深入分析 | 针对单个特定视频的深度分析(每日趋势、观看时长、观众留存率、流量来源)。 |
| 内容清单 | 列出已上传的视频,包括当前的观看次数、点赞数、评论数、时长和隐私状态。 |
| 视频元数据 | 返回指定视频 ID 的完整元数据、标签、描述、类别和统计数据。 |
| 社区与情感分析 | 检索整个频道或特定视频上的热门评论主题和回复,用于情感分析和反馈。 |
Related MCP server: YouTube MCP Server
⚙️ 环境配置(.env)
所有凭据和设置都直接读自 .env:
# Google OAuth 2.0 Credentials (from Google Cloud Console)
YOUTUBE_CLIENT_ID=your_client_id.apps.googleusercontent.com
YOUTUBE_CLIENT_SECRET=your_client_secret
# OAuth Refresh Token (written automatically by run_auth.py)
YOUTUBE_REFRESH_TOKEN=🛠️ 分步设置指南
1. 使用 uv 克隆并安装依赖项
git clone https://github.com/Dhananjayrbiraris/youtube-mcp.git
cd youtube-mcp
uv venv
uv pip install -e .2. 设置 Google Cloud 项目(一次性)
创建一个新项目(例如
YouTube-Studio-MCP)。在 API 和服务 > 库 中,启用:
YouTube Data API v3
YouTube Analytics API
在 OAuth 同意屏幕 中:
用户类型:外部 -> 填写应用名称和您的电子邮件。
在 测试用户 下,添加您的 Google 电子邮件地址。
在 凭据 中:
点击 创建凭据 > OAuth 客户端 ID。
应用类型:桌面应用。
复制 客户端 ID 和 客户端密钥。
将它们粘贴到
.env中:YOUTUBE_CLIENT_ID=123456789-xxxx.apps.googleusercontent.com YOUTUBE_CLIENT_SECRET=GOCSPX-xxxx
3. 运行一键认证器
uv run run_auth.py这将启动您的浏览器,进行一键式 Google OAuth 登录。它会自动将 YOUTUBE_REFRESH_TOKEN 直接写入您的 .env 文件。
4. 连接到您的 AI 客户端
Claude Desktop
添加到您的 claude_desktop_config.json:
{
"mcpServers": {
"youtube-studio": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/youtube-mcp",
"run",
"youtube-studio-mcp"
]
}
}
}💡 示例 AI 提示
"给我一份我的 YouTube 频道过去 28 天表现的概览。"
"我的大部分流量来自哪里(搜索、推荐视频还是浏览功能)?"
"这个月我的哪个视频带来了最多订阅者?"
"总结我最新视频评论中的常见主题和问题。"
"按年龄段和国家显示我的受众分布。"
🧪 测试
运行测试套件:
pytest📄 许可证
本项目基于 MIT License 许可。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to search videos, read channels, browse playlists, fetch comments, and get transcripts from YouTube using the YouTube Data API v3 and InnerTube API for captions.2GPL 3.0
- FlicenseNot gradedqualityDmaintenanceProvides AI assistants with comprehensive YouTube analytics and channel management capabilities, including channel performance, video analytics, audience insights, and content strategy tools.381
- AlicenseAqualityCmaintenanceEnables AI assistants to access YouTube organic analytics, including channel stats, video performance, watch time, and audience engagement, via the YouTube Data API v3 and Analytics API v2.621MIT
- FlicenseAqualityCmaintenanceEnables AI assistants to analyze YouTube channels, videos, transcripts, and content strategy through structured tool calls.1738
Related MCP Connectors
YouTube transcripts, search, channels, playlists and bulk transcript jobs for AI agents. 14 tools.
Provide token-optimized, structured YouTube data to enhance your LLM applications. Access efficien…
Manage your Vidalytics videos and analytics from your AI assistant.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Dhananjayrbiraris/youtube-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server