MCP Youtube 02bb5ce2

MCPAI代理

提供方 kirbah

AI代理 未标注 Token 社区 / 第三方 Claude DesktopClaudeCursor

一款专为AI代理设计的YouTube数据优化服务器,通过精简数据结构和智能缓存机制,显著减少API调用配额和上下文窗口令牌消耗。

一句话选型结论

按资料字段整理

MCP Youtube 02bb5ce2 属于AI代理类 MCP 服务器,传输方式未标注,Token,可直接接入 Claude Desktop、Claude、Cursor,没有现成安装命令,需按官方文档接入。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类AI代理 传输方式未标注 鉴权Token 部署方式支持远程部署
GitHub 星标 17 仓库热度,无公开仓库时显示未标注
工具数 未标注 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

AI代理
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量未标注暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

支持客户端

适用场景

数据优化TypeScript本地部署AI代理YouTubeAPI缓存机制令牌节省

安装与配置

未标注 Token
上游未给出传输方式
  1. 1
    准备运行环境

    确认你的客户端支持远程端点,并拿到服务地址。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后随便调一个只读工具,确认能返回结果,再接入正式流程。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
给代理接外部能力

让代理在任务中途调用搜索、数据库等真实工具。

多步任务编排

把一串操作拆成步骤,由代理按顺序执行。

自动化重复流程

把固定流程交给代理跑,减少手工操作。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 已适配 Claude Desktop、Claude、Cursor,换客户端不用重新研究配置。

先想清楚的地方

  • 远程端点依赖网络与服务方可用性,注意密钥与调用额度。
  • 没有现成安装命令,需要按官方文档自己填启动命令和参数。
  • 使用前要准备好Token对应的凭据,并按最小权限配置。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在AI代理场景里让模型直接调用外部能力的人。
  • 已经在用 Claude Desktop、Claude 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 不方便管理密钥或第三方授权的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
MCP Youtube 02bb5ce2当前 未标注 未标注 支持远程部署 无 2026-05-17
Filesystem 560c4363 13 未标注 本地部署 无 2026-05-17
Server Everything (everything) 11 stdio · 本地进程 本地部署 有 2026-05-17
Time 7365cb6d 2 SSE · 服务端推送 远程部署 有 2026-05-18
Everything Claude Code 未标注 stdio · 本地进程 本地部署 有 2026-05-17
Openmemory 557e1585 未标注 stdio · 本地进程 本地部署 有 2026-05-17

服务器档案

AI代理
字段来自项目仓库与公开索引,中文说明由本站标注
提供方kirbah上游标注的维护方 kirbah
分类AI代理本站按上游分类展示
连接方式未标注上游未给出传输方式
鉴权方式Token远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · 未标注本地安装时用到的包标识与运行时
部署类型支持远程部署上游给出的部署形态
最近核验2026-05-17上游最后核验时间

详细介绍

17.0 KB
来自项目仓库与上游目录的原文,未做删改

YouTube Data MCP Server (@kirbah/mcp-youtube)

A production-grade YouTube Data MCP server engineered specifically for AI agents.

Unlike standard API wrappers that flood your LLM with redundant data, this server strips away YouTube's heavy payload bloat. It is designed to save you massive amounts of context window tokens, protect your daily API quotas via caching, and run reliably without breaking your workflows.

Why Choose This Server?

Most MCP servers are weekend projects. @kirbah/mcp-youtube is built for reliable, daily, cost-effective agentic workflows.

> 🎯 Want feedback on your own channel, not just raw data? Check out
> CreatorLens - a companion Claude
> Skill built on this MCP that diagnoses common growth problems (weak
> hooks, bad thumbnails, flatlined videos) using a real strategist's
> framework, not just numbers.

📉 1. Save Up to 87% on Tokens (and Context Window)

The raw YouTube API returns massive JSON payloads filled with nested eTags, redundant thumbnails, and localization data that LLMs don't need. This server structures the data to give your LLM exactly what it needs to reason, and nothing else.```mermaid
%%{init: { "theme": "base", "themeVariables": { "xyChart": { "plotColorPalette": "#ef4444, #22c55e" } } } }%%
xychart-beta
title "Token Consumption (Lower is Better)"
x-axis ["getVideoDetails", "searchVideos", "getChannelStats"]
y-axis "Context Tokens" 0 --> 1200
bar "Raw YouTube API" [854, 1115, 673]
bar "MCP-YouTube (Optimized)" [209, 402, 86]


| API Method             | Raw YouTube Tokens | MCP-YouTube Tokens | Token Savings | Data Size       |
| :--------------------- | :----------------- | :----------------- | :------------ | :-------------- |
| `getChannelStatistics` | 673                | **86**             | **~87% Less** | 1.9 KB ➔ 0.2 KB |
| `getVideoDetails`      | 854                | **209**            | **~75% Less** | 2.9 KB ➔ 0.6 KB |
| `searchVideos`         | 1115               | **402**            | **~64% Less** | 3.4 KB ➔ 1.2 KB |

