Skip to main content
Glama
YouTube Model Context Protocol (MCP) Server

YouTube Model Context Protocol (MCP) Server

by nilhn9660

YouTube Model Context Protocol (MCP) Server

MCP Standard Python 3.10+ License: PolyForm Noncommercial 1.0 Tools

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


Related MCP server: YouTube MCP Server

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

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:

# 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)

{
  "mcpServers": {
    "youtube": {
      "command": "youtube-mcp-server",
      "env": {
        "YOUTUBE_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

Cursor (.cursor/mcp.json)

{
  "mcpServers": {
    "youtube": {
      "command": "youtube-mcp-server",
      "env": {
        "YOUTUBE_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

Antigravity & Gemini CLI (agy_config.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).

  • 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

Available Tools

70 tools
get_server_statusA

Check YouTube MCP server authentication status, active mode, and quota capabilities.

Inputs: no named parameters. Returns: result

youtube_add_live_chat_moderatorB

Appoint a new moderator to an active live chat stream by channel ID. Requires OAuth2.

Inputs: live_chat_id (required), moderator_channel_id (required). Returns: result

youtube_add_video_tagsA

Append new SEO tags to an owned video without removing existing tags. Requires OAuth2.

Inputs: new_tags (required), video_id (required). Returns: result

youtube_add_video_to_playlistB

Add a video into an existing playlist at an optional position index. Requires OAuth2.

Inputs: video_id (required), playlist_id (required), position. Returns: result

youtube_ban_live_chat_userB

Ban a disruptive user from live chat (temporary timeout or permanent ban). Requires OAuth2.

Inputs: live_chat_id (required), user_channel_id (required), ban_duration_seconds. Returns: result

youtube_bind_live_broadcastA

Bind a scheduled live broadcast with an ingestion stream endpoint. Requires OAuth2.

Inputs: stream_id (required), broadcast_id (required). Returns: result

youtube_check_video_format_typeB

Inspect whether a video is indexed/formatted as a YouTube Short or Long video based on duration and tags.

Inputs: video_id (required). Returns: result

youtube_create_channel_sectionB

Create a new homepage shelf/section (e.g. singlePlaylist, multiplePlaylists, popularUploads). Requires OAuth2.

Inputs: section_type (required), title, position, playlist_ids. Returns: result

youtube_create_live_broadcastC

Create and schedule a new YouTube Live broadcast. Requires OAuth2.

Inputs: title (required), description, privacy_status, scheduled_start_time. Returns: result

youtube_create_live_streamC

Create an RTMP live stream ingestion endpoint returning RTMP URL & stream key for OBS/FFmpeg. Requires OAuth2.

Inputs: title (required), frame_rate, resolution, ingestion_type. Returns: result

youtube_create_playlistC

Create a new YouTube playlist on the authenticated user's channel. Requires OAuth2.

Inputs: title (required), description, privacy_status. Returns: result

youtube_delete_captionB

Delete a caption track from a video by caption ID. Requires OAuth2.

Inputs: caption_id (required). Returns: result

youtube_delete_channel_sectionB

Delete a homepage section/shelf from the authenticated channel. Requires OAuth2.

Inputs: section_id (required). Returns: result

youtube_delete_commentB

Permanently delete a comment or reply by its ID. Requires OAuth2.

Inputs: comment_id (required). Returns: result

youtube_delete_live_chat_messageB

Delete a specific message from an active live chat stream. Requires OAuth2.

Inputs: message_id (required). Returns: result

youtube_delete_live_streamC

Delete an RTMP live stream endpoint by ID. Requires OAuth2.

Inputs: stream_id (required). Returns: result

youtube_delete_playlistA

Permanently delete an entire playlist by its playlist ID. Requires OAuth2.

Inputs: playlist_id (required). Returns: result

youtube_delete_videoA

Permanently delete an owned YouTube video by its video ID. Requires OAuth2.

Inputs: video_id (required). Returns: result

youtube_download_captionA

Download official raw caption track content (.srt, .vtt, or .sbv) by caption ID. Requires OAuth2.

Inputs: caption_id (required), tfmt. Returns: result

youtube_get_analytics_reportC

Query official YouTube Analytics API v2 for watch time, views, retention, subscriber gains, and traffic sources.

Inputs: metrics (required), end_date (required), start_date (required), sort, +3 more. Returns: result

youtube_get_channel_detailsC

Retrieve channel info, subscriber count, total video count, total views, and custom handle.

Inputs: mine, channel_id, for_handle. Returns: result

youtube_get_channel_sectionsC

Retrieve channel homepage shelves and featured playlist sections.

Inputs: channel_id (required). Returns: result

youtube_get_live_chat_messagesB

Fetch live chat stream messages, authors, and timestamps for an active live stream. Requires OAuth2.

Inputs: live_chat_id (required), max_results. Returns: result

youtube_get_my_ratingA

Get authenticated user's rating ('like', 'dislike', 'none') on given video IDs. Requires OAuth2.

Inputs: video_ids (required). Returns: result

youtube_get_playlist_itemsB

List videos contained in a specific playlist with position ordering and metadata.

Inputs: playlist_id (required), max_results. Returns: result

youtube_get_revenue_reportC

Query YouTube Analytics API v2 for estimated revenue, ad revenue, gross revenue, and CPM.

Inputs: end_date (required), start_date (required). Returns: result

youtube_get_video_commentsC

Retrieve top-level comments, author info, likes, and reply counts for a video.

Inputs: video_id (required), order, max_results. Returns: result

youtube_get_video_detailsB

Fetch complete metadata, stats (views, likes, comments), duration, and tags for up to 50 video IDs.

Inputs: video_ids (required). Returns: result

youtube_get_video_transcriptB

Extract subtitles and transcript text with start timestamps and duration segments for any public video.

Inputs: video_id (required), languages, include_timestamps. Returns: result

youtube_list_channel_activitiesC

List recent activity stream events (uploads, likes, favorites, playlist items, posts) for a channel.

Inputs: mine, channel_id, max_results. Returns: result

youtube_list_channel_membersB

List active paid channel sponsors/members and membership levels. Requires OAuth2.

Inputs: max_results. Returns: result

youtube_list_i18n_languagesA

List all supported YouTube application languages and language codes.

Inputs: no named parameters. Returns: result

youtube_list_i18n_regionsA

List all supported YouTube country and region codes.

Inputs: no named parameters. Returns: result

youtube_list_live_broadcastsB

List live broadcasts ('all', 'active', 'upcoming', 'completed'). Requires OAuth2.

Inputs: max_results, broadcast_status. Returns: result

youtube_list_live_chat_moderatorsB

List appointed chat moderators for an active YouTube Live chat stream. Requires OAuth2.

Inputs: live_chat_id (required), max_results. Returns: result

youtube_list_live_streamsB

List RTMP live stream endpoints on the authenticated channel. Requires OAuth2.

Inputs: max_results. Returns: result

youtube_list_playlistsB

List playlists from a target channel or the authenticated user's own channel.

Inputs: mine, channel_id, max_results. Returns: result

youtube_list_subscriptionsC

List subscriptions for authenticated user or channel ID.

Inputs: mine, channel_id, max_results. Returns: result

youtube_list_super_chat_eventsB

List official Super Chat and Super Sticker donations received during live streams. Requires OAuth2.

Inputs: max_results. Returns: result

youtube_list_transcript_languagesA

List all available transcript language tracks (manual and auto-generated) for a video.

Inputs: video_id (required). Returns: result

youtube_list_video_abuse_reasonsA

List official categories and reasons for reporting abusive or harmful content.

Inputs: no named parameters. Returns: result

youtube_list_video_captionsA

List official uploaded captions/subtitles on an owned video. Requires OAuth2.

Inputs: video_id (required). Returns: result

youtube_list_video_categoriesB

List valid YouTube video category IDs and names for a country code.

Inputs: region_code. Returns: result

youtube_moderate_commentB

Set comment moderation status ('heldForReview', 'published', or 'rejected'). Requires OAuth2.

Inputs: comment_id (required), moderation_status (required). Returns: result

youtube_post_video_commentB

Post a new comment on a YouTube video as the authenticated channel. Requires OAuth2.

Inputs: text (required), video_id (required). Returns: result

youtube_rate_videoA

Rate a video ('like', 'dislike', or 'none' to remove rating). Requires OAuth2.

Inputs: rating (required), video_id (required). Returns: result

youtube_remove_live_chat_moderatorA

Remove a moderator from an active live chat stream by moderator ID. Requires OAuth2.

Inputs: moderator_id (required). Returns: result

youtube_remove_video_from_playlistB

Remove a video entry from a playlist using its playlist_item_id. Requires OAuth2.

Inputs: playlist_item_id (required). Returns: result

youtube_reorder_playlist_itemC

Change the zero-based order position of a video item within a playlist. Requires OAuth2.

Inputs: video_id (required), playlist_id (required), new_position (required), playlist_item_id (required). Returns: result

youtube_reply_to_commentC

Post a reply to an existing YouTube comment thread. Requires OAuth2.

Inputs: text (required), parent_id (required). Returns: result

youtube_report_video_abuseC

Submit an official abuse report for a video under YouTube Community Guidelines. Requires OAuth2.

Inputs: video_id (required), reason_id (required), comments, secondary_reason_id. Returns: result

youtube_search_channelsC

Search YouTube channels by name, topic, or keyword.

Inputs: query (required), max_results. Returns: result

youtube_search_videosC

Search videos on YouTube with keyword and optional filters (duration, date, definition, region).

Inputs: query (required), order, max_results, region_code, +3 more. Returns: result

youtube_send_live_chat_messageB

Send a message to an active live chat stream as the authenticated channel. Requires OAuth2.

Inputs: live_chat_id (required), message_text (required). Returns: result

youtube_set_channel_watermarkC

Upload and set an in-video watermark/subscribe badge for all channel videos. Requires OAuth2.

Inputs: channel_id (required), image_file_path (required), position, offset_ms, +1 more. Returns: result

youtube_set_video_tagsA

Replace and set exact SEO tags for an owned video. Requires OAuth2.

Inputs: tags (required), video_id (required). Returns: result

youtube_set_video_thumbnailB

Upload and attach a custom thumbnail image (PNG/JPEG) to an owned video. Requires OAuth2.

Inputs: video_id (required), image_file_path (required). Returns: result

youtube_subscribe_to_channelB

Subscribe authenticated channel to another YouTube channel by ID. Requires OAuth2.

Inputs: channel_id (required). Returns: result

youtube_transition_live_broadcastB

Transition broadcast lifecycle state ('testing', 'live', 'complete'). Requires OAuth2.

Inputs: broadcast_id (required), broadcast_status (required). Returns: result

youtube_unset_channel_watermarkB

Remove the watermark/subscribe badge from all channel videos. Requires OAuth2.

Inputs: channel_id (required). Returns: result

youtube_unsubscribe_from_channelB

Unsubscribe from a channel using its subscription ID. Requires OAuth2.

Inputs: subscription_id (required). Returns: result

youtube_update_channel_brandingB

Update channel SEO keywords, description, banner URL, or country setting. Requires OAuth2.

Inputs: channel_id (required), country, keywords, banner_url, +1 more. Returns: result

youtube_update_playlistA

Update title, description, or privacy status of an owned playlist. Requires OAuth2.

Inputs: playlist_id (required), title, description, privacy_status. Returns: result

youtube_update_video_metadataA

Update title, description, tags, category, or privacy of an owned video. Requires OAuth2.

Inputs: video_id (required), tags, title, category_id, +2 more. Returns: result

youtube_upload_captionB

Upload a caption file (.srt, .vtt) for an owned video. Requires OAuth2.

Inputs: name (required), language (required), video_id (required), caption_file_path (required), +1 more. Returns: result

youtube_upload_channel_bannerC

Upload a channel banner (cover art) image to YouTube. Requires OAuth2.

Inputs: image_file_path (required). Returns: result

youtube_upload_long_videoB

Upload a long-form landscape video with timestamp chapters, automated thumbnail upload, and premiere scheduling. Requires OAuth2.

Inputs: title (required), file_path (required), tags, license, +9 more. Returns: result

youtube_upload_short_videoB

Upload a vertical YouTube Short (up to 60s/3m) with auto-formatted #Shorts tags and direct Shorts URL. Requires OAuth2.

Inputs: title (required), file_path (required), tags, category_id, +3 more. Returns: result

youtube_upload_videoC

Upload a local video file (MP4, MOV, MKV, etc.) to YouTube with resumable chunking. Requires OAuth2.

Inputs: title (required), file_path (required), tags, category_id, +3 more. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3/5.0

    Scored across 70 tools

    Disambiguation3/5

    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.

    Naming Consistency4/5

    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.

    Tool Count1/5

    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.

    Completeness4/5

    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.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Gives AI coding agents full control over a YouTube channel with 22 tools for channel management, videos, playlists, comments, search, analytics, thumbnails, and captions.
      3
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to read transcripts of any public video, research channels, analyze performance, read comments, and manage multiple owned channels.
      16
      74 npm
      1
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI assistants to interact with YouTube channels, providing analytics, video metadata updates, transcript extraction, and comment management through official Google APIs with OAuth 2.0.
      MIT