youtube-knowledge-mcp
v1.0.3
Published
MCP Server for extracting and managing YouTube video knowledge
Maintainers
Readme
YouTube Knowledge MCP
A Model Context Protocol (MCP) server that gives AI assistants the ability to extract knowledge from YouTube videos. Works with Claude Desktop, Claude Code, Cursor and any MCP-compatible client. Fetch video metadata, extract transcripts, download videos, and build a personal knowledge library from YouTube content.
![]()
Features
- Fetch videos from playlists or channels
- Get video info (title, channel, duration, description, tags)
- Extract transcripts (auto-generated or manual captions)
- Download videos with quality selection and format options
- Save to library (summaries, notes, skills)
- List library with tag filtering
Prerequisites
- Node.js 20+
- yt-dlp:
brew install yt-dlp(macOS) or see installation guide
Installation
Via npm (Recommended)
npm install -g youtube-knowledge-mcpVia 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 buildConfiguration
Quick Start with npx (Recommended)
No installation needed! Add to your MCP configuration:
{
"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.
MCP Tools
youtube_fetch_videos
List videos from a YouTube playlist or channel.
| Parameter | Type | Default | Description |
| --------- | ------ | -------- | ------------------------------- |
| url | string | required | YouTube playlist or channel URL |
| limit | number | 20 | Maximum videos to fetch |
youtube_get_video_info
Get detailed metadata for a YouTube video.
| Parameter | Type | Description |
| --------- | ------ | --------------- |
| video | string | Video ID or URL |
Returns: title, channel, duration, description, tags, thumbnail
youtube_get_transcript
Extract transcript/subtitles from a YouTube video.
| Parameter | Type | Default | Description |
| ---------- | ------ | -------- | ----------------------- |
| video | string | required | Video ID or URL |
| language | string | "en" | Preferred language code |
youtube_list_formats
List available download formats for a YouTube video.
| Parameter | Type | Description |
| --------- | ------ | --------------- |
| video | string | Video ID or URL |
Returns: format IDs, resolutions, codecs, file sizes
youtube_download_video
Download a YouTube video with quality selection.
| 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 youtube_list_formats |
| outputDir | string | - | Custom output directory |
youtube_save_to_library
Save content to your personal YouTube knowledge library.
| Parameter | Type | Description |
| -------------- | -------- | --------------------- |
| video_id | string | YouTube video ID |
| title | string | Video title |
| content | string | Content to save |
| content_type | string | "summary" or "skill" |
| tags | string[] | Optional tags |
| channel | string | Optional channel name |
youtube_list_library
List all saved items in your library.
| Parameter | Type | Description |
| --------- | ------ | ---------------------- |
| tag | string | Optional filter by tag |
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 indexUsage Examples
Quick summary
"Summarize this video: https://youtube.com/watch?v=ABC123"Explore a channel
"Show me the latest videos from @ThePrimeagen"Download a video
"Download this video in 1080p: https://youtube.com/watch?v=ABC123"Save to library
"Save this summary with tags: programming, productivity"Create a skill
"Create a Claude Code skill from this video's content"Testing
npm test # Run all tests
npm run test:watch # Watch mode
npm run test:coverage # Coverage reportTest Suite:
- ✅ 11 tests passing
- ⚡ Execution time: ~100ms
- 🧰 Framework: Vitest
Development
npm run dev # Watch mode
npm run build # Build for production
npm run rebuild # Clean and rebuild
npm start # Run the serverContributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Run tests (
npm test) - Submit a pull request
License
MIT License - see LICENSE for details.
Attribution appreciated! If you use YouTube Knowledge MCP, consider:
- ⭐ Starring this repository
- 💬 Mentioning it in your project
- 🔗 Linking back to this repo
Acknowledgments
- yt-dlp for the powerful YouTube extraction
- Anthropic for the Model Context Protocol
- All contributors and users of this project
