Youtube MCP 服务器
关于
该服务器是 Youtube API 和 AI 助手之间的桥梁,基于模型上下文协议。
什么是 MCP?
模型上下文协议 (MCP) 是一个允许 AI 应用(例如 Claude Desktop)连接到外部工具和数据源的系统。它为 AI 助手提供了一种清晰、安全的方式,使其能够使用本地服务和 API,同时保持用户的控制权。
这个服务器是做什么的?
- [x] 下载指定视频的隐藏字幕
实际用例
- [x] 创建视频摘要
先决条件
安装
[!NOTE] 如果您已经安装了服务器,则可以使用
uv tool upgrade --reinstall
命令进行更新。
[!NOTE] 如果要删除服务器,请使用
uv tool uninstall mcp-youtube
命令。
配置
Claude桌面配置
配置 Claude Desktop 以识别 Youtube MCP 服务器。
- 打开Claude桌面配置文件:
- 在 MacOS 中,配置文件位于
~/Library/Application Support/Claude/claude_desktop_config.json
- 在 Windows 中,配置文件位于
%APPDATA%\Claude\claude_desktop_config.json
**注意:**您还可以在 Claude Desktop 应用程序的设置中找到 claude_desktop_config.json
- 在 MacOS 中,配置文件位于
- 添加服务器配置
发展
入门
- 克隆存储库
- 安装依赖项
- 运行服务器
可以将工具添加到src/mcp_youtube/tools.py
文件中。
如何添加新工具:
- 创建一个继承自 ToolArgs 的新类该类的属性将用作该工具的参数。类的文档字符串将用作工具的描述。
- 为新类实现 tool_runner 函数该函数应返回 TextContent、ImageContent 或 EmbeddedResource 的序列。该函数应为异步函数,并接受新类的单个参数。
- 完成!重启客户端,新工具就可以使用了。
验证可以通过 Claude Desktop 或直接运行工具来完成。
在检查器中调试服务器
MCP 检查器是一款使用精美 UI 帮助调试服务器的工具。要运行它,请使用以下命令:
故障排除
消息“无法连接到 MCP 服务器 mcp-youtube”
如果您在 Claude Desktop 中看到消息“无法连接到 MCP 服务器 mcp-youtube”,则表示服务器配置不正确。
请尝试以下操作:
- 在配置文件中使用
mcp-youtube
二进制文件的完整路径
You must be authenticated.
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
连接 YouTube API 和 AI 助手,通过下载和处理隐藏字幕来实现视频分析,从而创建 YouTube 视频摘要。
Related Resources
Related MCP Servers
- -securityFlicense-qualityThis 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 -169179TypeScript
- -securityFlicense-qualityThe MCP Server integrates APIs from the Youtube-Summarizer as tools within the MCP protocol, allowing for local AI application interaction and tool utilization through natural language queries.Last updated -Python
- -securityFlicense-qualityEnables AI applications to integrate with YouTube-Summarizer's APIs through the MCP protocol, offering local tool-based interaction for summarizing YouTube content.Last updated -1Python
- -securityFlicense-qualityEnables AI language models to interact with YouTube content through a standardized interface, providing tools for retrieving video information, transcripts, channel analytics, and trend analysis.Last updated -8521JavaScript