YouTube MCP 服务器
用于与 YouTube 视频交互的模型上下文协议 (MCP) 服务器。该服务器提供用于提取视频元数据和字幕的工具,并使用各种模板将其转换为 Markdown 格式。
特征
- 视频元数据:获取全面的视频信息
- 字幕提取:支持自动生成和手动字幕
- 多种语言:内置英语和法语支持
- 模板系统:内置三个markdown模板:
- 基础:简单的成绩单格式
- 详细信息:带有时间戳的完整元数据
- 搜索:结果突出显示并显示上下文
- 搜索功能:在视频字幕内搜索
- 灵活的身份验证:支持 API 密钥和 OAuth2 身份验证
先决条件
- Node.js(v16 或更高版本)
- npm 或 yarn
- YouTube 数据 API 密钥和/或 OAuth2 凭据
安装
- 克隆存储库:
- 安装依赖项:
- 构建项目:
配置
使用您的 YouTube 凭据在根目录中创建一个.env
文件:
MCP 配置
将服务器添加到您的 MCP 设置文件(通常位于~/.config/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json
):
用法
该服务器提供以下工具:
1. 获取视频信息
2. 获取字幕
3. 转换为 Markdown
4. 列表模板
依赖项
OAuth2 设置
对于 OAuth2 身份验证(私人视频访问所需):
- 在Google Cloud Console中创建项目
- 启用 YouTube 数据 API v3
- 创建 OAuth2 凭据(Web 应用程序类型)
- 运行身份验证脚本:
- 按照浏览器提示授权应用程序
- 将刷新令牌复制到您的配置中
自定义模板
您可以通过修改src/index.ts
中的DEFAULT_TEMPLATES
数组来添加自定义模板。模板遵循以下结构:
执照
麻省理工学院
贡献
- 分叉存储库
- 创建你的功能分支(
git checkout -b feature/amazing-feature
) - 提交您的更改(
git commit -m 'Add some amazing feature'
) - 推送到分支(
git push origin feature/amazing-feature
) - 打开拉取请求
This server cannot be installed
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.
通过提取元数据、多种语言的字幕以及使用各种模板将内容转换为 markdown,实现与 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 -7182205TypeScript
DeepSRT MCP Serverofficial
AsecurityFlicenseAqualityAn MCP server that enables users to generate summaries of YouTube videos in multiple languages and formats through integration with DeepSRT's API.Last updated -133JavaScript- -securityFlicense-qualityEnables extraction of transcript text from YouTube videos by providing the video URL, supporting standard, shortened, and embed URL formats.Last updated -1JavaScript
- -securityAlicense-qualityA Model Context Protocol server that enables retrieval of transcripts from YouTube videos with language-specific support.Last updated -526MIT License