YouTube Studio MCP
Provides tools for managing YouTube channels, videos, playlists, comments, captions, and analytics through the YouTube Data and Analytics APIs.
Enables full YouTube Studio management, including video publishing, playlist organization, community interaction, and deep channel analytics.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@YouTube Studio MCPSummarize my channel's analytics for this week"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π¬ YouTube Studio MCP
A high-performance, zero-dependency Model Context Protocol (MCP) server for full YouTube Studio management, video publishing, playlists, community interaction, and deep analytics directly from AI agents.
# 1. Clone & Setup
git clone https://github.com/hygef-v4/youtube-studio-mcp.git
cd youtube-studio-mcp && python scripts/auth.py auth
# 2. Ask your AI Assistant (Claude Desktop / Cursor / Antigravity):
> "Audit my last 5 videos, optimize SEO tags, and summarize 28-day traffic sources."π Why YouTube Studio MCP?
Most YouTube automation tools either require heavy external dependencies or force you to route channel tokens through third-party cloud proxies. YouTube Studio MCP is designed from the ground up to be:
π‘οΈ 100% Local & Private: Direct Google OAuth 2.0 PKCE authentication. All access tokens stay strictly on your local machine (
secrets/).β‘ Zero Runtime Dependencies: Built entirely on Python 3.10+ standard libraries (
urllib,http.server,json,dataclasses,secrets). No pip dependencies, no version drift, instant startup.π Autonomous Token Renewal: Transparent background OAuth token refresh ensures long-running agent conversations are never interrupted.
π§° Comprehensive Toolset (31 MCP Tools): Complete coverage of YouTube channel operations from video uploads and full spoken transcript extraction to viewer demographics.
Related MCP server: YouTube MCP Server
πΊοΈ System Architecture
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β AI MCP CLIENT β
β (Claude Desktop / Cursor / Antigravity) β
βββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββ
β stdio (JSON-RPC 2.0)
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β YOUTUBE STUDIO MCP SERVER β
β β
β βββββββββββββββββββββββββ ββββββββββββββββββββββββ β
β β McpServer β β AuthConfig β β
β β (29 Tools Dispatcher)β β (OAuth Token Manager)β β
β βββββββββββββ¬ββββββββββββ ββββββββββββ¬ββββββββββββ β
β β β β
β βΌ βΌ β
β βββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β YouTubeClient β β
β β (Zero-dependency HTTPS REST Engine via urllib) β β
β βββββββββββββββββββββ¬ββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββ
β HTTPS / TLS 1.3
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β GOOGLE CLOUD PLATFORM β
β β’ Google OAuth 2.0 Token Server β
β β’ YouTube Data API v3 β
β β’ YouTube Analytics API v2 β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββπ Quick Start (5 Minutes)
1. Clone the repository
git clone https://github.com/hygef-v4/youtube-studio-mcp.git
cd youtube-studio-mcp
mkdir -p secrets2. Configure Google Cloud OAuth Client
Create a project in Google Cloud Console.
Enable YouTube Data API v3 and YouTube Analytics API.
Create an OAuth 2.0 Client ID with application type Desktop app.
Download the JSON credential file and save it locally as:
secrets/client_secret.json
(See the step-by-step Google OAuth Setup Guide for screenshots and troubleshooting).
3. Authenticate Locally
Run the interactive loopback authentication helper:
python scripts/auth.py authApprove the permissions in your browser. Upon success, your credentials are encrypted locally in secrets/token.json.
βοΈ MCP Client Configuration
Claude Desktop
Add to your claude_desktop_config.json:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"youtube-studio": {
"command": "python",
"args": ["F:/code/git/youtube-studio-mcp/scripts/server.py"],
"cwd": "F:/code/git/youtube-studio-mcp",
"env": {
"YOUTUBE_CLIENT_SECRETS": "F:/code/git/youtube-studio-mcp/secrets/client_secret.json",
"YOUTUBE_TOKEN_FILE": "F:/code/git/youtube-studio-mcp/secrets/token.json"
}
}
}
}Cursor IDE
In Cursor Settings > Features > MCP, click Add New MCP Server:
Name:
youtube-studioType:
commandCommand:
python F:/code/git/youtube-studio-mcp/scripts/server.py
(See MCP Client Configuration Guide for VS Code, Codex, and other clients).
π§° Complete Directory of 32 MCP Tools
Category | Tool Name | Description |
Auth & Setup |
| Check local OAuth secret and token existence. |
| Generate browser authorization URL and local command. | |
Channel & Videos |
| Fetch channel subscriber count, views, branding, and uploads playlist ID. |
| Retrieve recent uploads with combined metadata and public metrics. | |
| Inspect full snippet, statistics, and status for one video. | |
| Update title, description, tags list, category, language, or privacy status. | |
| Permanently delete a video from your channel. | |
| Upload a local image file as a custom high-res video thumbnail. | |
| Resumable upload of a local video file ( | |
Playlists |
| List all playlists on the authenticated channel. |
| List all video items inside a specific playlist. | |
| Create a brand new playlist (public, unlisted, or private). | |
| Modify playlist title, description, or visibility status. | |
| Delete a playlist from your channel. | |
| Add a video to a specific playlist at a defined position. | |
| Remove a video entry from a playlist. | |
Community & Comments |
| List top-level comment threads ordered by relevance. |
| Post a top-level comment on one of your videos. | |
| Reply directly to an audience comment. | |
| Delete a comment by its unique ID. | |
Deep Analytics |
| Aggregate channel performance (views, watch time, subs) over custom date ranges. |
| Daily time-series retention and watch time metrics for a specific video. | |
| Breakdown of views by traffic origin (Search, Suggested, Browse, External). | |
| Audience demographics breakdown by age group, gender, or geographic country. | |
| Rank top performing videos by views and watch time. | |
Search & Research |
| Search videos by keywords to analyze competitor titles, tags, and views. |
| Search YouTube channels by topic or niche keyword. | |
Captions & Transcripts |
| Inspect available caption and subtitle tracks for a video. |
| Extract full spoken transcript, summary-ready text, or timestamped segments. | |
| Bulk extract transcripts from a list of video IDs, a playlist, or recent uploads. | |
| Download raw caption file (SRT, VTT, SBV) by caption ID. | |
| Delete a caption track by ID. |
(For full input schemas, type definitions, and parameters, see docs/tools.md).
π‘ Example Conversational Prompts
"Show my channel overview and summarize the public statistics of my last 5 videos.""Inspect video VIDEO_ID, generate 15 high-converting SEO tags, and update its description with chapter timestamps.""Upload the image at 'C:/thumbnails/hero.png' as the thumbnail for video VIDEO_ID.""Analyze where my channel views came from over the last 28 days and break down the traffic sources by percentage.""Create a new public playlist titled 'Valorant Highlights' and add my latest video to it."π§ͺ Testing
Run the built-in test suite (no third-party test runners required):
python -m unittest discover testsπ Security Policy
Credentials (
secrets/client_secret.jsonandsecrets/token.json) are strictly git-ignored.No network requests are sent to any domain other than
googleapis.comandaccounts.google.com.See SECURITY.md for reporting guidelines.
π€ Contributing
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
π License
Distributed under the MIT License. See LICENSE for more information.
This server cannot be deployed
Maintenance
Related MCP Connectors
YouTube transcripts, search, channel browsing, and playlists for AI agents via MCP.
YouTube transcripts, search, channel/playlist listings and upload tracking for AI agents. No signup.
YouTube transcripts, search, channels, playlists and bulk transcript jobs for AI agents. 14 tools.
The all-in-one YouTube content engine: research, ideas, thumbnails, scripts, and video.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides AI assistants with comprehensive YouTube analytics and channel management capabilities, including channel performance, video analytics, audience insights, and content strategy tools.17 npm1-
- AlicenseBqualityCmaintenanceProvides comprehensive access to YouTube Data, Analytics, and Reporting APIs, enabling AI assistants to manage videos, analyze performance, handle comments, and extract transcripts.40MIT
- AlicenseAqualityCmaintenanceEnables AI assistants to retrieve YouTube channel overviews, Studio analytics, video performance, traffic source breakdowns, and comments for sentiment analysis using natural language prompts.81MIT
- AlicenseAqualityBmaintenanceEnables AI agents to read transcripts of any public video, research channels, analyze performance, read comments, and manage multiple owned channels.1619 npmMIT