Skip to main content
Glama
YouTubeMCP
by imrees

YouTubeMCP

A local Model Context Protocol (MCP) server that lets an AI assistant upload and manage videos on your own YouTube channel through the official YouTube Data API v3, with your approval for every change.

  • Runs on your computer over stdio. There is no hosted service, no browser automation, no subscription and no telemetry; it talks only to Google's APIs, using a Google Cloud project and OAuth client that you create. See the privacy policy.

  • Works with any MCP client that can start a local stdio server. It doesn't depend on any particular assistant, recording app or editor.

  • Safe by default. Uploads are unlisted unless you ask otherwise. Every change is previewed first and needs your approval, and anything that would make content public also needs a native macOS "Allow Public" dialog that only you can answer.

  • Reliable. Resumable background uploads with retries, protection against duplicate uploads, and every write checked afterwards by reading it back from YouTube.

  • Optional extras: captions, playlists, scheduled publishing, read-only YouTube Analytics, and a macOS Finder Quick Action, Upload & Share, that uploads a video as unlisted and copies its link.

v1.0.0. All 26 tools have been tested against a live channel. See CHANGELOG.md.

Quick start (macOS)

You don't need any prior experience with Python, Google Cloud, OAuth or MCP. Allow about 20 minutes.

  1. Install Python 3.12 from https://www.python.org/downloads/ (or brew install python@3.12).

  2. Download youtube-mcp-1.0.0-source.zip from the Releases page, unzip it, and run the installer from that folder, in Terminal:

    cd ~/Downloads/youtube-mcp-1.0.0-source
    ./install.sh

    It installs into your home folder (no administrator password), tests itself, and asks whether you also want the optional Finder Quick Action and, if Claude Desktop is installed, whether to configure it. Both default to no.

  3. Create your own Google OAuth client (free; step-by-step guide) and save it as ~/Library/Application Support/youtube-mcp/client_secret.json.

  4. Sign in once: "$HOME/Library/Application Support/youtube-mcp-app/bin/youtube-mcp-authorize"

  5. Connect your MCP client using the JSON the installer printed, and restart the client.

Then ask your assistant something like "Upload ~/Movies/demo.mp4 to YouTube as unlisted, titled 'Product demo'". It shows you a preview, and nothing happens until you approve it.

Upgrade: run ./install.sh from the new release; your credentials and history are kept. Uninstall: "$HOME/Library/Application Support/youtube-mcp-app/bin/youtube-mcp-uninstall"; your data is kept unless you ask. Details, options and other platforms: docs/INSTALL.md. The installer is tested on macOS (Apple silicon, Python 3.12); Linux is untested, and Windows isn't supported.

Related MCP server: youtube-stats-mcp

What it can do

Area

Tools

Videos

upload_video, get_upload_progress, update_metadata, set_thumbnail, set_visibility, get_video_status, get_share_link, list_uploads, get_channel_info

Captions

upload_captions, list_captions, download_captions, update_captions

Playlists

list_playlists, create_playlist, update_playlist, list_playlist_items, add_to_playlist, remove_from_playlist

Categories

list_categories

Scheduled publishing

schedule_publish, get_publish_schedule, cancel_publish_schedule

Analytics (optional, read-only)

get_channel_analytics, get_video_analytics, get_top_videos

Every tool and parameter is documented in the tool reference.

There are deliberately no tools to delete videos, captions or playlists, or to read or manage comments. remove_from_playlist removes a playlist entry; the video itself is never deleted.

How approval works

  1. Preview. Every tool that changes something on YouTube first returns a preview and a single-use confirmation_token. The token expires after 10 minutes and is bound to the exact parameters, and for files to the file's contents.

  2. Approve. Your assistant should show you the preview and wait for you to approve it. Only then does it call the tool again with the token.

  3. Public needs more. Anything that would make content public also needs confirm_public=true and a click on Allow Public in a native macOS dialog. Cancel is the default; if the dialog can't be shown or times out, nothing is made public.

  4. Verify. After each write, the server reads the result back from YouTube and tells you whether it was confirmed. A write is never sent twice.

This protects against mistakes. It is not a complete security boundary: see Security model and limitations.

YouTube API quota