_(Curious? You can compare the raw API responses vs optimized outputs in the examples folder)._

### 🛡️ 2. Protect Your API Quotas (Smart Caching)

The YouTube Data API has strict daily limits (10,000 quota units). If your LLM gets stuck in a loop or re-asks a question, standard servers will drain your API limit in minutes.
This server includes an optional **MongoDB caching layer**. If your agent requests a video details or searches the same trending videos twice, the server serves it from the cache - costing you **0 API quota points**.

### 🏗️ 3. Production-Grade & Actively Maintained

Tired of MCP tools crashing your AI client? This server is built to be a rock-solid dependency:

- **97% Test Coverage:** Comprehensively unit-tested (check the Codecov badge).
- **Zero Lint Errors/Warnings:** Enforces strict, clean code (`npm run lint` passes 100%).
- **Active Security:** Automated Dependabot patching ensures underlying libraries are never left with known vulnerabilities.
- **Strict Type Safety:** Built using Zod validation and the robust MCP TypeScript Starter architecture.

---

## Quick Start: Installation

### 🟢 Zero-Config Mode (No API Key Required)

**Want to just fetch transcripts?** You can use this server immediately without any configuration! Just install and go. Add a YouTube API key later to unlock deep search and analytics.

The easiest way to install this server is by clicking the **"Add to Claude Desktop"** button on the Glama server page.

If you are configuring manually (e.g., in Cursor), just add this bare-minimum setup:```json
{
  "mcpServers": {
    "youtube": {
      "command": "npx",
      "args": ["-y", "@kirbah/mcp-youtube"]
    }
  }
}

✨ Tip: In Zero-Config mode, you can ask your AI to simply "Read the transcript for youtube://transcript/{videoId}"!

🟡 Manual Configuration (Unlock All Features)

If you prefer to configure your MCP client manually (e.g., Claude Desktop or Cursor), add the following to your configuration file:

  1. Get a YouTube Data API v3 Key (See Setup Instructions below).
  2. (Highly Recommended) Get a free MongoDB Connection String to enable quota-saving caching.```json
    {
    "mcpServers": {
    "youtube": {
    "command": "npx",
    "args": ["-y", "@kirbah/mcp-youtube"],
    "env": {
    "YOUTUBE_API_KEY": "YOUR_YOUTUBE_API_KEY_HERE",
    "MDB_MCP_CONNECTION_STRING": "mongodb+srv://user:pass@cluster0.abc.mongodb.net/youtube_niche_analysis"
    }
    }
    }
    }

_(Windows PowerShell Users: If `npx` fails, try using `"command": "cmd"` and `"args": ["/k", "npx", "-y", "@kirbah/mcp-youtube"]`)_

### Next Step: Add a Skill

Once your server is connected, try CreatorLens -
a Claude Skill built specifically for this MCP that turns raw YouTube data
into growth diagnostics (weak hooks, packaging, niche doubt, format pivots).

## Key Features

- **Optimized Video Information:** Search videos with advanced filters. Retrieve detailed metadata, statistics (views, likes, etc.), and content details, all structured for minimal token footprint.
- **Insightful Channel Analysis:** Get concise channel statistics (subscribers, views, video count) and discover a channel's top-performing videos without data bloat.
- **Lean Trend Discovery:** Find trending videos by region and category, and get lists of available video categories, optimized for quick AI processing.
- **Structured for AI:** All responses are designed to be easily parsable and immediately useful for language models.
- **Efficient Comment Retrieval:** Fetch video comments with fine-grained control over the number of results and replies, optimized for sentiment analysis and feedback extraction.

## Available Tools

The server provides the following MCP tools, each designed to return token-optimized data:

