youtube-analytics-mcp
youtube-analytics-mcp
一个 MCP 服务器,为 AI 助手提供你拥有的频道的完整 YouTube Analytics、Data v3 和 Reporting API 接口——包括同时管理多个频道。
大多数 YouTube MCP 服务器硬编码了一小撮指标字符串,因此只要问题超出其预设列表,不 fork 它们就无法回答。这个服务器反其道而行之:youtube_analytics_query 接受 reports.query 接受的所有参数,youtube_data_call / youtube_reporting_call 对其他两个 API 也是如此。预设只是之上的便捷功能,绝不是唯一的访问途径。
你需要自己准备 Google Cloud OAuth 客户端。本包不附带任何凭据,没有任何凭据经过第三方,一切都在本地通过 stdio 运行。
工具
工具 | 作用 |
| 列出已授权的频道、默认频道以及配置所在位置 |
| 开始添加频道;立即返回同意 URL |
| 进行中的同意流程最终结果如何 |
| 放弃进行中的同意流程 |
| 选择未限定账户的调用使用哪个频道 |
| 丢弃存储的刷新令牌 |
| 行使每一项授权并报告其存在时长 |
| 不受限制的 |
| 不受限制的 Data API v3 |
| 不受限制的 Reporting API |
| 单个视频或直播:摘要 + 流量来源拆分 |
| 单个已结束直播的并发观看者,逐分钟 |
| 这些 API 能回答和不能回答什么 |
每个数据工具都接受可选的 account,因此一次对话可以比较两个频道。
大型结果写入文件,而非经由模型返回
youtube_analytics_query、youtube_data_call 和 youtube_reporting_call 接受 outputPath(以及可选的 format:csv 或 json,否则根据扩展名推断)。指定后,完整结果写入磁盘,只返回摘要——行数、列数、字节大小、前三行。未指定时,超过 100 行的结果会被截断,并附上该选项的提示,因为将一千行的报告内联返回会消耗调用方的上下文窗口,而且到达时也无法阅读。
对于真正的大批量工作——每个视频的每一天、持续数月——请通过 youtube_reporting_call 使用 Reporting API:它可以生成可下载的每日 CSV 报告,包含 reports.query 单次调用无法返回的维度组合。
Related MCP server: YouTube Studio MCP Server
设置
1. 一次 Google Cloud OAuth 客户端
创建或选择一个项目。
APIs & Services → Library:启用 YouTube Analytics API、YouTube Data API v3 和 YouTube Reporting API。
OAuth consent screen → Audience:将用户类型设置为 External(只有关联了 Workspace 组织时才提供 Internal)。在同一 Audience 页面上,在 Test users 下点击 + Add users,添加每个频道所有者的 Google 账户——包括你自己的。
如果遗漏这一步,同意流程会失败,并显示 "… has not completed the Google verification process. The app is currently being tested and can only be accessed by developer-approved testers." 作为项目所有者并不会自动使你成为测试用户;你必须显式添加自己。
将发布状态设置为 In production。 这比看起来更重要。Google 指出:
一个配置了外部用户类型 OAuth 同意屏幕且发布状态为“Testing”的 Google Cloud Platform 项目,会被签发 7 天到期的刷新令牌,除非请求的 OAuth 范围仅为姓名、电子邮件地址和用户配置文件的一部分。
每个 YouTube 范围都是敏感范围,因此 Testing 应用会迫使你每周重新授权。
请注意,对于这些范围,发布并不是简单的开关:控制台很可能会要求你提供演示视频,并在允许你离开 Testing 之前让应用接受 YouTube API 验证审核。对于个人工具来说这是实际的工作,而每周重新同意通常是更好的权衡。替代方案见下方 7 天授权限制。
Credentials → Create credentials → OAuth client ID → Desktop app。 不是 Web application:此服务器每次运行都会监听一个随机的空闲回环端口,而 Web 客户端要求所有重定向 URI(包括端口)都事先注册。
下载 JSON。
2. 告诉服务器客户端在哪里
将其放入配置文件(参见 config.example.json):
// %APPDATA%\youtube-analytics-mcp\config.json (Windows)
// ~/Library/Application Support/youtube-analytics-mcp/ (macOS)
// ~/.config/youtube-analytics-mcp/config.json (Linux)
{
"client": { "client_id": "...", "client_secret": "..." }
}运行 youtube-analytics-mcp --where 打印该目录。环境变量同样有效且优先级更高——YTMCP_CLIENT_ID + YTMCP_CLIENT_SECRET,或 YTMCP_CLIENT_FILE 指向 Google 下载的原始文件({"installed": …} 包装会自动解包)。YTMCP_CONFIG_DIR 可重定位整个目录。
3. 授权每个频道
bun run auth # or: youtube-analytics-mcp --authorize
bun run auth -- --alias second # name it yourself你的浏览器会自动打开同意页面;URL 也会打印出来,用于无法打开浏览器的情况(SSH、容器、CI)。选择拥有该频道的 Google 账户并批准。对每个频道重复此操作——在浏览器中每次都选择不同的账户。账户以其 @handle 命名,除非你传入 --alias。
设置 YTMCP_NO_BROWSER=1 以永不启动浏览器,或向 youtube_authorize 工具传入 openBrowser: false 以仅对单次调用生效。
刷新令牌写入同一目录下的 accounts.json,与你手工编辑的 config.json 分开存放,因此你可能粘贴到 bug 报告中的文件永远不会是包含令牌的文件。在平台支持的情况下,两者都以 0600 权限写入。
你的助手也可以驱动此流程。youtube_authorize 会立即返回同意 URL,并在后台持续监听;youtube_authorize_status 报告其最终结果。它不会阻塞,因为同意所需时间取决于人的操作速度,而 MCP 客户端远在此之前就会放弃一次工具调用。URL 也会写入配置目录中的 pending-auth.txt,因为大多数客户端会丢弃服务器的 stderr,而无人能读的 URL 毫无用处。
4. 在你的 MCP 客户端中注册
Claude Code:
claude mcp add youtube-analytics --scope user -- bunx youtube-analytics-mcp或手动写入任何客户端的 mcpServers 映射:
{
"mcpServers": {
"youtube-analytics": { "command": "bunx", "args": ["youtube-analytics-mcp"] }
}
}默认只读
更新视频、发布或审核评论、上传缩略图在真实频道上都是不可逆的操作,因此不会请求写入范围,非 GET 调用会被拒绝。要启用它们,请设置 YTMCP_ALLOW_WRITE=1 并重新授权——仅设置该标志无效,因为存储的令牌不带有该范围。
并发观看者,以及无人能猜到的查询形态
averageConcurrentViewers 和 peakConcurrentViewers 确实适用于已结束的直播,并且与 Studio 自身的数字完全一致。它们被广泛认为不存在,因为 API 几乎以所有形态拒绝它们——唯独一种除外:过滤器必须固定到单个视频 并且 dimensions 必须为 livestreamPosition。
查询 | 结果 |
仅 | 400 |
| 500 内部错误 |
| 400 — 额外的过滤器被拒绝 |
| 流的每一分钟一行 |
没有任何错误提示缺失的维度,尤其是那个 500 错误,读起来像是指标本身有问题,而不是请求有误。youtube_concurrent_curve 会为你组装好这一切,并返回峰值、平均值以及完整的逐分钟曲线。
它真正无法提供的内容
youtube_capabilities 返回当前列表。以下两项都是通过请求指标并收到 Unknown identifier 来验证的,这正是 API 区分它从未听说过的名称与它知道但在这里无法提供的名称的方式:
直播聊天消息和反应总数。 仅 Studio 可用。
liveChatMessages是实时读取聊天,无法恢复已结束的聊天。展示次数和展示点击率。 仅 Studio 可用,位于 Reach 标签页。
两件值得知道的事
不存在“自发布以来”的时间窗口。 Analytics API 纯粹基于日期范围,因此覆盖直播当天的窗口按构造就会返回该直播的直播观众。Studio 默认的按视频窗口排除了整个直播期间,这在分析直播时是一个既容易又代价高昂的陷阱。本 API 不会落入这个陷阱。
Analytics 配额是独立的。 Analytics 和 Reporting API 与 Data API v3 的每日单位预算分开计量,因此在此查询不会消耗实时聊天轮询所竞争的配额。这是基于它们是拥有各自控制台配额页面的独立 API 的强推断——并非实测。
开发
bun install
bun run dev # start on stdio
bunx tsc --noEmit # typecheck
bun run inspector # MCP InspectorMIT。
API 会滞后几天
最终确定的 Analytics 数据并非立即可用。于 2026-08-25 实测,按天维度的行一直覆盖到 08-22 便停止了:之前三天的会话根本没有返回任何行,而不是返回零行。对几小时前结束的直播进行查询,看起来会像一个没有流量的频道。
Studio 的 Web UI 有一条 API 未暴露的实时路径,因此当日报告仍必须来自 Studio。请将此服务器用于大约三天以前的所有数据,在那些数据上它远比在 Studio 中逐个视频点击要好得多。
7 天授权限制,以及为什么任何代码都无法绕过它
当 Cloud 项目的发布状态为 Testing 且用户类型为 External 时,Google 会在 7 天后撤销刷新令牌,除非请求的范围仅限于姓名、电子邮件和个人资料。每个 YouTube 范围都是敏感范围,因此该例外在此永远不适用。
这无法通过自动化消除。 7 天是施加在 刷新 令牌上的。铸造新令牌需要有人在浏览器中批准同意屏幕——这才是同意的含义,而不是可以绕过的工程缺口。更频繁地刷新访问令牌对此毫无影响。
此服务器所做的替代安排:
youtube_accounts报告每项授权的ageDays,并从第 5 天开始发出警告。已过期的授权会以一条指明原因和解决办法的消息失败,而不是赤裸裸的
invalid_grant。youtube_refresh_tokens(或从 CLI 使用--refresh)将每项授权作为健康检查加以行使。这也是一种对冲:尚未确定 7 天时钟是从签发时绝对计时,还是在使用时顺延。如果会顺延,通过调度器每天运行一次即可无限期保持授权有效;如果不会,该调用也几乎不花费什么。无论如何都值得运行。重新同意只需一次
youtube_authorize调用,它会自行打开浏览器——大约十五秒。
真正的解决办法,按成本排序:
发布状态 → 正式版。 免费,且授权不再过期。对于敏感的 YouTube 授权范围,Google 可能要求你提供演示视频并通过验证审核,然后才允许发布,这对个人工具来说确实是不小的工作量。
内部用户类型。 没有 7 天限制,也无需验证,但该选项仅在项目属于 Google Workspace 组织(付费订阅)时才存在。
以每周重新授权的方式正式上线。 对于单用户工具来说,这通常是正确的选择。
Available Tools
13 toolsyoutube_accountsA
List authorized channels, which one is the default, and where configuration lives. Start here when unsure what this server can see.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of behavioral disclosure. It explicitly states the tool 'Lists' information, which indicates a read-only, non-destructive operation. It also adds the location of configuration as extra context. It does not mention error cases, authentication requirements, or side effects, but for a simple listing tool these are unlikely to be significant. The description is transparent about what the tool does and returns.
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 with zero waste. The primary function is stated first, and the usage hint is appended after. Every word contributes to either explaining what the tool does or when to use it. It is appropriately short and front-loaded.
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, parameterless listing tool with no output schema, the description fully covers what the tool returns (authorized channels, default, configuration location) and its role as an entry point. Nothing critical is missing. An agent can invoke this tool correctly without further clarification.
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?
The tool has zero parameters, so there is no schema to supplement. The description itself adds no parameter information (there is none). Per the guideline, 0 params baseline is 4 because there is nothing to describe. The description is sufficient and does not need to compensate for any gap.
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 uses a specific verb ('List') and names the resource ('authorized channels') and additional outputs (default channel, configuration location). It clearly distinguishes itself from siblings like youtube_capabilities by focusing on channel authorization state rather than general platform capabilities.
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 phrase 'Start here when unsure what this server can see' provides explicit guidance on when to use this tool as a discovery entry point. It does not name specific alternatives or exclusions, but the context strongly implies that for targeted operations (e.g., authorizing, setting default), the user should use other tools. This is clear enough for an agent to select it appropriately.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
youtube_analytics_queryB
Unrestricted YouTube Analytics reports.query — any metrics/dimensions/filters/sort the API accepts. This API has no "since published" window, so a date range covering a live stream returns its live audience by construction.
| Name | Required | Description | Default |
|---|---|---|---|
| ids | No | defaults to channel==MINE | |
| raw | No | return the response verbatim instead of named rows | |
| sort | No | ||
| format | No | ||
| account | No | alias or channel id; defaults to the configured default, or the only account | |
| endDate | No | defaults to today | |
| filters | No | e.g. video==ID or insightTrafficSourceType==YT_SEARCH | |
| metrics | Yes | comma-separated, e.g. views,estimatedMinutesWatched,averageViewDuration | |
| currency | No | ||
| startDate | Yes | ||
| dimensions | No | e.g. day, video, insightTrafficSourceType, ageGroup,gender | |
| maxResults | No | ||
| outputPath | No | write the full result here instead of returning it inline; strongly preferred for anything large. Extension picks the format unless format is given. | |
| startIndex | No | ||
| includeHistoricalChannelData | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must carry behavioral disclosure. It discloses the live audience behavior for live streams, which is a specific behavioral trait. However, it omits broader behaviors such as authentication requirements, rate limits, or the fact that it is a read-only operation, leaving significant gaps in transparency.
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 with no redundancy. It front-loads 'Unrestricted,' which immediately signals the tool's core value, and the second sentence adds a relevant behavioral nuance. Every word earns its place, making it highly concise and well-structured.
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?
This is a high-complexity tool with 15 parameters, no output schema, and no annotations. The description is too sparse to guide an agent through constructing valid queries or understanding result formats. It lacks information about return types, handling large outputs (though outputPath is in the schema), or common pitfalls, making it incomplete for effective use.
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 description coverage is 53%, which is moderate, so the baseline is 3. The description adds marginal value by indicating the tool accepts 'any metrics/dimensions/filters/sort,' which relates to several parameters, but it does not elaborate on syntax or formats. It does not compensate for the undocumented parameters that lack schema-level 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 identifies the tool as 'Unrestricted YouTube Analytics reports.query' with 'any metrics/dimensions/filters/sort the API accepts,' which precisely defines its function. It distinguishes itself from siblings only by the term 'unrestricted' but does not explicitly name the restricted alternatives, so it is clear but not fully differentiated.
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 provides no explicit guidance on when to choose this tool over its siblings. It mentions the 'since published' window nuance but does not state criteria like 'use this for arbitrary queries or when you need full flexibility.' Without this, an agent lacks direction on optimal selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
youtube_authorizeA
Start authorizing a channel. Returns the consent URL immediately — give it to the owner to open in a browser, then poll youtube_authorize_status. Run it again, picking a different Google account in the browser, to add another channel.
| Name | Required | Description | Default |
|---|---|---|---|
| alias | No | name for this channel; defaults to its @handle | |
| setDefault | No | make this the default account | |
| openBrowser | No | open the consent page automatically (default true) | |
| timeoutSeconds | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full responsibility. It discloses the asynchronous nature (returns URL immediately, then must poll) and the ability to authorize multiple channels by re-running. It does not mention potential failure states or permissions, but the core behavior is transparent enough for correct invocation.
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-load the primary action and immediately provide the follow-up step. Every word adds value; no redundancy or fluff. The structure is optimal for quick comprehension.
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?
The description covers the essential flow: start, get URL, poll status, add more channels. It does not detail cancellation or edge cases, but those are handled by sibling tools (youtube_authorize_cancel). For a tool that merely initiates an asynchronous process, this is sufficiently 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 75%, and the description adds no direct parameter explanations. The mention of opening in a browser aligns with openBrowser, but it does not elaborate on alias, setDefault, or timeoutSeconds. Since the schema already documents these, 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 states a specific verb ('Start authorizing'), a specific resource ('a channel'), and the immediate action ('Returns the consent URL immediately'). It also distinguishes itself from siblings by mentioning polling youtube_authorize_status, making its role in the authorization flow clear.
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?
It explicitly gives the workflow: 'give it to the owner to open in a browser, then poll youtube_authorize_status.' It also explains how to add another channel by re-running with a different Google account. This is concrete, actionable guidance that separates initialization from status polling.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
youtube_authorize_cancelA
Abandon an in-flight consent flow so a new one can be started.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It clearly states the action (abandoning a flow) and its purpose. While it doesn't detail side effects or reversibility, for a zero-parameter cancel operation the core behavior is sufficiently disclosed.
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?
A single, front-loaded sentence that conveys the exact purpose with zero waste. It is as concise as possible while remaining informative.
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 tool with no parameters and no output schema, the description fully covers what the tool does and why. Nothing an agent needs to invoke it correctly is missing.
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?
The input schema has no properties, so there are no parameters to explain. The description doesn't need to add parameter info, and the baseline for 0 parameters is 4.
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 states a specific verb ('abandon') and resource ('in-flight consent flow'), and distinguishes this from siblings like youtube_authorize and youtube_authorize_status. It clearly conveys this is the cancellation operation.
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?
Provides clear context for when to use it ('so a new one can be started'), implying it should be used to reset a pending authorization. It doesn't explicitly list alternatives, but the purpose is self-evident given the sibling set.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
youtube_authorize_statusA
Check an in-flight consent flow started by youtube_authorize: still waiting, finished, or failed. Also re-prints the consent URL.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description uses 'Check' which strongly implies a read-only operation, and it does disclose the three possible outcomes and the consent URL re-print. However, it does not explicitly state that the operation has no side effects, whether it is idempotent, or if repeated polling is safe.
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 that front-loads the action ('Check') and the resource, then concisely lists the possible states and the URL re-print. Every word earns its place 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?
For such a simple tool (no parameters, no output schema, no annotations), the description covers the core purpose and outcomes. However, it does not specify the exact return format or behavior when no consent flow is in progress, which is a minor but relevant gap for an agent invoking it.
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?
The tool has zero parameters, and the input schema is empty. Per the baseline for zero-parameter tools, the description is not required to add parameter semantics, and it does not attempt to do so. This 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 uses the specific verb 'Check' with the resource 'in-flight consent flow started by youtube_authorize', clearly distinguishing it from related tools like youtube_authorize (start) and youtube_authorize_cancel (cancel). The purpose is unambiguous and properly scoped.
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 it is used after starting a consent flow with youtube_authorize, but it does not explicitly state when to use this tool versus alternatives, nor does it mention when not to use it or point to other tools for cancellation or re-authorization.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
youtube_capabilitiesA
What these APIs can and cannot answer. Read this before concluding a metric is missing.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
There are no annotations provided, so the description carries the full burden. It implies a read-only informational nature but does not explicitly state the tool performs no side effects or is safe to invoke. However, given its nature as a capability descriptor, the implication is strong enough for a 3.
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?
A single, tightly scoped sentence that is front-loaded with the core purpose and ends with a direct call to action. Every word earns its place 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?
For a tool with no parameters and no output schema, the description is sufficiently complete. It conveys the purpose and when to use it. Could mention what type of output it returns, but since it's a probe of capabilities, that is less critical.
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?
The tool has zero parameters, matching the baseline of 4. The description doesn't need to explain parameters, and it adds value by clarifying the purpose without any ambiguity.
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 states exactly what the tool provides: an explanation of what the APIs can and cannot answer. It clearly distinguishes itself from sibling tools that perform specific API operations, positioning this as a meta-tool for capability understanding.
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?
Explicitly instructs when to use it: 'Read this before concluding a metric is missing,' giving a clear trigger condition. It doesn't need alternatives since it's a standalone informational tool, and the context signals reinforce this by having zero parameters.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
youtube_concurrent_curveC
Peak and average concurrent viewers for one ended live stream, minute by minute. These metrics are real but only answer in one exact query shape, which this builds.
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | ||
| account | No | alias or channel id; defaults to the configured default, or the only account | |
| endDate | No | ||
| videoId | Yes | ||
| startDate | Yes | a date on or before the stream day | |
| outputPath | No | write the full result here instead of returning it inline; strongly preferred for anything large. Extension picks the format unless format is given. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of behavioral disclosure. It mentions the constraint 'for one ended live stream' and says metrics are 'real but only answer in one exact query shape', but this is cryptic and does not clarify side effects, authorization requirements, rate limits, or what happens with invalid inputs. The lack of any behavioral detail beyond a vague limitation is insufficient.
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, which is concise, but the second clause 'which this builds' is confusing and unexplained. It front-loads the main purpose but then introduces a cryptic notion of a query shape without elaboration. Overall, it is brief but not optimally structured for clarity.
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 tool with 6 parameters, no output schema, and no annotations, the description is drastically incomplete. It does not explain required inputs (videoId, startDate), response format, or any operational details. An agent cannot determine how to call this tool correctly based solely on the description and 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?
The description adds no information about parameters. The schema already documents startDate, account, and outputPath, but there is no compensation for the undocumented videoId, endDate, and format. With schema description coverage at 50%, the description should help clarify the other half, but it does not. It adds zero value beyond the schema for parameter meaning.
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 returns peak and average concurrent viewers for one ended live stream, minute by minute. It specifies a concrete resource and metrics, and the phrase 'only answer in one exact query shape' hints at specialization, though it doesn't explicitly differentiate from sibling analytics tools. It is not a tautology and conveys a distinct function.
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 guidance is provided on when to use this tool versus alternatives like youtube_analytics_query or youtube_reporting_call. There are no conditions, exclusions, or context that help an agent choose this over siblings. The description merely states what it does without any usage criteria.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
youtube_data_callB
Unrestricted call against the YouTube Data API v3 (e.g. /videos, /channels, /liveBroadcasts, /search). Read-only unless YTMCP_ALLOW_WRITE=1.
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | ||
| path | Yes | endpoint path, e.g. /videos | |
| query | No | ||
| format | No | ||
| method | No | ||
| account | No | alias or channel id; defaults to the configured default, or the only account | |
| outputPath | No | write the full result here instead of returning it inline; strongly preferred for anything large. Extension picks the format unless format is given. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It explicitly states 'Read-only unless YTMCP_ALLOW_WRITE=1', which is a critical safety trait. However, it omits other behavioral aspects such as authentication requirements, error handling behavior, or that outputPath is recommended for large responses. The read-only/write condition is useful, but the description is thin overall.
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, front-loaded with the tool's purpose and examples, followed by the read-only condition. Every word contributes value; there is no redundancy or fluff. It is an excellent example of concise, structured writing.
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 generic wrapper with 7 parameters, no output schema, and no annotations, the description is inadequate. It does not mention that the agent needs to know YouTube Data API v3 endpoint syntax, nor does it point to any documentation. It also fails to mention authentication prerequisites (though sibling auth tools exist) or that outputPath is strongly preferred for large results. The agent cannot safely and correctly invoke this tool based solely on the given description.
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?
The description adds no parameter semantics beyond what the input schema already provides. Schema coverage is only 43% (3 of 7 parameters have descriptions: path, account, outputPath), leaving body, query, format, and method undocumented. The description does not compensate for this gap; it merely gives endpoint examples, so the agent must guess at parameter usage for the undocumented fields.
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 states a clear verb ('call') and resource ('YouTube Data API v3') with concrete endpoint examples (/videos, /channels, /liveBroadcasts, /search). It is obvious this is a raw API wrapper, but it doesn't explicitly distinguish it from sibling tools like youtube_analytics_query or youtube_reporting_call, leaving some ambiguity about when to use this vs. a specialized tool.
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 guidance is given on when to use this tool versus its siblings. It does not say 'use this for arbitrary endpoints not covered by specialized tools' or mention any prerequisites like authentication or authorization. The agent must infer usage from the name and examples, which is insufficient.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
youtube_forget_accountA
Remove a stored refresh token. This does not revoke the grant — do that at https://myaccount.google.com/permissions.
| Name | Required | Description | Default |
|---|---|---|---|
| alias | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full responsibility. It transparently states that the action removes a stored token and clarifies the important limitation that it does not revoke the grant. The mutating nature is evident, and the non-revocation caveat is a valuable behavioral disclosure.
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 concise sentences with no filler. The primary action is front-loaded, and the clarifying limitation follows immediately, making it efficient and well-structured.
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 one-parameter tool, the description covers the core action and its non-revocation limitation, which is sufficient for basic usage. However, it omits any explanation of the 'alias' parameter and does not mention prerequisites (e.g., prior authorization) or return behavior, leaving minor gaps that an agent might need.
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?
The schema has one required parameter 'alias' with no description, and the tool description does not explain what 'alias' refers to. With 0% schema description coverage, the description was expected to provide this meaning but does not, leaving the agent to infer from the parameter name alone.
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 states a specific action ('Remove a stored refresh token') on a clear resource (stored refresh token), and explicitly notes it does not revoke the grant, distinguishing it from authorization-related siblings. This leaves no ambiguity about what the tool does.
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?
It clearly explains what the tool does not do (revoke the grant) and directs the user to an external URL for that purpose, providing when-not-to-use guidance. However, it does not explicitly name sibling alternatives, so the guidance is implicit rather than comparative.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
youtube_refresh_tokensA
Exercise every stored grant and report its age. Use as a health check, or on a daily schedule: it is not established whether the 7-day Testing clock is absolute or slides on use, and if it slides this keeps grants alive. Cannot create a new grant — only consent does that.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden. It discloses that it exercises grants, reports age, and cannot create new grants. It also reveals the uncertainty about the Testing clock and the potential sliding behavior, which is valuable context. It does not explicitly state whether token refresh modifies stored state, but 'exercise' implies action; still, the key limitations are clear.
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?
Three sentences with no wasted words. The core function and primary usage are front-loaded, and the limitation is stated clearly at the end. It is both concise and informative.
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 tool with no parameters, no output schema, and no annotations, the description covers everything an agent needs: what it does, when to use it, why, and its key limitation. It even explains the underlying reasoning about the clock, making the tool fully self-contained.
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?
The tool has zero parameters, so the schema describes nothing. Per the rubric, a 0-parameter tool gets a baseline of 4. The description adds no parameter information since there are none, which 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 uses a specific verb ('exercise') and clearly identifies the resource ('every stored grant') and the output ('report its age'). It distinguishes itself from sibling tools by explicitly stating it cannot create new grants, which only consent can do. This makes its 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?
It explicitly prescribes usage as a health check or on a daily schedule, explains the reasoning about the 7-day Testing clock, and states what it does not do (cannot create a grant). This gives clear when-to-use guidance and differentiates from authorization tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
youtube_reporting_callA
Unrestricted call against the YouTube Reporting API (e.g. /jobs, /reportTypes, /media). Read-only unless YTMCP_ALLOW_WRITE=1.
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | ||
| path | Yes | endpoint path, e.g. /videos | |
| query | No | ||
| format | No | ||
| method | No | ||
| account | No | alias or channel id; defaults to the configured default, or the only account | |
| outputPath | No | write the full result here instead of returning it inline; strongly preferred for anything large. Extension picks the format unless format is given. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It explicitly discloses the read-only default and the YTMCP_ALLOW_WRITE=1 escape hatch, which is critical safety information. It does not detail auth prerequisites or write-path side effects, but the core risk behavior is surfaced.
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 with no fluff. It front-loads the API name and examples before the read-only caveat, making the most important information immediately visible.
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?
The description is minimally viable: it names the API, gives endpoint examples, and includes a key safety guard. However, it omits auth/account prerequisites, does not clarify how YTMCP_ALLOW_WRITE influences method handling, and provides little context for the many undocumented parameters, leaving the agent to infer too much.
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 description coverage is only 43%, and the description adds little parameter-level meaning beyond path examples like /jobs and /reportTypes. Parameters such as body, query, method, and format are not explained in the description, leaving significant semantic gaps for a 7-parameter tool.
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 identifies the resource (YouTube Reporting API) and the action (unrestricted call), with concrete endpoint examples like /jobs and /reportTypes. It is specific enough to distinguish from sibling tools like youtube_data_call or youtube_analytics_query, though it does not explicitly state that distinction.
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 gives clear context about when to use the tool: for low-level calls to the YouTube Reporting API endpoints. It provides concrete examples, but it does not explicitly mention when not to use it or point to alternatives such as dedicated analytics tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
youtube_session_reportA
Summary plus traffic-source split for one video or live stream, over a window wide enough to include the live audience. A convenience over youtube_analytics_query.
| Name | Required | Description | Default |
|---|---|---|---|
| account | No | alias or channel id; defaults to the configured default, or the only account | |
| endDate | No | ||
| videoId | Yes | ||
| startDate | Yes | a date on or before the stream day |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It adds a useful detail: the tool automatically uses a window that includes the live audience, implying it adjusts dates around the stream. It also indicates the output includes a summary and traffic-source split. However, it does not disclose any side effects, permission requirements, rate limits, or the exact return structure. This is partial transparency but not comprehensive.
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 short sentences with no filler. The first sentence front-loads the core purpose and the window behavior, and the second sentence immediately identifies the relationship to a sibling tool. Every word contributes value, making it highly 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?
For a tool with 4 parameters, no output schema, and no annotations, the description is insufficient. It fails to explain the meaning of endDate and account, and does not describe the format or structure of the returned summary and traffic-source split. While an agent might infer some behavior, it lacks the specifics needed to invoke the tool correctly or interpret results without additional context. The hint about the window is helpful but not enough.
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 description coverage is 50% (only startDate and account have descriptions; videoId and endDate lack them). The description does not compensate for the missing parameters. It implicitly ties videoId to the video/live stream and startDate to the window start, but it does not clarify endDate (whether it is used or overridden) or account (its default behavior). Since coverage is low, the description needed to explain all parameters but only partially addresses them.
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's function: providing a summary and traffic-source split for a single video or live stream. It also explicitly names youtube_analytics_query as the tool it simplifies, which differentiates it from that sibling. The verb 'provide' is implied through 'Summary plus traffic-source split', and the resource is specific (one video or live stream).
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 says it is 'A convenience over youtube_analytics_query', which implies that for a typical summary of a single video, this tool is preferable to writing a raw query. It also mentions the window being 'wide enough to include the live audience', hinting at a use case for live streams. However, it does not explicitly state when not to use it or contrast with other siblings like youtube_data_call or youtube_reporting_call, so it falls short of full exclusions but still gives clear context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
youtube_set_default_accountB
Choose which authorized channel calls use when none is named.
| Name | Required | Description | Default |
|---|---|---|---|
| alias | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must carry the full burden of behavioral disclosure. It states that a default is chosen, implying persistence and effect on subsequent calls, but it does not mention prerequisites (e.g., accounts must already be authorized), whether this overwrites an existing default, or if changes are reversible. Such gaps are critical for a mutation tool.
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, well-structured sentence that fronts the verb and the core concept. There is no fluff or repetition; every word earns its place, achieving maximum conciseness while preserving clarity.
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?
The tool is simple (one parameter, no output schema), but the description is still incomplete. It fails to specify how the agent should obtain a valid alias, whether the alias must correspond to an already-authorized account, or any side effects of making a call without setting a default. An agent cannot reliably call this tool correctly based solely on this description.
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?
With schema description coverage at 0%, the description must explain the 'alias' parameter. It only implies that alias is the name of an authorized channel ('which authorized channel calls use... when none is named'), but it does not define what an alias is, how to obtain one, or the expected format. This is insufficient for an agent to correctly supply the parameter.
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 action (choose) and the resource (default authorized channel) and the conditional context (when none is named). It distinguishes this tool from siblings like youtube_accounts (lists accounts) and youtube_authorize (adds accounts), leaving no ambiguity about what it does.
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 phrase 'when none is named' implies a usage context but does not explicitly contrast with per-call account naming or mention when you would need to set a default. It offers no guidance on when to use this tool versus naming an account directly in other calls, leaving the agent to infer the intended workflow.
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.
13 tool updates
v0.2.0- First observed
youtube_accounts - First observed
youtube_analytics_query - First observed
youtube_authorize - First observed
youtube_authorize_cancel - First observed
youtube_authorize_status - First observed
youtube_capabilities - First observed
youtube_concurrent_curve - First observed
youtube_data_call - First observed
youtube_forget_account - First observed
youtube_refresh_tokens - First observed
youtube_reporting_call - First observed
youtube_session_report - First observed
youtube_set_default_account
TDQS
Scored across 13 tools
Each tool has a clearly distinct purpose: authorization flow (authorize, status, cancel), account management (accounts, set default, forget, refresh), raw API access (analytics_query, data_call, reporting_call), convenience wrappers (session_report, concurrent_curve), and capability explanation. The only slight overlap among the three unrestricted calls is mitigated by descriptions pointing to different YouTube APIs.
All tools share the consistent 'youtube_' prefix and use snake_case. However, the naming pattern mixes nouns (youtube_accounts, youtube_capabilities) with verb phrases (youtube_set_default_account, youtube_refresh_tokens) and compound nouns (youtube_analytics_query, youtube_concurrent_curve). Still, the names are readable and predictable after a moment.
At 13 tools, the server has a well-scoped surface covering authentication, account management, and multiple API query methods without redundancy. Each tool contributes a distinct capability, and none feel superfluous.
The surface covers the full lifecycle: authorization, account state, raw access to all three YouTube APIs, convenience queries for typical needs, and a capabilities tool to explain limitations. No obvious missing operations; even token revocation is addressed with a pointer to Google's page.
Maintenance
Related MCP Connectors
YouTube transcripts, search, channel/playlist listings and upload tracking for AI agents.
YouTube discovery, transcripts, library search, and monitors with API keys or OAuth.
YouTube search, whole channels, video stats, comments and full transcripts with timestamps.
1YouTube transcripts, video details, search, channels and playlists. OAuth sign-in or API key.
51
Related MCP Servers
- FlicenseAqualityDmaintenanceEnables AI assistants to analyze YouTube channels, videos, transcripts, and content strategy through structured tool calls.1711 npm-
- FlicenseNot gradedqualityBmaintenanceEnables AI-powered automation of YouTube Studio tasks, including retrieving channel stats, fetching unanswered comments, and posting replies, using Google Gemini and MCP over SSE or stdio.-
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to manage YouTube channels directly, including video publishing, SEO optimization, playlist curation, community interaction, and traffic analytics, all through local OAuth.1MIT
- 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