Google gives every Cloud project a free daily quota, which resets at midnight Pacific Time. At the time of writing, a project gets 100 video uploads a day plus 10,000 units a day for everything else. Typical costs in units:

Action

Units

Reading a video, playlist, channel or category list

1

Changing metadata or visibility, setting a thumbnail, any playlist change, scheduling

50

Listing a video's caption tracks

50

Uploading / replacing a caption track

400 / 450

Downloading a caption track (download_captions, verify_content)

200

Uploading a video

1 call of the separate upload allowance

Google changes these figures from time to time; the official quota table is authoritative. Analytics uses the separate YouTube Analytics API and its own quota.

Known limitations

  • macOS only is tested. Tested on macOS 26 on Apple silicon with Python 3.12. Intel Macs and Python 3.10, 3.11 and 3.13 are accepted but untested. Linux is untested and needs an explicit installer flag. There, and in any session without a macOS desktop, the public-approval dialog, notifications, clipboard and Quick Action are unavailable, so nothing can be made public. Windows isn't supported.

  • Unaudited API projects. YouTube locks videos uploaded by Cloud projects that haven't passed its API compliance audit to private. The server detects and reports this; you can change the visibility in YouTube Studio.

  • Delayed consistency. YouTube can take a while to show a change. If it isn't visible after about 15 seconds, the tool returns a "verification pending" warning instead of retrying the write.

  • Things the API can't confirm: which thumbnail image is served, and caption timings (YouTube re-times cues; the text can be compared with verify_content).

  • Reported totals. YouTube's reported totals can be larger than the items it actually returns. On one channel, playlists.list reported 22 playlists but returned 15 across all pages. The server reports both numbers and never invents missing items. See Pagination.

  • Testing-mode tokens expire weekly. While your OAuth app is in Google's Testing mode, sign-ins expire after 7 days. See Troubleshooting.

  • Token storage. The OAuth token is protected by file permissions only; it isn't encrypted or kept in the macOS Keychain.

Documentation

Document

Contents

docs/INSTALL.md

Installer: supported platforms, install, upgrade, uninstall, options, troubleshooting

docs/SETUP.md

Google Cloud and OAuth setup step by step, manual installation, settings, analytics, troubleshooting

docs/TOOLS.md

Every tool and parameter

docs/PRIVACY.md

Privacy policy: what data goes where, what is stored locally and for how long, revoking Google access, deleting your data

docs/SECURITY.md

Approval model, native dialog, what is stored locally, limitations, reporting a vulnerability

docs/BEHAVIOUR.md

How uploads, duplicate protection, verification, pagination, captions, playlists, scheduling and analytics behave; error codes

docs/QUICK_ACTION.md

The optional macOS Finder Quick Action, "Upload & Share"

docs/INSTALL_TEST_REPORT.md

Clean-installation test results

CHANGELOG.md

Release history

Development

.venv/bin/python -m pip install -r requirements-dev.txt
.venv/bin/python -m pytest -q

The tests use an in-memory fake of the YouTube API (tests/fakes.py) that mimics real behaviour, including delayed consistency, and never touch the network or real credentials. They also drive the server end to end through the MCP protocol, both in-process and as a real stdio subprocess. After changing a tool's definition, run .venv/bin/python scripts/generate_tool_reference.py to regenerate docs/TOOLS.md; a test fails if it is out of date.

youtube_mcp/
  server.py         MCP tool definitions (stdio)
  service.py        upload, metadata, visibility and status logic
  captions.py, playlists.py, categories.py, scheduling.py, analytics.py
  approval.py, confirmations.py   two-step approval and single-use tokens
  native_confirm.py               macOS "Allow Public" dialog
  verify.py         read-back verification after writes
  uploads.py        background resumable uploads
  staging.py        verified snapshots of approved files
  history.py        SQLite upload history and audit log
  youtube.py        YouTube API wrapper and input validation
  auth.py, authorize.py, config.py, errors.py, macos.py, quick_action.py
install.sh, install.py, uninstall.sh   installer (standard library only)
youtube_mcp_server.py   launcher for MCP clients (manual installation)
authorize.py            launcher for the sign-in command (manual installation)
upload_and_share.py     launcher for the Finder Quick Action (manual installation)
scripts/                tool reference generator, dependency hash lock, release builder

