YouTube Model Context Protocol (MCP) Server
# YouTube Model Context Protocol (MCP) Server
[](https://modelcontextprotocol.io)
[](https://www.python.org/downloads/)
[](LICENSE)
[]()
The canonical, 100% pure Google YouTube Model Context Protocol (MCP) server. Built exclusively upon official Google YouTube APIs (**YouTube Data API v3**, **YouTube Analytics API v2**, **YouTube Live Streaming API**, **YouTube SuperChat API**, and **YouTube Channel Memberships API**).
Enables AI agents (Claude Desktop, Cursor, Google Antigravity, Gemini CLI) to execute full-spectrum YouTube channel ownership, studio management, and algorithmic automation without third-party scraping or unofficial dependencies.
---
## Canonical Architecture (70 Official API Tools)
| Category | Official Google API Resource | Registered MCP Tools |
|---|---|---|
| **Video Lifecycle & Uploads** | `youtube.videos.insert/delete`, `youtube.thumbnails.set` | `youtube_upload_short_video`, `youtube_upload_long_video`, `youtube_check_video_format_type`, `youtube_upload_video`, `youtube_set_video_thumbnail`, `youtube_delete_video` |
| **Search & Discovery** | `youtube.search.list`, `youtube.videos.list` | `youtube_search_videos`, `youtube_search_channels`, `youtube_get_trending_videos` |
| **Video Studio & Details** | `youtube.videos.list/update`, `youtube.videos.reportAbuse` | `youtube_get_video_details`, `youtube_update_video_metadata`, `youtube_report_video_abuse` |
| **SEO, Tags & Localization** | `youtube.videoCategories.list`, `youtube.i18nLanguages.list`, `youtube.i18nRegions.list`, `youtube.videoAbuseReportReasons.list` | `youtube_set_video_tags`, `youtube_add_video_tags`, `youtube_list_video_categories`, `youtube_list_i18n_languages`, `youtube_list_i18n_regions`, `youtube_list_video_abuse_reasons` |
| **Transcripts & Caption Studio** | `youtube.captions.list/insert/delete/download` | `youtube_get_video_transcript`, `youtube_list_transcript_languages`, `youtube_list_video_captions`, `youtube_upload_caption`, `youtube_download_caption`, `youtube_delete_caption` |
| **Playlists & Curation** | `youtube.playlists.list/insert/update/delete`, `youtube.playlistItems.list/insert/update/delete` | `youtube_list_playlists`, `youtube_get_playlist_items`, `youtube_create_playlist`, `youtube_update_playlist`, `youtube_delete_playlist`, `youtube_add_video_to_playlist`, `youtube_reorder_playlist_item`, `youtube_remove_video_from_playlist` |
| **Comments & Moderation** | `youtube.commentThreads.list/insert`, `youtube.comments.insert/delete/setModerationStatus` | `youtube_get_video_comments`, `youtube_post_video_comment`, `youtube_reply_to_comment`, `youtube_moderate_comment`, `youtube_delete_comment` |
| **Ratings & Subscriptions** | `youtube.videos.rate/getRating`, `youtube.subscriptions.list/insert/delete` | `youtube_rate_video`, `youtube_get_my_rating`, `youtube_list_subscriptions`, `youtube_subscribe_to_channel`, `youtube_unsubscribe_from_channel` |
| **Live Broadcasts & Ingestion**| `youtube.liveBroadcasts.list/insert/transition/bind`, `youtube.liveStreams.list/insert/delete` | `youtube_create_live_broadcast`, `youtube_list_live_broadcasts`, `youtube_transition_live_broadcast`, `youtube_create_live_stream`, `youtube_bind_live_broadcast`, `youtube_list_live_streams`, `youtube_delete_live_stream` |
| **Live Chat Moderation** | `youtube.liveChatMessages.list/insert/delete`, `youtube.liveChatBans.insert`, `youtube.liveChatModerators.list/insert/delete` | `youtube_get_live_chat_messages`, `youtube_send_live_chat_message`, `youtube_delete_live_chat_message`, `youtube_ban_live_chat_user`, `youtube_list_live_chat_moderators`, `youtube_add_live_chat_moderator`, `youtube_remove_live_chat_moderator` |
| **Branding & Watermarks** | `youtube.channelBanners.insert`, `youtube.watermarks.set/unset`, `youtube.channels.update` | `youtube_upload_channel_banner`, `youtube_update_channel_branding`, `youtube_set_channel_watermark`, `youtube_unset_channel_watermark` |
| **Channel Shelves & Feeds** | `youtube.channels.list`, `youtube.channelSections.list/insert/delete`, `youtube.activities.list` | `youtube_get_channel_details`, `youtube_get_channel_sections`, `youtube_create_channel_section`, `youtube_delete_channel_section`, `youtube_list_channel_activities` |
| **YouTube Analytics v2** | `youtubeAnalytics.reports.query` | `youtube_get_analytics_report` (watch time, views, retention, traffic sources), `youtube_get_revenue_report` (estimated revenue, CPM, gross revenue) |
| **Super Chat & Memberships** | `youtube.superChatEvents.list`, `youtube.members.list` | `youtube_list_super_chat_events` (live stream donations), `youtube_list_channel_members` (active channel sponsors) |
| **Diagnostics & Health** | Server status inspection | `get_server_status` |
---
## Authentication Architecture
Supports official Google Cloud authentication patterns:
- **API Key Mode (Read-Only):** Instant setup with `YOUTUBE_API_KEY`. Allows research, video search, transcript parsing, and public metadata analysis.
- **OAuth2 Mode (Full Studio & Analytics Control):** Full read/write with `client_secrets.json` / `token.json`. Automatically requests the official YouTube and YouTube Analytics scopes:
- `https://www.googleapis.com/auth/youtube`
- `https://www.googleapis.com/auth/youtube.force-ssl`
- `https://www.googleapis.com/auth/youtube.upload`
- `https://www.googleapis.com/auth/youtube.readonly`
- `https://www.googleapis.com/auth/youtubepartner`
- `https://www.googleapis.com/auth/yt-analytics.readonly`
- `https://www.googleapis.com/auth/yt-analytics-monetary.readonly`
---
## Quickstart
### 1. Installation
```bash
git clone https://github.com/nilhn9660/youtube-mcp-server.git
cd youtube-mcp-server
pip install -e .
```
### 2. Environment Setup
Create `.env` based on `.env.example`:
```ini
# Read-Only Access
YOUTUBE_API_KEY=AIzaSy...
# Full Studio & Analytics Access (OAuth2)
YOUTUBE_CLIENT_SECRETS_PATH=client_secrets.json
YOUTUBE_TOKEN_PATH=token.json
```
---
## Client Setup Guides
### Claude Desktop (`claude_desktop_config.json`)
```json
{
"mcpServers": {
"youtube": {
"command": "youtube-mcp-server",
"env": {
"YOUTUBE_API_KEY": "YOUR_API_KEY"
}
}
}
}
```
### Cursor (`.cursor/mcp.json`)
```json
{
"mcpServers": {
"youtube": {
"command": "youtube-mcp-server",
"env": {
"YOUTUBE_API_KEY": "YOUR_API_KEY"
}
}
}
}
```
### Antigravity & Gemini CLI (`agy_config.json`)
```json
{
"mcpServers": {
"youtube-mcp": {
"command": "youtube-mcp-server",
"env": {
"YOUTUBE_API_KEY": "YOUR_API_KEY"
}
}
}
}
```
---
## License & Commercial Use Restrictions
Copyright (c) 2026 Himanshu Nagar. All Rights Reserved.
This project is source-available under the **PolyForm Noncommercial License 1.0.0** (see [LICENSE](LICENSE)).
- **Permitted Free Use:** Personal projects, academic research, evaluation, testing, and non-commercial development.
- **Strictly Prohibited Without Commercial License:** Commercial deployment, embedding into paid SaaS platforms, agency production workflows, reselling, or enterprise distribution.
### Enterprise Licensing & Handover
To obtain an official Commercial License, Enterprise Deployment Authorization, or Full Intellectual Property (IP) Handover / Acquisition:
- **Contact:** Himanshu Nagar
- **Email:** `nagarhimanshu37@gmail.com`
TDQS
Scored across 70 tools
Most tools target distinct resources and actions, but several clusters overlap enough to cause misselection: youtube_upload_video vs youtube_upload_short_video vs youtube_upload_long_video, and youtube_update_video_metadata vs youtube_set_video_tags vs youtube_add_video_tags. The caption/transcript and live-stream/live-broadcast groups are related but generally distinguishable through their descriptions.
The surface overwhelmingly follows a predictable youtube_verb_noun pattern. Minor deviations include get_server_status lacking the youtube_ prefix, plus occasional verb variations such as check/unset versus get/remove/delete.
With 70 tools, the server is far beyond a reasonable MCP surface for most agent workflows, even for a broad domain like YouTube. The large number increases selection burden and makes overlapping capabilities harder to manage.
Coverage is broad across videos, playlists, comments, live streaming, captions, analytics, channels, subscriptions, and search. Some lifecycle gaps remain, such as no explicit delete/update for live broadcasts beyond transition, and limited update operations for channel sections.