YouTube MCP

MCP搜索检索

提供方 coyaSONG · 包名 @smithery/cli

搜索检索 stdio · 本地进程 无需鉴权 社区 / 第三方 Claude DesktopClaude
查看接入方式

Youtube mcp server

一句话选型结论

按资料字段整理

YouTube MCP 属于搜索检索类 MCP 服务器,stdio · 本地进程,无需鉴权,可直接接入 Claude Desktop、Claude,有可直接复制的远程端点配置。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

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

工具与能力

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

能力标签

支持客户端

适用场景

research-and-dataYouTube数据分析JavaScript本地部署视频内容分析字幕提取频道统计视频搜索

安装与配置

stdio · 本地进程 无需鉴权
客户端在本机拉起子进程,数据不出本机
npx -y @smithery/cli install @coyaSONG/youtube-mcp-server --client claude

这条命令只是入口,具体启动参数请按官方文档补齐,不要直接照搬到别的服务器。

  1. 1
    准备运行环境

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

  2. 2
    安装服务

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

  3. 3
    写入客户端配置

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

  4. 4
    验证是否可用

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

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
联网搜索取证

让模型查最新资料并给出出处。

资料聚合

把一个主题的网页、文档集中抓回来整理。

情报与竞品检索

按关键词持续检索行业动态和竞品信息。

选择建议

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

值得选的地方

  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 已适配 Claude Desktop、Claude,换客户端不用重新研究配置。
  • 资料标注无需鉴权,装好就能连。

先想清楚的地方

  • stdio 方式要求本地装好运行时(如 Node.js),换机器要重新装一遍。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

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

不太适合

  • 完全不想在本地装环境的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
YouTube MCP当前 未标注 stdio · 本地进程 支持远程部署 有 2026-05-18
Brave Search 433812ff 2 未标注 未标注 无 2026-05-17
Sequentialthinking 1 SSE · 服务端推送 远程部署 有 2026-05-18
Baidu Netdisk 未标注 未标注 未标注 无 2026-05-17
ragflow 未标注 stdio · 本地进程 本地部署 有 2026-04-11
mindsdb (430e18) 未标注 未标注 未标注 有 2026-05-17

服务器档案

搜索检索
字段来自项目仓库与公开索引,中文说明由本站标注
提供方coyaSONG上游标注的维护方 coyaSONG
分类搜索检索本站按上游分类展示
连接方式stdio · 本地进程客户端在本机拉起子进程,数据不出本机
鉴权方式无需鉴权远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时@smithery/cli · Node.js本地安装时用到的包标识与运行时
部署类型支持远程部署上游给出的部署形态
最近核验2026-05-18上游最后核验时间

详细介绍

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

YouTube Research MCP

Turn YouTube videos into citation-ready research for Codex, Claude, Cursor, and other MCP clients. Paste a video URL and get transcript evidence with timestamps and links that open at the exact quoted moment.```text
Input: https://youtu.be/dQw4w9WgXcQ
Output: [01:05] ...evidence text...
https://www.youtube.com/watch?v=dQw4w9WgXcQ&t=65s


No YouTube API key is required for transcript research.

## Why this server

- **Citation-ready research** — every transcript segment includes a timestamp and source URL.
- **Zero-key quick start** — transcripts work immediately; add an API key only for search and analytics.
- **URL-first input** — accepts normal, short, Shorts, embed, live, and raw video-ID formats.
- **Agent-efficient filtering** — search inside transcripts and return nearby context instead of spending tokens on the entire video.
- **Full YouTube intelligence** — optional API mode adds comments, video/channel statistics, trends, and comparisons.
- **Remote-native MCP** — Streamable HTTP transport at `/mcp`, plus Docker and Smithery support.

## Architecture and trust boundary```mermaid
flowchart LR
    C[MCP client] -->|stdio or Streamable HTTP| T[Transport]
    T --> R[Tool and resource registry]
    R --> S[YouTubeService]
    S --> K[(In-memory cache)]
    S -->|no key required| YT[Caption tracks]
    S -->|optional API key| API[YouTube Data API v3]

The MCP layer validates inputs and returns structured evidence; it does not ask a model to invent summaries or citations. Transcript tools derive timestamps and canonical links from caption segments. Data API tools return an explicit key-required error when YOUTUBE_API_KEY is unavailable, and remote authentication is enforced before MCP session handling.

Focused evidence, not a transcript dump