Licence

MIT. This project is not affiliated with or endorsed by Google or YouTube. YouTube is a trademark of Google LLC. Your use of the YouTube API is subject to the YouTube API Services Terms of Service.

Available Tools

26 tools
add_to_playlistAdd video to playlistA

Add a video to a playlist. Refuses duplicates (playlist_duplicate). Two-step approval.

Inputs: video_id (required), playlist_id (required), position, confirmation_token. Returns: object

cancel_publish_scheduleCancel publish scheduleA
DestructiveIdempotent

Remove a video's scheduled publish time; it stays private. Two-step approval.

Inputs: video_id (required), timezone, confirmation_token. Returns: object

create_playlistCreate playlistA

Create a playlist (PRIVATE by default). Two-step approval; a public playlist also needs confirm_public=true with the user's explicit approval.

Inputs: title (required), privacy, description, confirm_public, +1 more. Returns: object

download_captionsDownload captionsA
Read-onlyIdempotent

Read-only: return the text of one of the channel's caption tracks (captions.download, about 250 quota units including the ownership check). list_captions returns metadata only; this is the only way to read caption text.

Inputs: video_id (required), caption_id (required), format. Returns: object

get_channel_analyticsGet channel analyticsB
Read-onlyIdempotent

Channel views, watch time, average view duration, subscribers gained/lost, likes, comments, shares and traffic sources for a date range. Optional feature: needs analytics authorization (see README).

Inputs: preset, end_date, start_date, include_daily, +1 more. Returns: object

get_channel_infoGet channel infoA
Read-onlyIdempotent

Identify the YouTube channel this server is authorized for (name, ID, URL, counts).

Inputs: no named parameters. Returns: object

get_publish_scheduleGet publish scheduleC
Read-onlyIdempotent

Show whether a video has a scheduled publish time.

Inputs: video_id (required), timezone. Returns: object

get_top_videosGet top videosB
Read-onlyIdempotent

The channel's top videos for a date range, ranked by a metric (max 200). Optional feature.

Inputs: preset, sort_by, end_date, start_date, +1 more. Returns: object

get_upload_progressGet upload progressA
Read-onlyIdempotent

Progress and result of an upload started with upload_video (from the local history).

Inputs: upload_id (required). Returns: object

get_video_analyticsGet video analyticsA
Read-onlyIdempotent

Analytics for one video: views, watch time, average view duration, engagement, traffic sources and audience retention. Optional feature: needs analytics authorization.

Inputs: video_id (required), preset, end_date, start_date, +3 more. Returns: object

get_video_statusGet video statusB
Read-onlyIdempotent

Processing state (processing/ready/failed/rejected), actual visibility, schedule, title, description, tags, category, default language, thumbnails and other details of a video.

Inputs: video_id (required). Returns: object

list_captionsList captionsA
Read-onlyIdempotent

List a video's caption tracks (language, name, draft, status).

Inputs: video_id (required). Returns: object

list_categoriesList video categoriesA
Read-onlyIdempotent

List YouTube video categories for a region (default from YOUTUBE_MCP_REGION, 'US'). Use category IDs with assignable=true in upload_video and update_metadata. The default upload category is set by YOUTUBE_MCP_DEFAULT_CATEGORY (22, People & Blogs, if unset).

Inputs: hl, region_code, assignable_only. Returns: object

list_playlist_itemsList playlist itemsB
Read-onlyIdempotent

List the videos in a playlist, with their playlist_item_id.

Inputs: playlist_id (required), page_token, max_results. Returns: object

list_playlistsList playlistsB
Read-onlyIdempotent

List the channel's playlists (title, privacy, item count).

Inputs: page_token, max_results. Returns: object

list_uploadsList uploadsA
Read-onlyIdempotent

List videos. source='youtube' lists the channel's uploads from YouTube (newest first); source='local' lists this server's local upload history, including failed and in-progress uploads.

Inputs: source, page_token, max_results. Returns: object

remove_from_playlistRemove video from playlistA
DestructiveIdempotent

Remove an entry from a playlist (the video itself is NOT deleted). Pass video_id or a specific playlist_item_id. Two-step approval.

