YouTube Knowledge MCP
A Model Context Protocol (MCP) server that gives AI assistants the ability to search, analyze, and extract knowledge from YouTube videos.
README
YouTube Knowledge MCP
A Model Context Protocol (MCP) server that gives AI assistants the ability to search, analyze, and extract knowledge from YouTube videos. Works with Claude Desktop, Claude Code, Claude.ai, Cursor and any MCP-compatible client.
Supports both local (stdio) and remote (Streamable HTTP) transports.
![]()
Features
- Search videos by keyword or phrase
- Fetch videos from playlists or channels
- Get video info (title, channel, duration, views, likes, comments, description, tags)
- Extract transcripts (auto-generated or manual captions)
- Get chapters (timestamps and structure)
- Get comments (top comments sorted by popularity)
- Get channel info (name, handle, subscriber count, description)
- List formats (available download resolutions and codecs)
- Download videos with quality selection (local mode only)
- Save to library (summaries, notes, skills) (local mode only)
- List library with tag filtering (local mode only)
Prerequisites
- Node.js 20+
- yt-dlp:
brew install yt-dlp(macOS) or see installation guide
Installation
Via npm (Recommended)
npm install -g youtube-knowledge-mcp
Via npx (no installation)
Configure directly with npx (see Configuration section).
From source
git clone https://github.com/teobouancheau/youtube-knowledge-mcp.git
cd youtube-knowledge-mcp
npm install
npm run build
Configuration
Local (stdio) -- Claude Desktop, Claude Code, Cursor
Quick Start with npx
{
"mcpServers": {
"youtube-knowledge": {
"command": "npx",
"args": ["-y", "youtube-knowledge-mcp"]
}
}
}
With Global Installation
npm install -g youtube-knowledge-mcp
{
"mcpServers": {
"youtube-knowledge": {
"command": "youtube-knowledge-mcp"
}
}
}
Configuration File Locations
| Client | Path |
|---|---|
| Claude Desktop (macOS) | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Claude Desktop (Windows) | %APPDATA%\Claude\claude_desktop_config.json |
| Claude Desktop (Linux) | ~/.config/Claude/claude_desktop_config.json |
| Claude Code | .mcp.json in your project or ~/.claude/settings.json |
| Cursor | .cursor/mcp.json in your project |
Restart your client after updating configuration.
Remote (HTTP) -- Claude.ai, Claude Mobile, Custom Connectors
The server supports Streamable HTTP transport for remote access via Claude's official connectors.
Self-hosted
npm run build
npm run start:http
The server listens on PORT (default 3000). Set PORT environment variable to change.
Docker
npm run build
docker build -t youtube-knowledge-mcp .
docker run -p 3000:10000 youtube-knowledge-mcp
Deploy to Render
- Push to GitHub
- Create a Web Service on Render with Docker runtime
- Render sets
PORTautomatically - Add the Render URL as a custom connector in Claude.ai > Settings > Connectors
Connect via Claude.ai
- Go to Settings > Connectors
- Click Add custom connector
- Enter your server URL (e.g.,
https://your-app.onrender.com/mcp) - Click Add
MCP Tools
Remote + Local (10 tools)
search_videos
Search YouTube for videos by keyword or phrase.
| Parameter | Type | Default | Description |
|---|---|---|---|
query |
string | required | Search query |
limit |
number | 5 | Maximum results to return (1-20) |
Returns: video IDs, titles, durations, channels, view counts, URLs
fetch_videos
List videos from a YouTube playlist or channel.
| Parameter | Type | Default | Description |
|---|---|---|---|
url |
string | required | Playlist URL, channel URL, or handle |
limit |
number | 20 | Maximum videos to return (1-100) |
get_video_info
Get detailed metadata for a single YouTube video.
| Parameter | Type | Description |
|---|---|---|
video |
string | Video ID or URL |
Returns: title, channel, duration, upload date, view count, like count, comment count, description, tags, thumbnail URL
get_transcript
Extract the full transcript from a YouTube video.
| Parameter | Type | Default | Description |
|---|---|---|---|
video |
string | required | Video ID or URL |
language |
string | "en" | Preferred language (ISO 639-1) |
Returns: plain text transcript with word count and detected language
get_chapters
Extract chapter markers and timestamps from a YouTube video.
| Parameter | Type | Description |
|---|---|---|
video |
string | Video ID or URL |
Returns: chapter titles with start and end times. Empty list if no chapters found.
get_comments
Get top comments from a YouTube video sorted by popularity.
| Parameter | Type | Default | Description |
|---|---|---|---|
video |
string | required | Video ID or URL |
limit |
number | 20 | Maximum top-level comments to return (1-50) |
Returns: author, text, like count, pinned status
get_channel_info
Get metadata for a YouTube channel.
| Parameter | Type | Description |
|---|---|---|
channel |
string | Channel URL, handle (e.g., @Fireship), or name |
Returns: channel name, handle, subscriber count, description, channel URL
search_channels
Search YouTube for channels by keyword or phrase.
| Parameter | Type | Default | Description |
|---|---|---|---|
query |
string | required | Search query for channels |
limit |
number | 5 | Maximum channels to return (1-20) |
Returns: channel names, handles, subscriber counts, descriptions, URLs
get_playlist_info
Get metadata for a YouTube playlist.
| Parameter | Type | Description |
|---|---|---|
url |
string | YouTube playlist URL |
Returns: title, channel, video count, last updated date, description
list_formats
List all available download formats for a YouTube video.
| Parameter | Type | Description |
|---|---|---|
video |
string | Video ID or URL |
Returns: format IDs, extensions, resolutions, FPS, codecs, file sizes
Local Only (3 tools, stdio mode)
These tools operate on the local filesystem and are only available in stdio mode.
download_video
Download a YouTube video to local disk.
| Parameter | Type | Default | Description |
|---|---|---|---|
video |
string | required | Video ID or URL |
quality |
string | "best" | Quality preset (best, 2160p, 1440p, 1080p, 720p, 480p, 360p, audio) |
formatId |
string | - | Specific format code from list_formats |
outputDir |
string | - | Custom output directory |
save_to_library
Save a summary or skill note to your local YouTube knowledge library.
| Parameter | Type | Description |
|---|---|---|
videoId |
string | YouTube video ID |
title |
string | Video title |
content |
string | Content to save (markdown format) |
contentType |
string | "summary" or "skill" |
tags |
string[] | Tags for categorization (optional) |
channel |
string | Channel name (optional) |
list_library
List all saved items in your local knowledge library.
| Parameter | Type | Description |
|---|---|---|
tag |
string | Filter by tag (optional, partial match) |
Library Storage
Content is stored in ~/.youtube-knowledge/:
~/.youtube-knowledge/
├── transcripts/ # Cached transcripts
│ └── {video_id}.txt
├── library/ # Saved content
│ └── {video_id}/
│ ├── metadata.json
│ ├── summary.md
│ └── skill.md
├── downloads/ # Downloaded videos
│ └── {video_title}.{ext}
└── index.json # Searchable index
Usage Examples
Search and analyze
"Search YouTube for 'transformer architecture explained' and summarize the top result"
Explore a channel
"Show me the latest videos from @ThePrimeagen and get the chapters for the most recent one"
Deep content analysis
"Get the transcript and chapters for this video, then create a structured summary"
Audience sentiment
"What are the top comments on this video? What does the audience think?"
Download a video (local only)
"Download this video in 1080p: https://youtube.com/watch?v=ABC123"
Testing
npm test # Run all tests
npm run test:watch # Watch mode
npm run test:coverage # Coverage report
Development
npm run dev # Watch mode
npm run build # Build for production
npm run rebuild # Clean and rebuild
npm start # Run server (stdio)
npm run start:http # Run server (HTTP)
npm run validate # Typecheck + lint + test
Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Run tests (
npm run validate) - Submit a pull request
License
MIT License - see LICENSE for details.
Acknowledgments
<div align="center"> <strong>Built by <a href="https://github.com/teobouancheau">teobouancheau</a></strong> <br> <sub>AI + YouTube knowledge to supercharge content creation</sub> </div>
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。