yt-analytics-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| YT_ANALYTICS_CREDENTIALS_PATH | No | Path to the OAuth credentials file. Defaults to ~/.config/gws/youtube_credentials.json |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| yt_channel_infoA | Show which YouTube channel this server's OAuth credential owns, with its public subscriber, view, and video counts. This is the entry point: every other tool reports on this channel and only this channel, so start here to confirm you are looking at the right account. Costs 1 YouTube Data API quota unit and needs the youtube.readonly scope; with only the analytics scope it reports the scopes it has instead. |
| yt_channel_overviewA | Owner-side channel totals for a date range: views, watch time, average view duration and percentage, subscribers gained and lost, likes, comments, and shares. Pass group_by='day' or 'month' for a time series instead of a single total row. This is the 'how is the channel doing' tool — start with it, then drill into traffic sources or individual videos. |
| yt_traffic_sourcesA | Break views and watch time down by how viewers arrived: YouTube search, suggested/related video, channel page, playlist, external sites, notifications, subscriptions feed, Shorts feed, end screens, and so on. The single most useful diagnostic for 'why did this take off' or 'why did it flatline'. Optionally scope it to one video. Source names come back as the API's own constants (YT_SEARCH, RELATED_VIDEO, EXT_URL, SHORTS, SUBSCRIBER, PLAYLIST, NOTIFICATION, END_SCREEN, NO_LINK_OTHER, and others). |
| yt_top_videosA | Rank the channel's videos over a date range by views, watch time, average view duration, or subscribers gained. Use this to find which videos to look at more closely — the IDs it returns feed yt_audience_retention, yt_traffic_sources, and yt_episode_race. max_results is capped at 200 by the API. Setting resolve_titles=true spends 1 YouTube Data API quota unit per 50 videos (default daily budget: 10,000 units); the Analytics query itself does not draw on that budget. Pass resolve_titles=false to return bare video IDs and spend none. |
| yt_video_performanceA | Metrics for one or more named videos over a date range — the counterpart to yt_top_videos when you already know which videos you care about. Returns one row per video. Note that the window is a reporting window, not the video's lifetime: a range of the last 30 days shows the last 30 days of a video published two years ago. Setting resolve_titles=true spends 1 YouTube Data API quota unit per 50 videos (default daily budget: 10,000 units); the Analytics query itself does not draw on that budget. Pass resolve_titles=false to return bare video IDs and spend none. |
| yt_audience_retentionA | The retention curve for a single video: at each 1% slice of its runtime, what fraction of viewers were still watching (audienceWatchRatio) and how that compares with similar YouTube videos of similar length (relativeRetentionPerformance, 0-1 where 0.5 is median). This is where you find the drop-off — the intro that loses people, the mid-roll dip. Exactly one video ID: the API accepts a list but silently reports only the first, so this tool rejects lists rather than mislabel the result. |
| yt_geographyA | Break views and watch time down by viewer country, ranked. Countries come back as ISO 3166-1 alpha-2 codes (US, GB, IN). Optionally scope to a single video. Useful for deciding where an audience actually is before making scheduling, language, or sponsorship calls. |
| yt_playlist_performanceA | How your playlists perform as playlists, not just as bags of videos. A YouTube podcast IS a playlist, so this is the series-level view: playlistStarts (how often someone began the series), viewsPerPlaylistStart (how many episodes they watched before leaving — the binge metric), averageTimeInPlaylist in seconds, playlistSaves, and playlist-scoped views and watch time. Group by 'playlist' to rank series, 'day' for a trend, or 'none' for a channel-wide total. Ranking by playlist requires a sort order, which this tool always sends. |
| yt_episode_raceA | The derived view: compare several videos on equal terms by re-indexing each one's daily numbers to days since its own publish date, so day 7 of a new episode sits next to day 7 of the last five. Raw totals cannot answer 'is this episode outperforming?' because an older video has simply had more days to accumulate; this removes that. Returns each video's cumulative curve by age plus a leaderboard at the oldest day all of them have reached, with each video's raw per-day API values returned alongside the running totals. Costs 1 YouTube Data API quota unit for publish dates (required — the normalisation is impossible without them) plus one Analytics query per video. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/conorbronsdon/yt-analytics-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server