| Tool Name                       | Description                                                                                                                                  | Parameters (see details in tool schema)                                                                                                                   |
| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `getVideoDetails`               | Retrieves detailed, **lean** information for multiple YouTube videos including metadata, statistics, engagement ratios, and content details. | `videoIds` (array of strings)                                                                                                                             |
| `searchVideos`                  | Searches for videos or channels based on a query string with various filtering options, returning **concise** results.                       | `query` (string), `maxResults` (optional number), `order` (optional), `type` (optional), `channelId` (optional), etc.                                     |
| `getTranscripts`                | Retrieves **token-efficient** transcripts (captions) for multiple videos, with options for full text or key segments (intro/outro).          | `videoIds` (array of strings), `lang` (optional string for language code), `format` (optional enum: 'full_text', 'key_segments' - default 'key_segments') |
| `getChannelStatistics`          | Retrieves **lean** statistics for multiple channels (subscriber count, view count, video count, creation date).                              | `channelIds` (array of strings)                                                                                                                           |
| `getChannelTopVideos`           | Retrieves a list of a channel's top-performing videos with **lean** details and engagement ratios.                                           | `channelId` (string), `maxResults` (optional number)                                                                                                      |
| `getTrendingVideos`             | Retrieves a list of trending videos for a given region and optional category, with **lean** details and engagement ratios.                   | `regionCode` (optional string), `categoryId` (optional string), `maxResults` (optional number)                                                            |
| `getVideoCategories`            | Retrieves available YouTube video categories (ID and title) for a specific region, providing **essential data only**.                        | `regionCode` (optional string)                                                                                                                            |
| `getVideoComments`              | Retrieves comments for a YouTube video. Allows sorting, limiting results, and fetching a small number of replies per comment.                | `videoId` (string), `maxResults` (optional number), `order` (optional), `maxReplies` (optional number), `commentDetail` (optional string)                 |
| `findConsistentOutlierChannels` | Identifies channels that consistently perform as outliers within a specific niche. **Requires a MongoDB connection.**                        | `niche` (string), `minVideos` (optional number), `maxChannels` (optional number)                                                                          |

_For detailed input parameters and their descriptions, please refer to the `inputSchema` within each tool's configuration file in the `src/tools/` directory (e.g., `src/tools/video/getVideoDetails.ts`)._

> _**Note on API Quota Costs:** Most tools are highly efficient. `getVideoDetails`, `getChannelStatistics`, and `getTrendingVideos` cost only **1 unit** per call. The `getTranscripts` tool has **0** API cost. The new `getVideoComments` tool has a variable cost: the base call is **1 unit**, but if you request replies (by setting `maxReplies > 0`), it costs an **additional 1 unit for each top-level comment** it fetches replies for. The search-based tools are the most expensive: `searchVideos` costs **100 units** and `getChannelTopVideos` costs **101 units**._

## Advanced Usage & Local Development

If you wish to contribute, modify the server, or run it locally outside of an MCP client's managed environment:

### Prerequisites

- Node.js (version specified in `package.json` engines field - currently `>=22.0.0`)
- npm (usually comes with Node.js)
- A YouTube Data API v3 Key (see YouTube API Setup)

### Local Setup

1.  **Clone the repository:**```bash
    git clone https://github.com/kirbah/mcp-youtube.git
    cd mcp-youtube
    ```

2.  **Install dependencies:**```bash
    npm ci
    ```

3.  **Configure Environment:**
    Create a `.env` file in the root by copying `.env.example`:```bash
    cp .env.example .env
    ```
    Then, edit `.env` to add your `YOUTUBE_API_KEY`:```
    YOUTUBE_API_KEY=your_youtube_api_key_here
    MDB_MCP_CONNECTION_STRING=your_mongodb_connection_string_here
    ```

### Development Scripts```bash
# Run in development mode with live reloading
npm run dev

# Build for production
npm run build

# Run the production build (after npm run build)
npm start

# Lint files
npm run lint

# Run tests
npm run test
npm run test -- --coverage # To generate coverage reports

# Inspect MCP server using the Model Context Protocol Inspector
npm run inspector

Local Development with an MCP Client

To have an MCP client run your local development version (instead of the published NPM package):

  1. Ensure you have a script in package.json for a non-watching start, e.g.:json "scripts": { "start:client": "tsx ./src/index.ts" }

  2. Configure your MCP client to spawn this local script:json { "mcpServers": { "youtube_local_dev": { "command": "npm", "args": ["run", "start:client"], "working_directory": "/absolute/path/to/your/cloned/mcp-youtube", "env": { "YOUTUBE_API_KEY": "YOUR_LOCAL_DEV_API_KEY_HERE" } } } }
    Note on the env block above: Setting YOUTUBE_API_KEY directly in the env block for the client configuration is one way to provide the API key. Alternatively, if your server correctly loads its .env file based on the working_directory, you might not need to specify it in the client's env block, as long as your local .env file in the project root contains the YOUTUBE_API_KEY. The working_directory path must be absolute and correct for the server to find its .env file.

YouTube API Setup

  1. Go to the Google Cloud Console.
  2. Create a new project or select an existing one.
  3. In the navigation menu, go to "APIs & Services" > "Library".
  4. Search for "YouTube Data API v3" and Enable it for your project.
  5. Go to "APIs & Services" > "Credentials".
  6. Click "+ CREATE CREDENTIALS" and choose "API key".
  7. Copy the generated API key. This is your YOUTUBE_API_KEY.
  8. Important Security Step: Restrict your API key to prevent unauthorized use. Click on the API key name, and under "API restrictions," select "Restrict key" and choose "YouTube Data API v3." You can also add "Application restrictions" (e.g., IP addresses) if applicable.

