
ia-programming/youtube-mcp 是从 https://github.com/ia-programming/youtube-mcp. 导入的 MCP 服务器候选
概览
ia-programming/youtube-mcp 是从 https://github.com/ia-programming/youtube-mcp. 导入的 MCP 服务器候选
概述(AI 翻译)
一个模型上下文协议(MCP)服务器,提供搜索 YouTube 视频、检索文字稿以及对视频内容进行语义搜索的工具。
支持我们
如果您觉得这个项目有帮助并希望支持未来的项目,欢迎请我们喝杯咖啡!您的支持帮助我们继续构建创新的人工智能解决方案。
您的贡献极大地激发了我们打造智能且用户友好应用的热情。
目录
- YouTube MCP 服务器
- 特色
- 先决条件
- 安装
- 运行服务器
- 1.直接法
- 2.配置以支持 Claude.app
- 可用工具
- 与MCP客户端一起使用
- 示例用法
- 调试
- 贡献
- 许可证
特色
- 在不使用官方API的情况下搜索YouTube视频
- 检索视频文字记录
- 将视频信息和文字记录存储在矢量数据库中
- 对存储的视频转录进行语义搜索
先修条件
- Python 3.8+
- 嵌入的 Google API 密钥
- UV包管理器
安装
-
克隆此仓库
-
利用UV创建并激活虚拟环境:
-
使用uv安装依赖:
-
创建一个“。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
YouTube MCP Server
A Model Context Protocol (MCP) server that provides tools for searching YouTube videos, retrieving transcripts, and performing semantic search over video content.
Support Us
If you find this project helpful and would like to support future projects, consider buying us a coffee! Your support helps us continue building innovative AI solutions.
Your contributions go a long way in fueling our passion for creating intelligent and user-friendly applications.
Table of Contents
- YouTube MCP Server
- Features
- Prerequisites
- Installation
- Running the Server
- Available Tools
- Using with MCP Clients
- Debugging
- Contributing
- License
Features
- Search YouTube videos without using the official API
- Retrieve video transcripts
- Store video information and transcripts in a vector database
- Perform semantic search over stored video transcripts
Prerequisites
- Python 3.8+
- Google API key for embeddings
- uv package manager
Installation
-
Clone this repository
-
Create and activate a virtual environment using uv:
uv venv
# On Windows:
.venv\Scripts\activate
# On Unix/MacOS:
source .venv/bin/activate
- Install dependencies using uv:
uv pip install -r requirements.txt
- Create a
.envfile with your Google API key:
GOOGLE_API_KEY=your_api_key_here
Running the Server
There are two ways to run the MCP server:
1. Direct Method
To start the MCP server directly:
uv run python server.py
2. Configure for Claude.app
Add to your Claude settings without using any package manager this works for windows:
"mcpServers": {
"youtube": {
"command": "C:\\Path\\To\\Your\\Project\\.venv\\Scripts\\python.exe",
"args": ["C:\\Path\\To\\Your\\Project\\server.py"],
"env": {
"GOOGLE_API_KEY": "your_api_key_here"
}
}
}
Using Uv package manager this works for windows:
"mcpServers": {
"youtube": {
"command": "uv",
"args": ["--directory", "C:\\Path\\To\\Your\\Project", "run", "server.py"],
"env": {
"GOOGLE_API_KEY": "your_api_key_here"
}
}
}
Available Tools
The server provides the following tools:
search-youtube: Search for YouTube videos based on a query- Parameters:
- query: Search query string
- max_results: Maximum number of results to return (default: 5)
- Parameters:
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
"mcpServers": {
"youtube": {
"command": "C:\\Path\\To\\Your\\Project\\.venv\\Scripts\\python.exe",
"args": ["C:\\Path\\To\\Your\\Project\\server.py"],
"env": {
"GOOGLE_API_KEY": "your_api_key_here"
}
}
}