Token导航 LogoToken导航TokenDH.com
YouTube Ultimate Toolkit MCP logo
浏览器工具未说明官方级别未说明来源级核验

YouTube Ultimate Toolkit MCP

MCP Server

一个强大的模型上下文协议(MCP)服务器,为Claude AI提供对YouTube内容的全面访问,包括转录、元数据、评论、截图和音频剪辑。

工具数

5

提示词数

0

GitHub Stars

3

资源数

0
视频处理JavaScriptClaude数据提取Claude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

Comzee

提供方

Comzee

最后核验

2026/5/17 20:21

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

一个强大的模型上下文协议(MCP)服务器,使Claude AI能够完全访问YouTube内容——转录本、元数据、评论、屏幕截图和音频片段。

适用于Claude Desktop(本地)和Claude Web UI(使用OAuth远程)。

演示

Demo

观看完整演示视频(MP4)

为什么选择MCP?

功能此MCP大多数其他
成绩单
时间戳一些
时间范围过滤稀有
成绩单搜索稀有
关键段(钩/支腿)
元数据
播放列表一些
评论非常罕见
屏幕截图1-2其他
音频剪辑
所有URL格式部分
OAuth 2.1+PKCE
密码保护
速率限制
Claude Web UI支持很少

特性

工具说明
get_video使用搜索、时间戳和时间范围获取视频元数据和转录
get_playlist列出播放列表中的所有视频
get_comments获取包含点赞和回复数的热门评论
get_screenshot在任何时间戳捕获视频帧
get_audio提取音频片段(最多120秒)用于语音/音乐分析

快速开始

选项1:本地模式(克劳德桌面)

# Install
git clone https://github.com/Comzee/Youtube-Ultimate-Toolkit-MCP.git
cd Youtube-Ultimate-Toolkit-MCP
npm install
npm run build

# Run
node dist/index.js

添加到Claude桌面配置(~/.config/claude/claude_desktop_config.json 在Linux上, ~/Library/Application Support/Claude/claude_desktop_config.json 在macOS上):

{
  "mcpServers": {
    "youtube": {
      "command": "node",
      "args": ["/path/to/Youtube-Ultimate-Toolkit-MCP/dist/index.js"]
    }
  }
}

选项2:远程模式(Claude Web UI)

远程模式需要OAuth设置和公共URL。请参阅 远程模式设置 在......下面

先决条件

  • Node.js 18+
  • yt-dlp -YouTube内容提取器(必须保持更新)
  • FFmpeg -用于截图和音频提取(可选)
  • YouTube API密钥 -仅用于评论功能(可选)

安装先决条件

Ubuntu/Debian:

# Node.js 18+
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt install -y nodejs

# yt-dlp (keep updated - YouTube breaks old versions frequently)
pip3 install --upgrade yt-dlp

# ffmpeg (for screenshots and audio)
sudo apt install ffmpeg

macOS:

brew install node yt-dlp ffmpeg

窗户:

# Install Node.js from https://nodejs.org
# Install yt-dlp: pip install yt-dlp
# Install ffmpeg from https://ffmpeg.org/download.html

保持yt-dlp更新

YouTube经常更改其API。如果成绩单停止工作,请更新yt-dlp:

pip3 install --upgrade yt-dlp
# or on systems that complain about externally-managed packages:
pip3 install --upgrade --break-system-packages yt-dlp

安装

git clone https://github.com/Comzee/Youtube-Ultimate-Toolkit-MCP.git
cd Youtube-Ultimate-Toolkit-MCP
npm install
npm run build

远程模式设置

远程模式允许您通过HTTPS和OAuth身份验证将此MCP与Claude Web UI(Claude.ai)一起使用。

1.配置环境

cp .env.example .env

编辑 .env:

# OAuth credentials
OAUTH_CLIENT_ID=youtube-mcp-client
OAUTH_CLIENT_SECRET=your-secret-here  # Generate: openssl rand -hex 32

# Password for the consent page (bcrypt hash)
# Generate: node -e "require('bcrypt').hash('your-password', 12).then(console.log)"
AUTH_PASSWORD_HASH=$2b$12$...your-hash-here...

# Optional: YouTube API key for get_comments tool
YOUTUBE_API_KEY=your-api-key-here

2.启动服务器

# Development
npm run start:remote

# Production (with systemd)
sudo cp youtube-mcp.service /etc/systemd/system/
# Edit the service file to set your username and paths
sudo nano /etc/systemd/system/youtube-mcp.service
sudo systemctl daemon-reload
sudo systemctl enable youtube-mcp
sudo systemctl start youtube-mcp

3.设置HTTPS(必填)

Claude Web UI需要HTTPS。使用nginx作为反向代理:

server {
    listen 443 ssl;
    server_name your-domain.com;

    ssl_certificate /path/to/fullchain.pem;
    ssl_certificate_key /path/to/privkey.pem;

    location / {
        proxy_pass http://localhost:3010;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;

        # WebSocket support
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";

        # Important for long-running requests
        proxy_buffering off;
        proxy_cache off;
        proxy_read_timeout 86400s;
        proxy_send_timeout 86400s;
        proxy_set_header X-Accel-Buffering no;
    }
}