The included live smoke test asks a focused question about a public video and compares the response with the full timestamped transcript:

Response Characters returned
Full transcript 85,518
research-video (3 citations with source identity) 1,550
Reduction 98.2%

This measures response characters, not model-specific tokens. Reproduce it against the default public fixture—or substitute your own video and query:```bash
npm run test:live
LIVE_TEST_VIDEO='https://youtu.be/VIDEO_ID' LIVE_TEST_QUERY='evaluation' npm run test:live


## Quick start — no API key

Requirements: Node.js 22 or newer.

The shortest local install uses stdio and needs no API key:```bash
codex mcp add youtube-research -- npx -y @coyasong/youtube-mcp-server@latest

For Claude Desktop and other MCPB-compatible desktop clients, download the
latest one-click MCP bundle
and open it. The bundle vendors its runtime dependencies, starts locally over
stdio, and asks for a YouTube API key only if you want the optional analytics
tools.

Or install from the VS Code command line:```bash
code --add-mcp '{"name":"youtube-research","command":"npx","args":["-y","@coyasong/youtube-mcp-server@latest"]}'


For Claude Desktop, Cursor, and other stdio clients, use command `npx` with arguments `-y @coyasong/youtube-mcp-server@latest`.

To run the Streamable HTTP transport instead:```bash
git clone https://github.com/coyaSONG/youtube-mcp-server.git
cd youtube-mcp-server
npm install
npm run build
npm start

The server starts at http://localhost:3000/mcp in transcript-only mode. Confirm it with:```bash
curl http://localhost:3000/health


### Connect from Codex

With the HTTP server running:```bash
codex mcp add youtube-research --url http://localhost:3000/mcp

Then ask Codex:```text
Use research-video to find what this video says about evaluation,
and cite the exact moments: https://www.youtube.com/watch?v=VIDEO_ID


### Connect with MCP Inspector```bash
npx @modelcontextprotocol/inspector
# Connect to http://localhost:3000/mcp

Install through Smithery```bash

npx -y smithery@latest auth login
npx -y smithery@latest mcp add coyaSONG/youtube-mcp-server --client claude


## Enable search, comments, and analytics

Set a YouTube Data API v3 key to switch from `transcript-only` to `full` mode:```bash
export YOUTUBE_API_KEY=your_key_here
npm start

YOUTUBE_API_KEY is optional. PORT defaults to 3000. For stdio clients, set YOUTUBE_API_KEY in the MCP server environment configuration.

Secure a remote deployment

Do not expose a full-mode server publicly without authentication: unauthenticated users could consume your YouTube API quota. Set a strong bearer token and restrict browser origins when deploying outside localhost:```bash
export MCP_BEARER_TOKEN='replace-with-a-long-random-secret'
export CORS_ORIGIN='https://your-client.example'
export MAX_SESSIONS=100
export SESSION_IDLE_TIMEOUT_MS=1800000
npm start


Browser origins are denied by default. `CORS_ORIGIN` accepts a comma-separated
allowlist of exact `http://` or `https://` origins; wildcard origins are rejected.

Connect Codex using an environment variable rather than writing the secret into its configuration:```bash
export YOUTUBE_MCP_TOKEN='replace-with-a-long-random-secret'
codex mcp add youtube-research \
  --url https://your-server.example/mcp \
  --bearer-token-env-var YOUTUBE_MCP_TOKEN

/health remains public for container health checks. MCP requests return 401 when authentication is enabled and the bearer token is missing or invalid. Idle sessions are removed automatically, and MAX_SESSIONS bounds memory use.

Best first tool

research-video accepts:

  • video: a YouTube URL or 11-character video ID
  • language: optional caption language such as en, ko, or ja
  • query: optional phrase to find inside the transcript
  • contextLines: surrounding segments to retain, from 0 to 5
  • matchMode: word (default) or substring
  • startSeconds / endSeconds: optional time window
  • offset: result offset for pagination
  • maxSegments: response cap from 1 to 1,000 (default: 200)

It returns structured JSON containing the video title and channel identity, canonical video URL, full caption-track duration and segment count, matching transcript segments, human-readable citation labels, timestamps, directly navigable citation URLs, and pagination metadata. For long videos, use a query or time window first; follow nextOffset only when more evidence is needed.

Compare evidence across videos

research-videos applies one focused query to 2–5 video URLs concurrently. It returns the same structured, timestamp-linked evidence for each source while capping results per video. This is useful for comparing interviews, checking whether multiple sources support a claim, or researching a topic across a short watchlist.```json
{
"videos": [
"https://youtu.be/VIDEO_ONE",
"https://youtu.be/VIDEO_TWO"
],
"query": "evaluation",
"maxSegmentsPerVideo": 10
}


See YouTube Research Recipes for copy-paste workflows for
fact-checking claims, comparing interviews, navigating long talks, researching
multilingual captions, and building citation-ready notes.

## Capability modes

| Capability | No-key mode | With `YOUTUBE_API_KEY` |
|---|:---:|:---:|
| Transcript research, filtering, key moments, segmentation, summaries | Yes | Yes |
| Video search and comments | No | Yes |
| Video/channel metadata, statistics, trends, and comparisons | No | Yes |

Captions must be available for the requested video. Age-restricted, private, region-restricted, or caption-disabled videos may not return a transcript.

If this project saves you research time, consider
starring the repository so
other agent builders can discover it.

See the broader AI tooling portfolio for the
reliability principles shared with `ralph-research` and `tmuxicate`.

## Docker```bash
docker build -t youtube-research-mcp .
docker run --rm -p 3000:3000 youtube-research-mcp

# Full mode
docker run --rm -p 3000:3000 -e YOUTUBE_API_KEY=your_key youtube-research-mcp

Development```bash

npm run dev # HTTP server from TypeScript
npm test # build and run all tests
npm run test:live # live public-video transcript and citation smoke test
npm run test:user # clean-room smoke test against the published npm package
npm run test:mcpb # build, unpack, and exercise the installable MCP bundle


Maintainers can follow the release guide. Published GitHub
releases run the complete npm, MCP Registry, MCPB, and Smithery delivery pipeline.

## API Reference

### Resources

- `youtube://video/{videoId}` - Get detailed information about a specific video
- `youtube://channel/{channelId}` - Get information about a specific channel
- `youtube://transcript/{videoId}` - Get transcript for a specific video
  - Optional query parameter: `?language=LANGUAGE_CODE` (e.g., `en`, `ko`, `ja`)

### Tools

#### Basic Tools
- `research-video` - Get citation-ready transcript evidence from a URL or video ID without an API key
- `research-videos` - Compare timestamp-linked evidence across 2–5 videos without an API key
- `search-videos` - Search for YouTube videos with advanced filtering options
- `get-video-comments` - Get comments for a specific video
- `get-video-transcript` - Get transcript for a specific video with optional language
- `enhanced-transcript` - Advanced transcript extraction with filtering, search, and multi-video capabilities
- `get-key-moments` - Extract key moments with timestamps from a video transcript for easier navigation
- `get-segmented-transcript` - Divide a video transcript into segments for easier analysis

Tools requiring `YOUTUBE_API_KEY` are search, comments, statistics, discovery, and channel analysis. `enhanced-transcript` needs the key only when `includeMetadata` is `true`.

#### Statistical Tools
- `get-video-stats` - Get statistical information for a specific video
- `get-channel-stats` - Get subscriber count, view count, and other channel statistics
- `compare-videos` - Compare statistics across multiple videos

#### Discovery Tools
- `get-trending-videos` - Retrieve trending videos by region and category
- `get-video-categories` - Get available video categories for a specific region

#### Analysis Tools
- `analyze-channel-videos` - Analyze performance trends of videos from a specific channel

### Prompts

- `video-analysis` - Generate an analysis of a YouTube video
- `transcript-summary` - Generate a summary of a video based on its transcript with customizable length and keywords extraction
- `segment-by-segment-analysis` - Provide detailed breakdown of content by analyzing each segment of the video

## Examples

### Accessing a Video Transcript```
youtube://transcript/dQw4w9WgXcQ

Getting a Transcript in a Specific Language```

youtube://transcript/dQw4w9WgXcQ?language=en


### Using the Statistical Tools```javascript
// Get video statistics
{
  "type": "tool",
  "name": "get-video-stats",
  "parameters": {
    "videoId": "dQw4w9WgXcQ"
  }
}

// Compare multiple videos
{
  "type": "tool",
  "name": "compare-videos",
  "parameters": {
    "videoIds": ["dQw4w9WgXcQ", "9bZkp7q19f0"]
  }
}

