YouTube MCP 服务器
用于与 YouTube 数据交互的模型上下文协议 (MCP) 服务器。该服务器提供资源和工具,用于通过 stdio 接口查询 YouTube 视频、频道、评论和文字记录。
特征
使用高级过滤选项搜索 YouTube 视频
获取有关特定视频和频道的详细信息
比较多个视频的统计数据
按地区和类别发现热门视频
分析频道性能和视频统计数据
检索视频评论和文字记录/字幕
生成视频分析和文字记录摘要
先决条件
Node.js(v16+)
YouTube 数据 API 密钥
安装
通过 Smithery 安装
要通过Smithery自动为 Claude Desktop 安装 YouTube MCP 服务器:
手动安装
克隆此存储库:
安装依赖项:
在根目录中创建一个
.env
文件:
用法
构建和运行
构建项目:
运行服务器:
以开发模式运行:
清理构建工件:
Docker 部署
该项目包含一个用于容器化部署的Dockerfile:
API 参考
资源
youtube://video/{videoId}
- 获取特定视频的详细信息youtube://channel/{channelId}
- 获取有关特定频道的信息youtube://transcript/{videoId}
- 获取特定视频的成绩单可选查询参数:
?language=LANGUAGE_CODE
(例如en
、ko
、ja
)
工具
基本工具
search-videos
- 使用高级过滤选项搜索 YouTube 视频get-video-comments
- 获取特定视频的评论get-video-transcript
- 获取特定视频的文字记录(可选语言)enhanced-transcript
- 具有过滤、搜索和多视频功能的高级成绩单提取get-key-moments
- 从视频记录中提取带有时间戳的关键时刻,以便于导航get-segmented-transcript
- 将视频记录分成多个片段以便于分析
统计工具
get-video-stats
- 获取特定视频的统计信息get-channel-stats
- 获取订阅者数量、观看次数和其他频道统计数据compare-videos
- 比较多个视频的统计数据
发现工具
get-trending-videos
- 按地区和类别检索热门视频get-video-categories
- 获取特定区域可用的视频类别
分析工具
analyze-channel-videos
- 分析特定频道视频的表现趋势
提示
video-analysis
- 生成 YouTube 视频的分析transcript-summary
- 根据视频成绩单生成视频摘要,可自定义长度并提取关键字segment-by-segment-analysis
- 通过分析视频的每个片段提供内容的详细细分
示例
访问视频脚本
获取特定语言的成绩单
使用统计工具
使用成绩单摘要提示
使用增强转录工具
使用增强的转录分析功能
错误处理
服务器处理各种错误情况,包括:
API 密钥无效
未找到视频或频道
无法获取成绩单
网络问题
执照
麻省理工学院
致谢
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Tools
通过模型上下文协议实现与 YouTube 数据交互的服务器,允许用户搜索视频、检索有关视频/频道的详细信息以及获取评论。
Related MCP Servers
- AsecurityFlicenseAqualityThis server allows AI language models to interact with YouTube content through a standardized interface, providing features such as video and channel information retrieval, transcript management, and playlist operations.Last updated -7107340
- AsecurityAlicenseAqualityA Model Context Protocol server that enables access to YouTube video content through transcripts, translations, summaries, and subtitle generation in various languages.Last updated -53MIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that enables retrieval of transcripts from YouTube videos. This server provides direct access to video transcripts and subtitles through a simple interface, making it ideal for content analysis and processing.Last updated -116426MIT License
- -securityAlicense-qualityA Model Context Protocol server that enables searching YouTube videos, retrieving and storing transcripts, and performing semantic search over video content without using the official YouTube API.Last updated -6MIT License