4.连接Claude Web用户界面

  1. 首选 设置连接器添加自定义连接器
  2. 输入URL: https://your-domain.com/mcp
  3. 开始新的聊天并启用MCP
  4. 让Claude获取YouTube视频-将出现授权弹出窗口
  5. 在同意页面上输入密码,然后单击“授权”

工具参考

获取_视频

获取视频元数据和英文成绩单。

参数:

参数必填说明
urlYouTube URL(任何格式)或视频ID
includeTimestamps添加 [M:SS] 每行的时间戳
startTime转录范围的开始时间(例如“60”、“1:00”)
endTime成绩单范围的结束时间
searchTerm搜索成绩单并突出显示匹配项
keySegmentsOnly仅返回钩子(前40秒)和外旋(后30秒)

支持的URL格式:

  • youtube.com/watch?v=VIDEO_ID
  • youtu.be/VIDEO_ID
  • youtube.com/shorts/VIDEO_ID
  • youtube.com/live/VIDEO_ID
  • youtube.com/embed/VIDEO_ID
  • m.youtube.com/watch?v=VIDEO_ID
  • music.youtube.com/watch?v=VIDEO_ID
  • 直接视频ID: dQw4w9WgXcQ

get_playlist

在YouTube播放列表中列出视频。

参数:

参数必填说明
urlYouTube播放列表URL
limit要返回的最大视频数(默认值:50,最大值:200)

获取_注释

从视频中获取热门评论。 需要 YOUTUBE_API_KEY 在.env中。

参数:

参数必填说明
urlYouTube视频URL或ID
maxResults评论数(默认值:25,最大值:100)
order排序:“相关性”(默认)或“时间”

get_creenshot

从视频中捕获一帧。 需要ffmpeg。

参数:

参数必填说明
urlYouTube视频URL
timestamp捕获时间(默认值:“0”)。格式:“30”、“1:30”和“1:30:00”

退货: Base64编码的JPEG图像

获取音频

提取音频片段进行分析。 需要ffmpeg。

参数:

参数必填说明
urlYouTube视频URL
startTime开始时间(默认值:“0”)
endTime结束时间(可选)
maxDuration最大秒数(默认值:60,最大值:120)

退货: Base64编码MP3音频(128kbps)

OAuth和安全

远程模式使用PKCE实现OAuth 2.1以进行安全身份验证。

运作原理

  1. 克劳德连接到 /mcp -发现/握手方法无需身份验证即可工作
  2. 当您使用工具时,Claude会收到一个401,其中包含OAuth发现信息
  3. Claude执行动态客户端注册
  4. 浏览器打开同意页面-您输入密码
  5. Claude将身份验证码交换为访问令牌
  6. 后续请求使用Bearer令牌

安全特性

功能保护
密码保护的同意只有您可以授权访问
Bcrypt密码哈希安全存储密码
速率限制每个IP 5次尝试,然后锁定10分钟
XSS保护所有OAuth参数HTML转义
命令注入保护yt-dlp生成于 shell: false
PKCE(S256)防止授权码被拦截

故障排除

“没有可用的英语成绩单”

更新yt-dlp-YouTube经常更改:

pip3 install --upgrade yt-dlp

MCP无法从Claude Web UI连接

  • 确保HTTPS配置正确
  • 检查服务状态: sudo systemctl status youtube-mcp
  • 检查日志: sudo journalctl -u youtube-mcp -f

OAuth流未启动

  • 验证 .well-known/ 端点返回200(不是401)
  • 检查浏览器控制台是否存在CORS错误
  • 确保 /register 返回有效凭据

授权窗口未出现

  • OAuth首先触发 工具使用,未连接
  • 开始聊天,启用MCP,然后让Claude获取YouTube视频

克劳德使用了错误/旧的工具

在Claude设置中断开并重新连接MCP以刷新工具列表。

克劳德项目提示

在Claude项目中使用此提示自动利用MCP:

You have access to the YouTube MCP server. When I share a YouTube URL:
1. Automatically fetch the transcript with get_video
2. Provide a summary, key takeaways, and notable quotes
3. For long videos (10+ min), consider using keySegmentsOnly=true first

Available tools:
- get_video: Transcript and metadata (supports timestamps, time ranges, search)
- get_playlist: List videos in a playlist
- get_comments: Top comments (requires API key)
- get_screenshot: Capture frames at any timestamp
- get_audio: Extract audio clips for analysis (max 120s)

建筑

  • 运输: 可流式HTTP(MCP规范2025-03-26)
  • 会议: 具有UUID标识符的状态(内存中)
  • OAuth: 授权码+PKCE,动态客户端注册
  • 代币: 内存存储(重启时丢失)

许可证

麻省理工学院-参见 许可证 了解详情。

贡献

欢迎投稿!请在GitHub上打开问题或PR。

目录标签

目录标签

视频处理JavaScriptClaude数据提取YouTube内容访问本地部署AI工具自动化

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

oauth

工具数量(toolCount,工具数)

5

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明oauth部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP