YouTube Studio MCP
Provides read-only access to YouTube channel analytics and content through the official YouTube APIs, including performance metrics, audience breakdowns, videos/playlists, traffic sources, retention, comments, revenue, impressions/CTR, and raw YouTube Analytics queries.
Exposes YouTube Studio data to AI assistants for channel performance summaries, trends, audience insights, content analysis, media-kit snapshots, and optional chart generation.
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 MCP show my channel's performance this month vs last month and chart it"
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
Give your AI assistant your YouTube Studio data. A local Model Context Protocol server for creators: your agent (Claude, ChatGPT desktop, Cursor, VS Code, …) can read your channel analytics, dig into your audience and content, build media-kit data, and render ready-to-use charts, straight from the official YouTube APIs.
"How did my channel do this month compared to last month, and why?" "Which Shorts brought me the most subscribers this quarter?" "What are people searching for when they find my videos?" "Where do viewers drop off in my latest video?" "Update my media kit with the last 28 days and make the charts."
It runs on your computer and signs in with your own Google OAuth client. Your data goes from Google to your machine to your AI app, and nowhere else. It's read-only unless you opt in.
What it can do
Area | Tools |
Overview |
|
Trends |
|
Content |
|
Audience |
|
Discovery |
|
Retention |
|
Comments |
|
Money |
|
Impressions & CTR (beta) |
|
Media kit |
|
Charts |
|
Anything else |
|
Editing (opt-in) |
|
Plus four prompt templates (channel_checkup, media_kit_refresh, video_deep_dive,
comment_digest). The full parameter reference is in docs/tools.md.
Related MCP server: youtube-organic-mcp
Quick start
You need uv (a Python installer;
brew install uv on macOS, or see the link) and about 10 minutes for the one-time Google setup.
1. Install and sign in
# Install the command (from GitHub; see "PyPI" below)
uv tool install git+https://github.com/nelsonrogers/youtube-studio-mcp
# Create a free Google OAuth client first: docs/google-cloud-setup.md (one time, ~10 min)
# Then sign in with the account that owns the channel:
youtube-studio-mcp auth --client-secret ~/Downloads/client_secret_XXXX.jsonFollow docs/google-cloud-setup.md for the OAuth client. Importantly, it shows how to publish the app so you don't have to sign in again every 7 days.
auth also switches on YouTube's impressions reports, so impressions & CTR are available ~2 days later.
2. Connect your AI app
Find the full path of the command with which youtube-studio-mcp (macOS/Linux) or
where youtube-studio-mcp (Windows). It's usually ~/.local/bin/youtube-studio-mcp. Desktop apps
often don't see your shell's PATH, so use the full path.
Settings → Developer → Edit Config, then add:
{
"mcpServers": {
"youtube-studio": {
"command": "/Users/YOU/.local/bin/youtube-studio-mcp"
}
}
}Restart Claude Desktop. The tools appear under the 🔧 menu.
claude mcp add youtube-studio -- youtube-studio-mcpIn the current ChatGPT desktop app (macOS/Windows): Settings → MCP servers → Add server, choose
STDIO, name it youtube-studio, set the command to the full path above, save and Restart.
The app stores this in ~/.codex/config.toml (shared with the Codex CLI), so you can also add:
[mcp_servers.youtube-studio]
command = "/Users/YOU/.local/bin/youtube-studio-mcp"Local servers run on the desktop app's agent (Codex) side. ChatGPT on the web and older versions of
the desktop app only reach remote servers. If the tools don't show up in your chat, try a Codex
or agent task, or fall back to youtube-studio-mcp media-kit --out media-kit-data.json and attach
the file.
Use the same mcpServers entry as Claude Desktop (e.g. in ~/.cursor/mcp.json).
.vscode/mcp.json:
{ "servers": { "youtube-studio": { "type": "stdio", "command": "youtube-studio-mcp" } } }{
"mcpServers": {
"youtube-studio": {
"command": "uvx",
"args": ["--from", "git+https://github.com/nelsonrogers/youtube-studio-mcp", "youtube-studio-mcp"]
}
}
}Append @vX.Y.Z to the git URL to pin a release.
3. Check it works
youtube-studio-mcp check # calls every read-only tool against your channelThen ask your assistant something like "Give me a check-up of my channel for the last 28 days."
Media kits
Media kits (sponsor decks) need the same numbers every month. get_media_kit_data returns them in
one stable JSON snapshot: channel stats, period performance vs the previous period, Shorts vs
long-form, the impressions funnel, daily and monthly trends, audience (age, gender, countries,
devices), recent uploads with thumbnails, top videos and traffic sources. Each part degrades
gracefully when YouTube can't provide it.
Field reference and stability promise: docs/media-kit-data.md
Sample output (fictional channel): docs/examples/media-kit-data.sample.json
No AI client needed:
youtube-studio-mcp media-kit --out media-kit-data.jsonCharts: ask the agent to run
create_charton the snapshot, or use themedia_kit_refreshprompt.
Configuration
All settings are environment variables, so you can set them in your MCP client's env block.
Variable | Default | Purpose |
|
| Which signed-in channel to use (see multiple channels) |
| off |
|
|
| Where charts and exports go when given a bare filename |
|
| OAuth client and tokens |
|
| Use an OAuth client file elsewhere |
| Provide the OAuth client inline instead of a file | |
|
| How many recent days to leave out of rolling periods because their data is incomplete (0-7) |
|
| Logging (always to stderr) |
CLI
youtube-studio-mcp [serve] run the MCP server over stdio (what MCP clients launch)
youtube-studio-mcp auth sign in (--client-secret PATH, --write, --no-revenue, --no-browser)
youtube-studio-mcp status show sign-in state and configuration
youtube-studio-mcp check call every read-only tool against your channel
youtube-studio-mcp media-kit write the media-kit JSON (--out, --period, --start-date, --end-date)
youtube-studio-mcp logout revoke access and delete the local tokenMultiple channels
youtube-studio-mcp auth --profile gamingThen add a second server entry with "env": {"YOUTUBE_STUDIO_MCP_PROFILE": "gaming"}.
Editing tools (opt-in)
Off by default. To let your agent edit titles/descriptions/tags/visibility, reply to comments and moderate them:
youtube-studio-mcp auth --write…and set "env": {"YOUTUBE_STUDIO_MCP_ENABLE_WRITE": "1"}. update_video_details defaults to a
dry run that shows a before/after diff. Agents are told to confirm with you before saving or posting.
Good to know
Freshness: YouTube Analytics data lags 48-72 hours, and dates are US Pacific time. Rolling periods end at the latest complete day, and every result states its exact date range. There is no API for Studio's realtime/48-hour card.
Subscriber counts: the public count is rounded by YouTube (48,409 → 48,400), even for the owner. Analytics-based totals (
totalSubscribers,subscribers_from_analytics) are exact but a few days old.Demographics are shares of logged-in viewers and are withheld for low-traffic periods.
Shorts vs long-form: analytics tools use YouTube's own
creatorContentTypeclassification;list_videoscan only guess from duration (Shorts can be up to 3 minutes).Impressions & CTR aren't in the Analytics API. They come from the YouTube Reporting API (daily files, ~2-day delay, history starts 30 days before reports were enabled).
Quota: listing uses ~1 unit per 50 videos out of a default 10,000/day; no
search.listcalls.Owner only: the APIs return analytics only for channels the signed-in account owns (Studio "manager" access isn't enough).
Privacy & security
Runs locally over stdio. There's no server, telemetry or third-party service.
Tokens are stored in your config folder with owner-only permissions (
0600).Read-only Google scopes by default; write access is a separate opt-in.
Sign-in uses the OAuth loopback flow with PKCE and state checks. Nothing is printed to the JSON-RPC stream.
See SECURITY.md to report a vulnerability.
Development
git clone https://github.com/nelsonrogers/youtube-studio-mcp && cd youtube-studio-mcp
uv sync
uv run pytest # tests run against a rule-checking fake YouTube API
uv run ruff check . && uv run ruff format --check . && uv run mypy
npx @modelcontextprotocol/inspector uv run youtube-studio-mcp # optional: try tools in the MCP InspectorArchitecture in one minute:
cli.py ──► server.py (MCPServer + instructions) ──► tools/*.py (one module per area)
│
context.py (shared state, arg types, error → ToolError, output paths)
analytics.py (report runner, daily → week/month aggregation, labels)
youtube.py (thread-safe Google API client, error translation, Data API helpers)
auth.py (OAuth loopback flow, token store) charts.py (matplotlib renderer)See CONTRIBUTING.md for guidelines.
PyPI
The name youtube-studio-mcp is already taken on PyPI by an unrelated project, so this package is
installed from GitHub for now. Don't run pip install youtube-studio-mcp / uvx youtube-studio-mcp
expecting this project.
Roadmap
Publish to PyPI and the MCP Registry under a free name
Optional Streamable-HTTP transport for remote setups (ChatGPT web, hosted agents)
Local history snapshots for trends beyond the API's retention
Playlist analytics and live-stream concurrency reports as dedicated tools
License
MIT. Not affiliated with, endorsed or sponsored by YouTube or Google. "YouTube" is a trademark of Google LLC.
Available Tools
19 toolsauthenticateSign in to YouTubeA
Start Google sign-in in the user's browser and return the sign-in URL immediately.
The user must approve access in the browser (choosing the account or Brand Account that
owns the channel). Afterwards call get_auth_status to confirm. Only works when the MCP
server runs on the user's own computer. Signing in again replaces the stored token.
Inputs: include_revenue. Returns: object
create_chartCreate chartAIdempotent
Render a polished, media-kit-ready chart (PNG, SVG or PDF) from data you provide — typically numbers from the analytics tools. Uses a colour-blind-safe palette by default, thin marks, clean axes and direct value labels. Returns the saved file path(s) and a preview image.
Inputs: title (required), labels (required), series (required), chart_type (required), +19 more.
enable_impressions_reportsEnable impressions reportsAIdempotent
One-time setup for thumbnail impressions & click-through rate (CTR), which the Analytics API does not provide. Creates a YouTube Reporting API job for the channel (safe to call again). YouTube then publishes daily reports: the first ones ~48 hours later, plus 30 days of history. Use get_impressions afterwards.
Inputs: no named parameters. Returns: object
get_audience_breakdownAudience breakdownARead-onlyIdempotent
Who watches and how: demographics, geography, devices, subscriber vs non-subscriber views, Shorts vs long-form split, playback locations. Rows include readable labels and share_pct of views, ready for media-kit charts.
Inputs: dimension (required), limit, period, save_to, +3 more. Returns: object
get_audience_retentionAudience retentionARead-onlyIdempotent
The audience-retention curve for one video, with timestamps, key retention milestones and the steepest drop-off moments. Defaults to the video's lifetime.
audience_watch_ratio = share of viewers still watching at that moment (can exceed 1 when people rewatch a part). relative_retention compares with similar-length YouTube videos (0-1; above 0.5 is better than average).
Inputs: video_id (required), period, points, end_date, +3 more. Returns: object
get_auth_statusAuth statusARead-onlyIdempotent
Check whether the server is signed in to YouTube, which channel it reads, and which permissions were granted. Call this first if any other tool reports a sign-in problem.
Inputs: no named parameters. Returns: object
get_channelChannel overviewARead-onlyIdempotent
The signed-in channel's profile and lifetime public stats: subscribers, total views, video count, creation date, country, handle, description, keywords and topics.
Inputs: no named parameters. Returns: object
get_impressionsImpressions & CTR (beta)ARead-onlyIdempotent
Thumbnail impressions and impressions click-through rate (CTR) from the YouTube Reporting API, by day, by video, or in total. Requires enable_impressions_reports to have been run at least ~2 days earlier; only days YouTube has published are included.
Inputs: limit, period, end_date, group_by, +1 more. Returns: object
get_media_kit_dataMedia kit dataARead-onlyIdempotent
Everything a creator media kit / sponsor deck needs, as one stable JSON snapshot
(schema_version 1, snake_case, *_pct 0-100, *_s seconds): channel profile, period
performance vs previous period, Shorts vs long-form performance, impressions funnel,
daily and monthly trends, audience age/gender/countries/devices, recent uploads with
thumbnails, top videos and traffic sources. Anything YouTube can't provide is null and
explained in unavailable instead of failing the call.
Inputs: period, save_to, end_date, start_date, +5 more. Returns: object
get_metrics_over_timeMetrics over timeARead-onlyIdempotent
A time series of metrics by day, week, month or year — for trend analysis and growth charts. Adds netSubscribers when gained and lost are both requested. Buckets cut off by the date range are flagged partial=true.
Inputs: period, metrics, save_to, end_date, +5 more. Returns: object
get_performance_summaryPerformance summaryARead-onlyIdempotent
Headline numbers for a period, like Studio's Overview tab: views, engaged views, watch time (hours), average view duration/percentage, subscribers gained/lost/net, likes, comments, shares, engagement rate, optionally revenue, each with the previous period and % change. Works for the channel or a single video.
Inputs: period, end_date, video_id, start_date, +2 more. Returns: object
get_revenueRevenue reportBRead-onlyIdempotent
Monetization report (YouTube Partner Program channels): estimated revenue, ad revenue, gross revenue, RPM, CPM, playback-based CPM, monetized playbacks and ad impressions, with a trend and the top-earning videos.
Inputs: period, currency, end_date, start_date, +2 more. Returns: object
get_top_videosTop videosARead-onlyIdempotent
Rank the channel's videos by performance within a period (like Studio's 'Top content'), with title, publish date, YouTube's content type (Shorts/Videos/Live), views, watch time, average view duration/percentage, likes, comments, shares, subscribers gained and engagement rate.
Inputs: limit, metric, period, save_to, +3 more. Returns: object
get_traffic_sourcesTraffic sourcesARead-onlyIdempotent
How viewers find the content: views and watch time by traffic source (search, suggested, browse, Shorts feed, external, ...) or, with source_type, the top search terms / referring videos / websites for that source.
Inputs: limit, period, end_date, video_id, +2 more. Returns: object
get_videos_detailsVideo detailsBRead-onlyIdempotent
Full metadata and lifetime public stats for specific videos: title, description, tags, category, privacy, duration, captions, live-stream details, views, likes, comments.
Inputs: video_ids (required). Returns: object
list_commentsList commentsARead-onlyIdempotent
Read comment threads (top-level comments with reply counts) for the channel or one video, e.g. to summarise audience sentiment, find questions, or spot content ideas.
Inputs: limit, order, save_to, video_id, +3 more. Returns: object
list_playlistsList playlistsARead-onlyIdempotent
The channel's playlists with item counts and privacy. Use list_videos(playlist_id=...) to see a playlist's videos.
Inputs: limit. Returns: object
list_videosList videosARead-onlyIdempotent
List the channel's uploads (including private/unlisted/scheduled, newest first) with public lifetime stats: views, likes, comments, engagement rate, duration, format guess. Costs ~1 quota unit per 50 videos. For period-specific performance use get_top_videos.
Inputs: limit, save_to, sort_by, playlist_id, +4 more. Returns: object
query_analyticsCustom analytics queryARead-onlyIdempotent
Run any YouTube Analytics API v2 report for the channel (ids=channel==MINE) — the escape hatch when no other tool fits. See https://developers.google.com/youtube/analytics/channel_reports for valid combinations. Notes: the 'video' dimension needs sort and max_results <= 200; 'insightTrafficSourceDetail' needs a filter on insightTrafficSourceType, sort and max_results <= 25; demographics (ageGroup/gender) only support viewerPercentage; the 'month' dimension aligns dates to whole months automatically. YouTube's error message is returned if a combination is invalid.
Inputs: metrics (required), sort, period, filters, +6 more. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 19 tools
Most tools have sharply distinct targets: auth status vs. authenticate, list_videos vs. get_videos_details vs. get_top_videos, and each analytics tool covers a different report (summary, time series, audience, traffic, retention, revenue). The overlap risk is concentrated in get_media_kit_data (a composite of nearly everything else) and query_analytics (escape hatch that can reproduce other tools' output), plus get_impressions vs. enable_impressions_reports, though the descriptions do state when to use each.
Nearly all tools follow snake_case verb_noun (get_channel, list_videos, get_audience_breakdown, get_traffic_sources). Minor deviations exist: bare 'authenticate', the different verb style in 'query_analytics', and the awkward plural in 'get_videos_details' versus the singular 'get_channel'/'get_video' pattern. The enable_/get_ pair for impressions is a sensible sub-convention.
At 19 tools the surface leans heavy for a single-platform server, but each tool maps to a real YouTube Studio/analytics view rather than duplicating another. Composite tools (get_media_kit_data, query_analytics) arguably consolidate several others, yet they serve distinct aggregation/escape-hatch use cases.
Analytics and reporting coverage is excellent: performance, trends, top content, audience, traffic, retention, revenue, impressions/CTR and a raw-query fallback, plus chart rendering. Gaps are on the write side — comments can be read but not replied to or moderated, and there is no video/playlist metadata editing or upload, though those are arguably outside a 'Studio reporting' scope.
Maintenance
Related MCP Connectors
Your YouTube channels’ private analytics for AI assistants: revenue, views, retention. Read-only.
YouTube for AI agents: transcripts, comments, video stats, channel monitor, Shorts captions.
YouTube research for AI assistants: channel and video stats, transcripts and comments, outlier videos that beat their channel's average, viral title formats, keyword ideas, similar thumbnails and channels, YouTube rankings and competitor tracking.
Read-only Google Search Console and Google Analytics for AI agents.
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.30 npm1-
- AlicenseAqualityCmaintenanceEnables AI assistants to access YouTube organic analytics, including channel stats, video performance, watch time, and audience engagement, via the YouTube Data API v3 and Analytics API v2.630 npmMIT
- AlicenseAqualityBmaintenanceEnables an AI assistant to query the full YouTube Analytics, Data v3, and Reporting API surface for one or multiple channels you own, with unrestricted parameters, local OAuth handling, and large-result output to files.1325 npmMIT
- AlicenseAqualityCmaintenanceEnables AI assistants to retrieve YouTube channel overviews, Studio analytics, video performance, traffic source breakdowns, and comments for sentiment analysis using natural language prompts.82MIT