youtube-organic-mcp
Provides tools for accessing YouTube organic analytics, including channel statistics, video performance, watch time, and audience engagement via YouTube Data API v3 and YouTube Analytics API v2.
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-organic-mcpget my channel's analytics for the past 30 days"
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-organic-mcp
MCP server for YouTube organic analytics — channel stats, video performance, watch time, and audience engagement via the YouTube Data API v3 and YouTube Analytics API v2.
Built for Claude Code and any MCP-compatible AI tool. Gives your AI assistant direct, read-only access to your own channel's organic data — subscribers, views, watch time, per-video engagement, and day-by-day trends.
Part of The SEO Engine toolkit by Rex Jones — AI-powered SEO and social media tooling for agencies and businesses.
Why this exists
No good open-source YouTube organic MCP existed. Plenty of ad MCPs; organic channel analytics, nobody.
YouTube has the richest organic API of the major platforms. Watch time, average view duration, subscribers gained/lost, traffic sources — none of it gated behind a multi-week review.
Reuses your existing Google OAuth. If you already run the GA4 / GSC / Google Ads MCPs, the same OAuth client works here.
Related MCP server: YouTube MCP Server
Tools
Tool | Description |
| List configured channels and the default |
| Channel profile + lifetime stats (subscribers, total views, video count, uploads playlist) |
| Paginated uploads with per-video views, likes, comments, duration |
| Details for specific video IDs (batch up to 50) |
| Channel analytics over a date range: views, watch time, avg view duration/%, subs gained/lost, likes, comments, shares — optionally by day |
| The same metrics for a single video over a date range |
All tools accept an optional account parameter for multi-account setups.
Getting connected
Step 1: Enable the APIs
In Google Cloud Console (any project — you can reuse an existing one), enable YouTube Data API v3 and YouTube Analytics API.
Step 2: Get a refresh token
Create an OAuth client of type Desktop app and download its client_secret JSON. Then run the helper (needs pip install google-auth-oauthlib):
python3 scripts/get_youtube_token.py /path/to/client_secret.json my-channelAuthorize with the Google account that owns the channel (pick the Brand Account if prompted). It prints the three YOUTUBE_* values to drop into your config and writes them to .youtube_account.json (gitignored).
Step 3: Configure
Add to your Claude Code MCP settings:
{
"mcpServers": {
"youtube-organic": {
"command": "node",
"args": ["/path/to/youtube-organic-mcp/dist/index.js"],
"env": {
"YOUTUBE_CLIENT_ID": "your_client_id.apps.googleusercontent.com",
"YOUTUBE_CLIENT_SECRET": "your_client_secret",
"YOUTUBE_REFRESH_TOKEN": "1//your_refresh_token"
}
}
}
}Or set YOUTUBE_ACCOUNTS to a JSON array for multiple channels (see .env.example).
Architecture
src/
index.ts # MCP server entry point, tool registration
accounts.ts # Multi-account resolution (client_id/secret/refresh_token)
client.ts # OAuth token minting + Data/Analytics API HTTP client
types.ts # TypeScript interfaces for API responses
tools/
channel.ts # get_channel_info + uploads-playlist resolver
videos.ts # get_videos, get_video_details
analytics.ts # get_channel_analytics, get_video_analyticsZero external HTTP dependencies — native
fetch(Node 18+)Auto-refreshing auth — access tokens minted from the refresh token, cached per process
Multi-account support — monitor multiple channels from one server
License
MIT
Available Tools
6 toolsget_channel_analyticsA
Get channel-level organic analytics over a date range: views, estimated minutes watched, average view duration/percentage, subscribers gained/lost, likes, comments, shares. Optionally break down by a dimension (e.g. 'day' for a daily time series). Requires the yt-analytics.readonly scope.
| Name | Required | Description | Default |
|---|---|---|---|
| account | No | Account name to query. Use list_accounts to see available options. Defaults to the first configured account. | |
| metrics | No | Comma-separated metric list. Defaults to a standard organic set. See YouTube Analytics API metric names. | |
| end_date | Yes | End date, YYYY-MM-DD. | |
| dimensions | No | Optional dimension(s), e.g. 'day', 'month', 'country'. | |
| start_date | Yes | Start date, YYYY-MM-DD. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description bears full burden. It discloses the required scope and that analytics are organic, but does not mention pagination, rate limits, or data freshness. It adequately describes the returned metrics but lacks depth on behavioral traits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the core purpose, and efficiently conveys optional usage and scope requirements without extraneous information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, the description lists specific returned metrics and mentions a breakdown option. It covers the required scope. However, it could clarify the output format (e.g., JSON array of daily rows) and how missing data is handled.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, baseline 3. The description adds value by specifying default metric set, account fallback, and explanation of the optional dimension parameter, going beyond the schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool gets channel-level organic analytics over a date range, listing specific metrics. It distinguishes from sibling tools like get_video_analytics (video-level) and get_channel_info (non-analytics).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description mentions optional dimension breakdown and required OAuth scope, but does not explicitly state when to use this tool versus alternatives or when not to use it. Usage context is implied rather than explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_channel_infoA
Get the authorized YouTube channel's profile and lifetime stats: title, description, custom URL, subscriber count, total views, and video count.
| Name | Required | Description | Default |
|---|---|---|---|
| account | No | Account name to query. Use list_accounts to see available options. Defaults to the first configured account. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavioral traits. It indicates a read-only operation ('Get') but does not mention authentication requirements, rate limits, or error handling. For a simple read tool, this is adequate but lacks depth.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, extremely concise, and front-loads the key action and resource. Every word is informative, with no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, the description helpfully lists output fields. However, it fails to explain how the optional 'account' parameter works or mention any error conditions. For a low-complexity tool, it is adequate but not complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with one optional parameter well-described in the schema. The description does not add any parameter semantics beyond the schema; it focuses on output fields instead. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Get' and the resource 'authorized YouTube channel's profile and lifetime stats', and lists specific fields (title, description, custom URL, subscriber count, total views, video count). It distinguishes from siblings like get_channel_analytics which likely provides time-series data, making the purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for retrieving static channel data but does not explicitly state when to prefer this tool over alternatives like get_channel_analytics or get_video_details. No when-not-to-use guidance is provided, relying on the tool's name and field list for context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_video_analyticsA
Get analytics for a single video over a date range (views, watch time, average view duration/percentage, subscribers gained, likes, comments, shares). Requires the yt-analytics.readonly scope.
| Name | Required | Description | Default |
|---|---|---|---|
| account | No | Account name to query. Use list_accounts to see available options. Defaults to the first configured account. | |
| metrics | No | Comma-separated metric list. Defaults to a standard organic set. | |
| end_date | Yes | End date, YYYY-MM-DD. | |
| video_id | Yes | The YouTube video ID. | |
| start_date | Yes | Start date, YYYY-MM-DD. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided. The description only states the basic function and scope, without disclosing behavioral traits such as rate limits, data freshness, or idempotency. For a read-like operation, more context on what returns is needed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences long, front-loading the purpose and listing metrics, with no fluff. Every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple analytics tool with 5 parameters and no nested objects, the description is mostly complete. However, the absence of an output schema means the agent must infer the return format from the listed metrics. The missing output schema is a minor gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with descriptions for all parameters. The description adds value by listing sample metrics (views, watch time, etc.) and mentioning the scope, but does not significantly elaborate on parameter semantics beyond what the schema provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool gets analytics for a single video over a date range, listing specific metrics. This distinguishes it from siblings like get_channel_analytics (channel-level) and get_video_details (metadata).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description mentions the required scope (yt-analytics.readonly) and implies usage for video analytics, but does not explicitly state when to use this tool versus alternatives like get_channel_analytics, nor provide exclusions or prerequisites.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_video_detailsA
Get details (views, likes, comments, duration, tags) for specific YouTube video IDs. Max 50 IDs per request.
| Name | Required | Description | Default |
|---|---|---|---|
| account | No | Account name to query. Use list_accounts to see available options. Defaults to the first configured account. | |
| video_ids | Yes | Array of YouTube video IDs to query (max 50). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so description carries full burden. It discloses batch size and retrieved fields but does not mention error handling, rate limits, or permissions. Adequate but not exhaustive.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences front-load key information: retrieved fields and batch limit. No redundancy or filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, description lists some return fields which helps. Covers required params, batch limit, and optional account. Could mention response structure or error cases for completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% so baseline applies. The description adds batch limit context to video_ids and mentions account defaults briefly, but does not elaborate on format or constraints beyond schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description explicitly states the tool retrieves details (views, likes, comments, duration, tags) for specific YouTube video IDs, with a batch limit of 50 IDs. This clearly differentiates it from sibling tools like get_video_analytics, which focuses on analytics.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description specifies to use for specific video IDs and includes a batch limit, implying when to use. It lacks explicit exclusions or alternatives but the context of sibling tools (e.g., get_channel_info) provides implicit guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_videosA
Get a paginated list of the channel's uploaded videos with engagement metrics (views, likes, comments, duration). Returns up to 50 per page.
| Name | Required | Description | Default |
|---|---|---|---|
| account | No | Account name to query. Use list_accounts to see available options. Defaults to the first configured account. | |
| page_token | No | Pagination token from a previous response's next_page_token. | |
| max_results | No | Number of videos to return (1-50, default 25) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries the burden. It discloses pagination (50 per page) and engagement metrics, but omits rate limits, error conditions, or authentication needs.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with the essential action, no wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple list tool, the description covers pagination, metrics, and page limit. Missing ordering or default sort, but still fairly complete given lack of output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema covers 100% of parameters. Description adds guidance for 'account' parameter (using list_accounts), but adds little beyond schema for page_token and max_results.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves a paginated list of uploaded videos with engagement metrics, and contrasts with siblings like get_channel_analytics and get_video_details.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Implies use for listing videos, but does not explicitly say when to use this tool over get_video_details or get_channel_analytics. The note about list_accounts is helpful but limited.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_accountsA
List all configured YouTube accounts available for querying.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description does not disclose behavioral traits such as read-only nature, permissions, or rate limits. It only vaguely hints at availability for querying.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence with no wasted words. Front-loaded and efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Adequate for a simple listing tool, but incomplete given no output schema or annotations. Could specify return fields or pagination behavior.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters exist, so schema coverage is 100% trivially. With 0 parameters, the baseline is 4, and the description does not need to add parameter details.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'list' and the resource 'all configured YouTube accounts', making the tool's purpose unambiguous. It distinguishes from sibling tools that focus on specific channels or videos.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool compared to siblings. It implies being a prerequisite for querying accounts, but lacks clear context or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
6 tool updates
v1.0.0- First observed
get_channel_analytics - First observed
get_channel_info - First observed
get_video_analytics - First observed
get_video_details - First observed
get_videos - First observed
list_accounts
TDQS
Scored across 6 tools
Each tool targets a distinct aspect: channel analytics, channel info, video analytics, video details, video listing, and account listing. No overlap or ambiguity between tool purposes.
All tools follow a consistent verb_noun pattern with snake_case: 'get_' for data retrieval and 'list_' for account listing. Naming is predictable and uniform.
With 6 tools, the set is well-scoped for YouTube channel analytics: covers channel stats, video details, and both channel- and video-level analytics. Neither too few nor too many.
The tool surface covers core organic analytics needs: channel profile, video list with metrics, and detailed analytics per video/channel. Minor gaps exist, like lacking search or filtering capabilities, but the core workflows are supported.
Maintenance
Related MCP Connectors
YouTube transcripts, search, channel/playlist listings and upload tracking for AI agents.
YouTube data for AI agents: channels, videos, transcripts, comments, search. Video research.
SEO & marketing toolkit for AI agents: GA4, Search Console, AdSense, GTM, PageSpeed, Trends.
YouTube transcripts, search, channels, playlists and bulk transcript jobs for AI agents. 14 tools.
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.35 npm1-
- AlicenseBqualityBmaintenanceProvides comprehensive access to YouTube Data, Analytics, and Reporting APIs, enabling AI assistants to manage videos, analyze performance, handle comments, and extract transcripts.40MIT
- FlicenseNot gradedqualityCmaintenanceEnables AI assistants to search videos, retrieve transcripts and metadata, analyze channels, and access trending and engagement analytics for YouTube content.35 npm-
- AlicenseAqualityCmaintenanceEnables AI assistants to retrieve YouTube channel overviews, Studio analytics, video performance, traffic source breakdowns, and comments for sentiment analysis using natural language prompts.81MIT