Using the Transcript Summary Prompt```javascript

{
"type": "prompt",
"name": "transcript-summary",
"parameters": {
"videoId": "dQw4w9WgXcQ",
"language": "en"
}
}


### Using the Enhanced Transcript Tool```javascript
// Basic multi-video transcript extraction
{
  "type": "tool",
  "name": "enhanced-transcript",
  "parameters": {
    "videoIds": ["dQw4w9WgXcQ", "9bZkp7q19f0"],
    "format": "timestamped"
  }
}

// With search and time filtering
{
  "type": "tool",
  "name": "enhanced-transcript",
  "parameters": {
    "videoIds": ["dQw4w9WgXcQ"],
    "filters": {
      "timeRange": {
        "start": 60,  // Start at 60 seconds
        "end": 180    // End at 180 seconds
      },
      "search": {
        "query": "never gonna",
        "contextLines": 2
      }
    },
    "format": "merged"
  }
}

// With duration-based segmentation for easier analysis
{
  "type": "tool",
  "name": "enhanced-transcript",
  "parameters": {
    "videoIds": ["dQw4w9WgXcQ"],
    "filters": {
      "segment": {
        "count": 5,
        "method": "smart"  // Balances caption duration across segments
      }
    },
    "format": "timestamped",
    "language": "en"
  }
}

Using the Enhanced Transcript Analysis Features```javascript

// Get key moments from a video
{
"type": "tool",
"name": "get-key-moments",
"parameters": {
"videoId": "dQw4w9WgXcQ",
"maxMoments": 5
}
}

// Get a segmented transcript
{
"type": "tool",
"name": "get-segmented-transcript",
"parameters": {
"videoId": "dQw4w9WgXcQ",
"segmentCount": 4
}
}

// Get a segment-by-segment analysis
{
"type": "prompt",
"name": "segment-by-segment-analysis",
"parameters": {
"videoId": "dQw4w9WgXcQ",
"segmentCount": 4
}
}

// Get customized transcript summary
{
"type": "prompt",
"name": "transcript-summary",
"parameters": {
"videoId": "dQw4w9WgXcQ",
"language": "en",
"summaryLength": "detailed",
"includeKeywords": true
}
}
```

Error Handling

The server handles various error conditions, including:

  • Invalid or missing API key for Data API tools
  • Video or channel not found
  • Transcript not available
  • Network issues

License

MIT

Acknowledgements

  • Model Context Protocol TypeScript SDK
  • YouTube Data API
  • YouTube.js

Comment pagination and evidence limits

search-videos accepts the provider pageToken. get-video-comments preserves the next top-level token and accepts searchTerms for YouTube-side filtering.

Use includeReplies: true for the embedded reply subset, or completeReplies: true for bounded reply pagination. Full retrieval defaults to 100 replies per thread; maxRepliesPerThread accepts 1–1000. Across all threads, each call returns at most 1000 replies and 1 MiB of reply JSON and makes at most 20 additional reply requests. Each Data API request times out after 10 seconds and does not retry automatically.

Inspect each thread's replyCoverage: available is the provider's reported count, returned counts unique replies, complete confirms full observed coverage, and truncated indicates a local budget or pagination guard stopped collection. Counts may change while YouTube comments are being edited. Missing IDs or early provider termination do not establish complete coverage. Reduce the top-level maxResults to reserve more of the shared budget for each thread; pageToken continues top-level threads, not an incomplete reply list.

Research source metadata includes captionRequestedLanguage, captionTrackLanguage, captionLanguage, captionOrigin (manual, youtube_asr, or translated) and captionSourceOrigin. Unknown provenance is null.

常见问题

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

在客户端按下面的安装命令接入:npx -y @smithery/cli install @coyaSONG/youtube-mcp-server --client claude。对应的包名是 @smithery/cli。装完在客户端配置里引用同一个包或端点。

YouTube MCP 怎么在 Claude Desktop、Claude 里配置?

它的传输方式是stdio · 本地进程,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

YouTube MCP 收费吗?

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

YouTube MCP 需要 API Key 吗?

资料标注为无需认证,装好就能连;如果实际调用时报鉴权错误,按官方文档补上凭据。

YouTube MCP 支持哪些客户端?

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

YouTube MCP 能提供哪些能力?

资料显示能力标签包括 JavaScript、Claude、搜索。具体工具清单以官方文档为准。

YouTube MCP 需要什么运行环境?

运行时为 Node.js;属于本地进程,需要在本机装好运行环境。

YouTube MCP 是本地还是远程?

它是本地进程(stdio),由客户端在本机拉起。传输方式为stdio · 本地进程。

热门专题

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

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