System Requirements

  • Node.js: >=22.0.0 (as specified in package.json)
  • npm (for managing dependencies and running scripts)

Deep Dive: findConsistentOutlierChannels Tool

The findConsistentOutlierChannels tool is designed to identify emerging or established YouTube channels that consistently outperform their size within a specific niche. This tool is particularly useful for content creators, marketers, and analysts looking for high-potential channels.

Important Note: This tool requires a MongoDB connection to store and analyze channel data. Without MDB_MCP_CONNECTION_STRING configured, this tool will not be available.

Internal Logic Overview

The tool operates through a multi-phase analysis process, leveraging both YouTube Data API and a MongoDB database:

  1. Candidate Search (Phase 1):

    • Uses the provided query to search for relevant videos and channels on YouTube.
    • Filters initial results based on videoCategoryId and regionCode if specified.
    • Collects a broad set of potential channels for deeper analysis.
  2. Channel Filtering (Phase 2):

    • Retrieves detailed statistics for candidate channels (subscribers, total views, video count).
    • Filters channels based on channelAge (e.g., 'NEW' for channels under 6 months, 'ESTABLISHED' for 6-24 months).
    • Ensures channels meet a minimum video count to be considered for consistency.
  3. Deep Analysis (Phase 3):

    • For each filtered channel, fetches their recent top-performing videos.
    • Calculates a "viral factor" for each video (e.g., views relative to subscriber count).
    • Assesses the consistencyLevel (e.g., 'MODERATE' for ~30% of videos showing outlier performance, 'HIGH' for ~50%).
    • Determines outlierMagnitude (e.g., 'STANDARD' for views > subscribers, 'STRONG' for views > 3x subscribers).
  4. Ranking & Formatting (Phase 4):

    • Ranks channels based on their consistency, outlier magnitude, and overall performance within the niche.
    • Formats the results into a token-optimized structure suitable for LLMs, including key channel metrics and examples of outlier videos.

Key Parameters Controlling the Flow

The behavior of this tool is primarily controlled by the following parameters:

  • query (string, required): The central topic or niche to analyze (e.g., "DIY home repair", "quantum computing explained").
  • channelAge (enum: "NEW", "ESTABLISHED", default: "NEW"): Focuses the search on emerging or more mature channels.
  • consistencyLevel (enum: "MODERATE", "HIGH", default: "MODERATE"): Sets the threshold for how consistently a channel's videos must perform as outliers.
  • outlierMagnitude (enum: "STANDARD", "STRONG", default: "STANDARD"): Defines how significantly a video's performance must exceed typical expectations (e.g., views vs. subscribers) to be considered an "outlier."
  • videoCategoryId (string, optional): Narrows the search to a specific YouTube category ID.
  • regionCode (string, optional): Targets channels relevant to a particular geographical region.
  • maxResults (number, default: 10): Limits the number of top outlier channels returned.

Security Considerations

  • API Key Security: Your YOUTUBE_API_KEY is sensitive. Never commit it directly to your repository. Use environment variables (e.g., via a .env file which should be listed in .gitignore).
  • API Quotas: The YouTube Data API has a daily usage quota (default is 10,000 units). All tool calls deduct from this quota. Monitor your usage in the Google Cloud Console and be mindful of the cost of each tool. For a detailed breakdown of costs per API method, see the official documentation.
  • Input Validation: The server uses Zod for robust input validation for all tool parameters, enhancing security and reliability.

License

This project is licensed under the MIT License. See the LICENSE file for details.

常见问题

8 问
答案由本站依据条目字段整理,不引用上游原文
MCP Youtube 02bb5ce2 怎么安装?

资料没有给出安装命令,请到官方仓库或文档按说明接入;这类条目多数是生态应用,或尚未发布可安装包。

MCP Youtube 02bb5ce2 怎么在 Claude Desktop、Claude、Cursor 里配置?

它的传输方式未标注,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

MCP Youtube 02bb5ce2 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

MCP Youtube 02bb5ce2 需要 API Key 吗?

资料标注需要Token认证,使用前准备好对应凭据,并按最小权限配置。

MCP Youtube 02bb5ce2 支持哪些客户端?

资料标注支持 Claude Desktop、Claude、Cursor;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

MCP Youtube 02bb5ce2 能提供哪些能力?

资料显示能力标签包括 TypeScript、Claude、AI代理。具体工具清单以官方文档为准。

MCP Youtube 02bb5ce2 需要什么运行环境?

属于远程端点,不需要在本地装运行时。

MCP Youtube 02bb5ce2 是本地还是远程?

它是远程端点,连服务地址即可。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-05-17。