Content
# YouTube Knowledge MCP
[](https://www.npmjs.com/package/youtube-knowledge-mcp)
[](https://opensource.org/licenses/MIT)
[](https://nodejs.org/)
[](https://github.com/teobouancheau/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](https://github.com/yt-dlp/yt-dlp#installation)
## Installation
### Via npm (Recommended)
```bash
npm install -g youtube-knowledge-mcp
```
### Via npx (no installation)
Configure directly with npx (see Configuration section).
### From source
```bash
git clone https://github.com/teobouancheau/youtube-knowledge-mcp.git
cd youtube-knowledge-mcp
npm install
npm run build
```
## Configuration
### Quick Start with npx (Recommended)
No installation needed! Add to your MCP configuration:
```json
{
"mcpServers": {
"youtube-knowledge": {
"command": "npx",
"args": ["-y", "youtube-knowledge-mcp"]
}
}
}
```
### With Global Installation
```bash
npm install -g youtube-knowledge-mcp
```
```json
{
"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 index
```
## Usage 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
```bash
npm test # Run all tests
npm run test:watch # Watch mode
npm run test:coverage # Coverage report
```
**Test Suite:**
- ✅ **11 tests** passing
- ⚡ **Execution time:** ~100ms
- 🧰 **Framework:** Vitest
## Development
```bash
npm run dev # Watch mode
npm run build # Build for production
npm run rebuild # Clean and rebuild
npm start # Run the server
```
## Contributing
Contributions are welcome! Please:
1. Fork the repository
2. Create a feature branch
3. Run tests (`npm test`)
4. Submit a pull request
## License
MIT License - see [LICENSE](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](https://github.com/yt-dlp/yt-dlp) for the powerful YouTube extraction
- [Anthropic](https://anthropic.com) for the Model Context Protocol
- All contributors and users of this project
---
<div align="center">
<strong>Built with ❤️ by <a href="https://github.com/teobouancheau">teobouancheau</a> for the YouTube community</strong>
<br>
<sub>AI + YouTube knowledge to supercharge content creation</sub>
</div>
MCP Config
Below is the configuration for this MCP Server. You can copy it directly to Cursor or other MCP clients.
mcp.json
Connection Info
You Might Also Like
vexa
Open-source meeting transcription API for Google Meet, Microsoft Teams &...
MAI-UI
MAI-UI provides GUI agents focused on real-world applications.
FireRed-OpenStoryline
FireRed-OpenStoryline is an AI video editing agent that transforms manual...
multimodal-agents-course
An MCP Multimodal AI Agent with eyes and ears!
vllm-mlx
OpenAI-compatible server for Apple Silicon. Run LLMs and vision-language...
CAAL
Local voice assistant using STT/TTS/LLM with n8n workflows.