Inputs: playlist_id (required), video_id, playlist_item_id, confirmation_token. Returns: object

schedule_publishSchedule public publishingA
DestructiveIdempotent

Schedule a PRIVATE, never-published video to become PUBLIC at a given time. A time without an offset is read in timezone. Two-step approval AND confirm_public=true are always required. Unlisted/public videos are refused and never changed.

Inputs: video_id (required), publish_at (required), timezone, confirm_public, +1 more. Returns: object

set_thumbnailSet video thumbnailA
DestructiveIdempotent

Upload a custom thumbnail (JPEG/PNG, max 2 MB, 1280x720 recommended). Two-step: returns a preview and confirmation_token first; call again with the token after the user approves. Requires a verified channel.

Inputs: video_id (required), image_path (required), confirmation_token. Returns: object

set_visibilitySet video visibilityA
DestructiveIdempotent

Change a video's visibility to private, unlisted or public, then verify the actual result. Always two-step: returns a preview and confirmation_token; call again with the token after the user approves. PUBLIC also needs confirm_public=true, and the user must additionally click 'Allow Public' in a native macOS dialog on their Mac. Changing private to unlisted is treated the same way when the video is in one of the channel's PUBLIC playlists (anyone viewing the playlist could then watch it); the preview lists those playlists.

Inputs: video_id (required), visibility (required), confirm_public, confirmation_token. Returns: object

update_captionsUpdate captionsA
DestructiveIdempotent

Replace a caption track's file and/or change its draft status. YouTube's API cannot rename a track or change its language. Two-step approval.

Inputs: video_id (required), caption_id (required), is_draft, file_path, +2 more. Returns: object

update_metadataUpdate video metadataA
DestructiveIdempotent

Change selected metadata of an existing video. Only the fields you pass are changed; all other existing fields (including tags and description) are preserved. Pass tags=[] to clear tags. Two-step: returns a preview of the changes and a confirmation_token; call again with the token only after the user approves.

Inputs: video_id (required), tags, title, category_id, +3 more. Returns: object

update_playlistUpdate playlistA
DestructiveIdempotent

Change a playlist's title, description and/or privacy; other fields are preserved. Two-step approval; making it public also needs confirm_public=true and the native dialog. The preview lists unlisted videos in the playlist that would become visible to anyone viewing it.

Inputs: playlist_id (required), title, privacy, description, +2 more. Returns: object

upload_captionsUpload captionsA

Add a subtitle track to a video from a SubRip (.srt) or WebVTT (.vtt) file. Two-step: returns a preview and confirmation_token; call again with the token after the user approves. Refuses if a track with the same language and name already exists.

Inputs: video_id (required), file_path (required), name, is_draft, +3 more. Returns: object

upload_videoUpload video to YouTubeA

Upload a local video file to the user's YouTube channel (default visibility: unlisted). Two-step: the first call (without confirmation_token) returns a preview and token; show the preview to the user and call again with the token only after explicit approval. Uploads continue in the background; use get_upload_progress to follow them. Refuses to upload the same file twice unless allow_duplicate=true.

Inputs: title (required), file_path (required), tags, notify, +9 more. Returns: object

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 26 tools

    Disambiguation4/5

    Most tools have clearly distinct resource/action targets, especially across video, captions, playlists, scheduling, and analytics. There is some potential confusion between upload-progress/status/list-uploads tools and between scheduling/visibility tools, but the descriptions make the boundaries reasonably clear.

    Naming Consistency5/5

    Tool names consistently use snake_case with a predictable verb_noun pattern (e.g. upload_video, get_video_status, update_captions, remove_from_playlist). The few longer names like cancel_publish_schedule remain readable and fit the same convention.

    Tool Count2/5

    With 26 tools, the surface is just over the 'too many' threshold and feels heavy despite the broad YouTube-management scope. Optional analytics, granular approval flows, and separate progress/status/list tools add surface area that could likely be consolidated.

    Completeness3/5

    Core workflows are covered: upload, metadata, visibility, scheduling, captions, playlists, and analytics. However, notable lifecycle gaps remain, especially missing delete operations for videos, playlists, and caption tracks, plus no comment management.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers