youtube-kit
Provides tools for managing YouTube channels, including analytics (totals and breakdowns by day, video, country, device, etc.), video operations (upload, update metadata, set thumbnail, like/dislike, delete), comment moderation (list, reply, approve, hold, reject, ban), playlist management (create, update, add/remove/move items), channel info (about, activity, banners, watermarks, sections), search, and subscriptions.
youtube-kit
YouTube CLI (ytk) and MCP server, built for agents and humans. Let Claude Code, Codex, Cursor, Claude Desktop or ChatGPT work on your channel: analytics, transcripts, uploads, metadata, playlists and comment moderation. It handles several channels, and you can run the same commands in your own terminal.

Quick start
uv tool install youtube-kit
ytk auth login # one-time Google Cloud setup, then pick your channelYou need a Google account with a YouTube channel, and uv (brew install uv on macOS). The first ytk auth login takes about 5 minutes: it opens each Google Cloud page, says what to click and picks up the file you download.
ytk analytics --by video --since 90d --limit 5 # your top videos of the last 90 days
ytk comment list --status held # comments waiting for review
ytk caption transcript VIDEO | jq -r .text # what you say in one of your videos
ytk channel get @mkbhd | jq .stats # any public channel
Or ask your agent: "Which of my videos got the most views this month, and are any comments waiting for review?"
Related MCP server: yt-fetch
Use it from your agent
Skill: Claude Code, Codex, Cursor and other shell agents
A short skill teaches the agent the CLI. It loads only when a YouTube task comes up.
claude plugin install youtube-kit --marketplace eukosh/youtube-kit # Claude Code
codex plugin marketplace add eukosh/youtube-kit # Codex, then:
codex plugin add youtube-kit@youtube-kit
npx skills add eukosh/youtube-kit -g # Cursor and othersThe plugins follow ytk releases. Codex updates them at startup; Claude Code does once you turn on auto-update under /plugin → Marketplaces. With npx skills, run npx skills update.
MCP: Claude Desktop, ChatGPT and other MCP clients
ytk mcp serves the same operations as tools. In Claude Code:
claude mcp add youtube -- uvx youtube-kit mcpIn clients configured with JSON (Claude Desktop, Cursor and others):
{
"mcpServers": {
"youtube": { "command": "uvx", "args": ["youtube-kit", "mcp"] }
}
}In the ChatGPT desktop app: Settings → MCP servers → Add server → STDIO, with the command uvx youtube-kit mcp. Codex shares that setting (codex mcp add youtube -- uvx youtube-kit mcp).
The server uses your ytk auth login logins. If you also installed ytk with uv tool install, uvx runs that installed version: ytk upgrade updates both. Restart the MCP client afterwards. Not set up yet? The model can walk you through it with the setup_guide tool.
What it covers
Area | Operations |
Analytics | totals, or breakdowns by day, month, video, country, device, OS, traffic source and what's behind it (search terms, suggesting videos, sites), playback location, age, gender, subscribed status, content type (long-form, Shorts, live) or sharing service; audience retention of a video; filters by video, content type, country or traffic source |
Impressions | thumbnail impressions and click-through rate, in total, by day or by video |
Videos | get, categories, upload (resumable, with progress), update metadata, set thumbnail, wait for processing, like or dislike, check your rating, delete |
Captions | transcripts of your videos, from your captions or YouTube's automatic ones, optionally machine-translated; list tracks on any video; upload, replace, hide, delete |
Comments | list (published, held for review, likely spam), replies, post, reply, edit, delete, approve, hold, reject, ban the author |
Playlists | list, get, items, create, update, set image, add, remove, move, delete |
Channel | get, recent activity, your logged-in channels, about info (description, keywords, country, language, trailer), banner, watermark, home page sections |
Search | videos, channels and playlists, filtered by channel or date |
Subscriptions | list, subscribe, unsubscribe |
Not covered: localizations, live streaming and channel memberships. ytk --help lists every command, and the skill fits them on one page with jq recipes.
Channels and login
ytk auth login connects one channel. Run it again for each of your other channels, including brand channels: pick the one you want when Google asks.
ytk channel mine # your channels; one is the default
ytk auth switch @second # change the default
ytk video upload clip.mp4 --title Hi --my-channel @third # use another channel for one command
ytk auth logout @thirdCommands work on the default channel unless --my-channel names another, by UC… ID, @handle or exact title. MCP tools take my_channel the same way, so you can say "upload this to my gaming channel". YOUTUBE_CHANNEL sets the default for one shell or one MCP server.
Why your own Google Cloud client. YouTube's daily quota of 10,000 units belongs to a Cloud project. A client shipped inside ytk would split one quota among all its users. Yours is shared by your channels only.
Let an agent set it up. ytk auth guide (setup_guide over MCP) lists what's left, with links and the values to enter. With the gcloud CLI signed in, the agent can create the project and enable the APIs for you. The rest needs your browser. Already have the client JSON? Run ytk auth login --client-secrets FILE.

The guided setup does this:
In the Google Cloud Console, create a project and enable YouTube Data API v3, YouTube Analytics API and YouTube Reporting API (for impressions and click-through rate).
In Google Auth Platform, click Get started (audience External). On Branding, fill in the home page (
https://github.com/eukosh/youtube-kit), the privacy policy link (https://github.com/eukosh/youtube-kit/blob/main/PRIVACY.md) and the authorized domaingithub.com; Google won't publish without them. Then on Audience click Publish app. While the app is in Testing, only listed test users can sign in and Google logs them out after 7 days.Under Clients, create a client of type Desktop app and download its JSON.
ytk auth login --client-secrets path/to/client_secret.json. Google warns that it hasn't verified the app: it's your own, so click Advanced, then Go to ytk (unsafe).
Public data (search, videos, channels, playlists, comments) also works with just an API key: create one in the same project and export YOUTUBE_API_KEY=..., or put it in the MCP server's env. Without a key, ytk reads public data through your login.
ytk remembers each channel's handle from when you logged in. After renaming a channel on YouTube, name it by its UC… ID or run ytk auth login for it again.
Credentials and config.toml live in the user config directory (~/Library/Application Support/youtube-kit/ on macOS, ~/.config/youtube-kit/ on Linux). ytk auth status prints the exact paths. These environment variables override them:
Variable | Purpose |
| API key for public data |
| Path to the OAuth client JSON |
| Directory of stored logins, one file per channel |
| Channel to work on by default (UC… ID, @handle or exact title), overriding |
| Path to |
| Set (even empty): no daily check for a newer release |
Built for agents
JSON out, exit codes for failures. Every command prints one JSON document on stdout. On failure, stdout stays empty, the last line of stderr is
{"error": {"type": "not_found", "message": "..."}}, and the exit code names the type: 2 bad input, 3 not found, 4 not authorized, 5 quota exceeded, 6 forbidden, 7 network, 8 confirmation required, 9 protected, 10 timeout, 1 anything else. The skill tells agents what to do about each. At a terminal you get colored JSON and plain-sentence errors.Forgiving inputs. Pass IDs or pasted YouTube URLs,
@handlesfor channels, and dates or spans like90d.Quota costs up front. Each command's
--helpand each MCP tool description states what it spends.One core. The CLI and the MCP server are thin layers over the same code, and a test fails if either misses an operation.
Guarded deletes. See below.
Update notices.
ytkchecks PyPI once a day in the background and tells you when a newer release is out: after the output at a terminal, as an{"update": ...}stderr line for agents, and in the MCP server's instructions at startup.ytk upgradeinstalls it. Turn the check off withcheck = falseunder[updates]inconfig.tomlorYTK_NO_UPDATE_CHECK=1; it's also off whenCIorNO_UPDATE_NOTIFIERis set.
Deleting
YouTube has no trash, and agents make mistakes. So deleting videos, playlists, comments and caption tracks is guarded:
Two steps. The first call deletes nothing. At a terminal you get a
[y/N]prompt. An agent gets exit 8 with a description of the target and must run the command again with--confirm <id>, so the approval always names the exact thing being deleted.Damage limit. A video with more than 100 views, or one that is public and was uploaded more than 7 days ago, can't be deleted here at all (exit 9). Delete those in YouTube Studio. The limits live in
config.toml(ytk auth statusshows where):[delete_protection] max_views = 100 max_public_age_days = 7Harness approval. Have your agent ask you before every delete. In Claude Code, add this to
.claude/settings.json:{"permissions": {"ask": ["Bash(ytk video delete:*)", "Bash(ytk playlist delete:*)", "Bash(ytk comment delete:*)", "Bash(ytk caption delete:*)"]}}Idempotent. Deleting something that is already gone succeeds with
"already_gone": true.
This stops mistakes, not a determined agent. Anything holding your OAuth token can call the API directly.
Quota
Google gives each Cloud project 10,000 units a day, resetting at midnight Pacific time. Reads cost 1 unit per request, most writes 50, and guarded deletes 52, or 102 for a caption track (they look up the target and check ownership first). search and uploads don't use those units: each gets its own 100 calls a day, one per page of 50 search results or per upload. ytk analytics and ytk impressions use the separate YouTube Analytics and Reporting API quotas.
Contributing
See CONTRIBUTING.md for the development setup and CHANGELOG.md for what changed. Report security issues privately, as SECURITY.md describes.
License
MIT. youtube-kit is not affiliated with or endorsed by Google or YouTube. YouTube is a trademark of Google LLC.
Available Tools
51 toolsadd_sectionAdd SectionA
Add a section to your channel's home page. A channel has at most 10.
Quota: 52 units.
Inputs: kind (required), title, channels, position, +2 more. Returns: id, type, title, position, +2 more
add_video_to_playlistAdd Video To PlaylistA
Add a video to a playlist on the authorized user's channel.
Quota: 50 units.
Inputs: video (required), playlist (required), position, my_channel. Returns: position, video_id, playlist_id, playlist_item_id
approve_commentsApprove CommentsADestructiveIdempotent
Publish comments on your videos that are held for review or marked as likely spam.
Quota: 50 units.
Inputs: comments (required), my_channel. Returns: status, comment_ids, authors_banned
create_playlistCreate PlaylistA
Create a playlist on the authorized user's channel.
Left out, the language is copied from your most recent public upload, as video uploads do.
Quota: 57 units.
Inputs: title (required), privacy, language, my_channel, +1 more. Returns: id, url, title, privacy, +5 more
delete_captionDelete CaptionADestructiveIdempotent
Permanently delete a caption track from one of your videos.
Without confirm, nothing is deleted and the error describes the track.
Quota: 102 units.
Inputs: video (required), language (required), name, confirm, +1 more. Returns: id, kind, already_gone
delete_commentDelete CommentADestructiveIdempotent
Permanently delete one of your own comments or replies. Deleting a top-level comment deletes its replies.
Others' comments on your videos can't be deleted, only rejected, which hides them. Without confirm, nothing is deleted and the error describes the comment.
Quota: 52 units.
Inputs: comment (required), confirm, my_channel. Returns: id, kind, already_gone
delete_playlistDelete PlaylistADestructiveIdempotent
Permanently delete one of your playlists. The videos in it are not affected.
Without confirm, nothing is deleted and the error describes the playlist.
Quota: 52 units.
Inputs: playlist (required), confirm, my_channel. Returns: id, kind, already_gone
delete_sectionDelete SectionADestructiveIdempotent
Delete a section from your channel's home page. Its playlists and videos are not affected.
Quota: 50 units.
Inputs: section (required), my_channel. Returns: id, kind, already_gone
delete_videoDelete VideoADestructiveIdempotent
Permanently delete one of your videos.
Only recent, little-watched videos can be deleted here: by default at most 100 views and, if public, uploaded within the last 7 days (the limits are set in the toolkit's config file). Anything else must be deleted in YouTube Studio. Without confirm, nothing is deleted and the error describes the video.
Quota: 52 units.
Inputs: video (required), confirm, my_channel. Returns: id, kind, already_gone
edit_commentEdit CommentBDestructiveIdempotent
Replace the text of one of your own comments or replies.
Quota: 50 units.
Inputs: text (required), comment (required), my_channel. Returns: id, text, likes, author, +7 more
get_analyticsGet AnalyticsARead-onlyIdempotent
YouTube Analytics for your channel: totals, or rows broken down by one dimension.
Data for the last two or three days is incomplete, so recent rows keep growing. Uses the separate YouTube Analytics API and its quota; enable it in the same Google Cloud project.
Quota: no YouTube Data API units.
Inputs: by, sort, limit, since, +7 more. Returns: rows, since, until, columns
get_channelGet ChannelARead-onlyIdempotent
Channel metadata, statistics, and uploads playlist ID.
Quota: 1 unit.
Inputs: channel, my_channel. Returns: id, url, stats, title, +5 more
get_impressionsGet ImpressionsAIdempotent
Thumbnail impressions and click-through rate for your channel, which YouTube Analytics doesn't offer.
They come from YouTube's daily bulk reports. The first call asks YouTube to start making them: the first ones arrive within two days and cover the 30 days before. YouTube keeps daily reports for 60 days, those first 30 days for 30. ctr is clicks per impression: 0.05 is 5%. Uses the YouTube Reporting API; enable it in the same Google Cloud project.
Quota: no YouTube Data API units.
Inputs: by, limit, since, until, +2 more. Returns: note, rows, since, until, +2 more
get_my_ratingsGet My RatingsBRead-onlyIdempotent
Whether the authorized user liked or disliked each video.
Quota: 1 unit.
Inputs: videos (required), my_channel. Returns: result
get_playlistsGet PlaylistsBRead-onlyIdempotent
Metadata of one or more playlists: title, description, privacy, and item count.
Quota: 1 unit.
Inputs: playlists (required), my_channel. Returns: result
get_processing_statusGet Processing StatusBRead-onlyIdempotent
Whether YouTube has finished processing one of your uploads.
Quota: 1 unit.
Inputs: video (required), wait, timeout, my_channel. Returns: status, video_id, parts_total, time_left_ms, +2 more
get_transcriptGet TranscriptARead-onlyIdempotent
What is said in one of your videos, from its captions, including the ones YouTube generates.
YouTube lets only a video's owner download its captions. Of several tracks in a language, one YouTube is serving is preferred over one it failed to process, then a published one you wrote over YouTube's.
Quota: 252 units.
Inputs: video (required), format, language, my_channel, +1 more. Returns: kind, text, format, language, +3 more
get_videosGet VideosARead-onlyIdempotent
Full metadata, statistics, and status for one or more videos.
Videos that don't exist or aren't visible to you are left out of the result; if none are found, that's a not-found error.
Quota: 1 unit.
Inputs: videos (required), my_channel. Returns: result
hold_commentsHold CommentsADestructiveIdempotent
Hide comments on your videos until you review them.
Quota: 50 units.
Inputs: comments (required), my_channel. Returns: status, comment_ids, authors_banned
list_activitiesList ActivitiesBRead-onlyIdempotent
A channel's recent activity feed (uploads, playlist additions, and the like).
Quota: 1 unit per page of up to 50 results.
Inputs: limit, since, channel, my_channel, +1 more. Returns: items, total_results, next_page_token
list_captionsList CaptionsARead-onlyIdempotent
A video's caption tracks: language, name, and whether YouTube generated them from the audio.
Works on any public video, though only the owner can download a transcript.
Quota: 50 units.
Inputs: video (required), my_channel. Returns: result
list_commentsList CommentsARead-onlyIdempotent
Top-level comments on a video, or on all of your channel's videos.
Quota: 1 unit per page of up to 50 results.
Inputs: limit, order, video, search, +3 more. Returns: items, total_results, next_page_token
list_my_channelsList My ChannelsARead-onlyIdempotent
Channels the user is logged in to, and which one is the default.
Operations on the user's own channel work on the default unless told to use another. Reads stored logins only; makes no API calls.
Quota: no YouTube Data API units.
Inputs: no named parameters. Returns: result
list_playlist_itemsList Playlist ItemsARead-onlyIdempotent
Videos in a playlist, in playlist order.
To list everything a channel has uploaded, pass the channel's uploads_playlist_id.
Quota: 1 unit per page of up to 50 results.
Inputs: playlist (required), limit, my_channel, page_token. Returns: items, total_results, next_page_token
list_playlistsList PlaylistsCRead-onlyIdempotent
A channel's playlists.
Quota: 1 unit per page of up to 50 results.
Inputs: limit, channel, my_channel, page_token. Returns: items, total_results, next_page_token
list_repliesList RepliesCRead-onlyIdempotent
Replies to a top-level comment.
Quota: 1 unit per page of up to 50 results.
Inputs: comment (required), limit, my_channel, page_token. Returns: items, total_results, next_page_token
list_sectionsList SectionsBRead-onlyIdempotent
The sections on a channel's home page.
Quota: 1 unit.
Inputs: channel, my_channel. Returns: result
list_subscriptionsList SubscriptionsARead-onlyIdempotent
Channels the authorized user is subscribed to.
Quota: 1 unit per page of up to 50 results.
Inputs: limit, order, my_channel, page_token. Returns: items, total_results, next_page_token
list_video_categoriesList Video CategoriesARead-onlyIdempotent
Video categories that can be assigned to uploads in a region, with the IDs to pass as category_id.
Quota: 1 unit.
Inputs: region, my_channel. Returns: result
move_in_playlistMove In PlaylistADestructiveIdempotent
Move a video to another position in one of your playlists.
Quota: 51 units.
Inputs: video (required), playlist (required), position (required), my_channel. Returns: position, video_id, playlist_id, playlist_item_id
post_commentPost CommentB
Post a top-level comment on a video as the authorized user.
Quota: 50 units.
Inputs: text (required), video (required), my_channel. Returns: id, text, likes, author, +7 more
rate_videoRate VideoAIdempotent
Like or dislike a video as the authorized user, or clear the rating with none.
Quota: 50 units.
Inputs: video (required), rating (required), my_channel. Returns: rating, video_id
reject_commentsReject CommentsADestructiveIdempotent
Reject comments on your videos, hiding them from viewers. They can still be approved later.
Quota: 50 units.
Inputs: comments (required), ban_author, my_channel. Returns: status, comment_ids, authors_banned
remove_from_playlistRemove From PlaylistADestructiveIdempotent
Remove a video from one of your playlists, every time it appears. The video itself is not affected.
YouTube can't look up entries of a deleted video, so for a deleted or unknown video the whole playlist is read: 1 more unit per 50 entries.
Quota: 51 units.
Inputs: video (required), playlist (required), my_channel. Returns: removed, video_id, playlist_id
remove_watermarkRemove WatermarkADestructiveIdempotent
Remove the watermark from your videos. Succeeds when there is none.
Quota: 51 units.
Inputs: my_channel. Returns: active, corner, from_end, channel_id, +2 more
reply_to_commentReply To CommentB
Reply to a top-level comment as the authorized user.
Quota: 50 units.
Inputs: text (required), comment (required), my_channel. Returns: id, text, likes, author, +7 more
searchSearchARead-onlyIdempotent
Search YouTube for videos, channels, or playlists.
Quota: 1 of the project's 100 daily search calls per page of up to 50 results.
Inputs: query (required), kind, limit, order, +4 more. Returns: items, total_results, next_page_token
set_channel_bannerSet Channel BannerADestructiveIdempotent
Upload and set your channel's banner. Use a 16:9 image of at least 2048x1152, at most 6 MB.
Quota: 101 units.
Inputs: image (required), my_channel. Returns: title, country, keywords, language, +4 more
set_playlist_thumbnailSet Playlist ThumbnailADestructiveIdempotent
Set the custom thumbnail of one of your playlists, replacing any current one.
Quota: 101 units.
Inputs: image (required), playlist (required), my_channel. Returns: width, height, image_id, playlist_id
set_thumbnailSet ThumbnailADestructiveIdempotent
Set a video's custom thumbnail. The channel must be verified.
Quota: 50 units.
Inputs: image (required), video (required), my_channel. Returns: video_id, thumbnail_url
setup_guideSetup GuideARead-onlyIdempotent
What is left before the user's channel can be used: a one-time Google Cloud setup, then a Google sign-in.
The steps happen in the user's browser, so walk them through one step at a time. Once ready, running the sign-in again connects another channel.
Quota: no YouTube Data API units.
Inputs: project. Returns: ready, steps, channels
set_watermarkSet WatermarkADestructiveIdempotent
Set the watermark shown over all your videos, replacing any current one. Viewers click it to subscribe.
Quota: 51 units.
Inputs: image (required), start, corner, duration, +2 more. Returns: active, corner, from_end, channel_id, +2 more
subscribeSubscribeAIdempotent
Subscribe the authorized user to a channel. Already being subscribed is fine.
Quota: 51 units.
Inputs: channel (required), my_channel. Returns: id, url, title, channel_id, +2 more
unsubscribeUnsubscribeADestructiveIdempotent
Unsubscribe the authorized user from a channel. Not being subscribed is fine.
Quota: 51 units.
Inputs: channel (required), my_channel. Returns: channel_id, was_subscribed
update_captionUpdate CaptionADestructiveIdempotent
Replace the file of a caption track on one of your videos, or show or hide the track.
Quota: 502 units.
Inputs: video (required), language (required), file, name, +2 more. Returns: id, kind, name, draft, +4 more
update_channelUpdate ChannelADestructiveIdempotent
Change your channel's about info. Only the fields you pass change. The name can only be changed in Studio.
Quota: 51 units.
Inputs: country, trailer, keywords, language, +2 more. Returns: title, country, keywords, language, +4 more
update_playlistUpdate PlaylistBDestructiveIdempotent
Change one of your playlists. Only the fields you pass change.
Quota: 51 units.
Inputs: playlist (required), title, privacy, language, +2 more. Returns: id, url, title, privacy, +5 more
update_sectionUpdate SectionADestructiveIdempotent
Change a section on your channel's home page. Only the fields you pass change.
Quota: 51 units.
Inputs: section (required), title, channels, position, +2 more. Returns: id, type, title, position, +2 more
update_videoUpdate VideoADestructiveIdempotent
Change a video's metadata. Only the fields you pass change; the rest keep their values.
Quota: 51 units.
Inputs: video (required), tags, title, privacy, +9 more. Returns: id, url, tags, stats, +18 more
upload_captionUpload CaptionB
Add a caption track to one of your videos from a caption file, such as SRT or VTT.
Quota: 400 units.
Inputs: file (required), video (required), language (required), name, +2 more. Returns: id, kind, name, draft, +4 more
upload_videoUpload VideoA
Upload a video file from disk (resumable, reports progress).
Category and languages left out are copied from your most recent public upload (among your last 150), so the video matches the rest of your channel; with none, the category is 22 (People & Blogs). YouTube keeps processing the video after this returns, and its duration and statistics appear only once that ends. Checking whether processing has finished tells you when, or why it failed.
Quota: 1 of the project's 100 daily upload calls, plus up to 7 units.
Inputs: file (required), title (required), tags, privacy, +9 more. Returns: id, url, tags, stats, +18 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 51 tools
Tool purposes are largely distinct, and descriptions clarify tricky pairs such as list_playlists vs get_playlists, comment moderation vs deletion, and analytics vs impressions. With 51 tools, some near-neighbors remain that an agent could misselect, but there are no true duplicates.
Almost all names use a snake_case verb_noun pattern like get_videos, create_playlist, and delete_comment. A few are verb-only or noun phrases such as search, subscribe, and setup_guide, which are minor deviations rather than a mixed convention.
51 tools is far beyond a well-scoped MCP surface, even for YouTube's broad domain. Most tools are individually justified, but the overall count will heavily burden tool selection and context.
The surface covers CRUD for videos, playlists, comments, captions, channel sections, subscriptions, ratings, uploads, analytics, and impressions. There are no obvious lifecycle dead ends for the stated YouTube management purpose.
Maintenance
Related MCP Connectors
Search videos; read channels, playlists, comments and popular videos in YouTube.
YouTube MCP — wraps the YouTube Data API v3 (BYO API key)
Real-time YouTube transcripts, comments, channels & video search MCP. Local npx or hosted OAuth.
YouTube discovery, transcripts, library search, and monitors with API keys or OAuth.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceA fully functional MCP server and CLI for YouTube to automate YouTube operation.723Apache 2.0
- FlicenseNot gradedqualityDmaintenanceAn MCP server that enables interaction with the YouTube Data API, allowing users to search videos, get video and channel details, analyze trends, and fetch video transcripts.-
- FlicenseNot gradedqualityDmaintenanceProvides YouTube video search, comment analysis, AI-powered text tools, and content generation via MCP protocol and REST API.26 npm7-
- FlicenseBqualityDmaintenanceMCP server for YouTube Data API v3 enabling video search, channel lookup, trending content, comments, and playlist management.11-