YouTube Knowledge Base MCP
Extracts transcripts from YouTube videos, builds a searchable knowledge base with timestamped links to exact video moments, and enables hybrid semantic and keyword search across video content with tagging and organization capabilities.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
YouTube Knowledge Base MCP
An MCP server that builds a searchable knowledge base from video content.
Why
We consume more content than we can remember. Videos watched, podcasts heard, lectures attended—the information fades. This project builds a searchable knowledge base from that content. Start with YouTube, expand to other sources.
The key: it's an MCP server. Plug it into any LLM (Claude, GPT, local models) and your AI assistant can search everything you've ever watched. Your memory, augmented.
Related MCP server: vidtheque
Features
Extract transcripts from YouTube videos
Hybrid search (semantic + keyword)
Timestamped links to exact video moments
Organize with tags and notes
Multiple embedding providers (Voyage, OpenAI, local)
Installation
Requirements
Python 3.10+
uv package manager
One of: Voyage API key, OpenAI API key, or local Ollama
Setup
git clone https://github.com/yourusername/youtube-knowledge-base-mcp.git
cd youtube-knowledge-base-mcp
uv syncEnvironment
cp .env.example .envAdd your API key (at least one required):
VOYAGE_API_KEY=your_key_here
# or
OPENAI_API_KEY=your_key_hereUsage
With Claude Desktop (recommended)
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"youtube-kb": {
"command": "uv",
"args": ["--directory", "/path/to/youtube-knowledge-base-mcp", "run", "youtube-kb"]
}
}
}Then ask Claude: "Add this video to my knowledge base: [URL]"
With Python
See demo.ipynb for interactive examples.
from youtube_knowledgebase_mcp import process_video, search
# Add a video
result = await process_video("https://youtube.com/watch?v=...")
# Search
results = await search("What is context engineering?")
for r in results.results:
print(r.timestamp_link) # Jump to exact momentMCP Tools
4 workflow-based tools designed for LLM efficiency:
Tool | Description |
| Add a video to the knowledge base (with optional tags/summary) |
| Update tags and summary for a source |
| Browse sources, list tags, or get statistics |
| Hybrid semantic + keyword search with reranking |
Developer CLI
Administrative commands for database management (not exposed to LLMs):
uv run kb db stats # Show database statistics
uv run kb db reset --confirm # Reset database (destructive)
uv run kb db migrate <path> # Move database to new location
uv run kb source list # List all sources
uv run kb source delete <id> # Delete a source
uv run kb health # System health check
uv run kb import-urls <file> # Bulk import from fileRun uv run kb --help for all commands.
Configuration
Data Location
By default, data is stored in your OS's standard application data directory:
macOS:
~/Library/Application Support/youtube-kb/Linux:
~/.local/share/youtube-kb/Windows:
%APPDATA%/youtube-kb/
Note: If you have existing data in
./data/from a previous version, it will continue to be used automatically.
To use a custom location, set the YOUTUBE_KB_DATA_DIR environment variable:
export YOUTUBE_KB_DATA_DIR=/path/to/custom/locationOr in Claude Desktop config:
{
"mcpServers": {
"youtube-kb": {
"command": "uv",
"args": ["--directory", "/path/to/repo", "run", "youtube-kb"],
"env": {
"YOUTUBE_KB_DATA_DIR": "/custom/data/path"
}
}
}
}Moving Your Database
To move your database to a new location (e.g., Dropbox):
uv run kb db migrate ~/Dropbox/youtube-kb --confirmThen follow the printed instructions to set the environment variable.
Architecture
youtube_knowledgebase_mcp/
├── core/ # Config, models, database, embeddings
├── repositories/ # Data access layer (LanceDB)
├── services/ # Business logic (search, ingestion, organization)
├── mcp_tools.py # MCP tools (4 workflow-based tools)
└── cli.py # Developer CLI for admin operationsTech Stack
LanceDB - Vector database with hybrid search
yt-dlp - YouTube transcript extraction
Embeddings - Voyage (default), OpenAI, BGE, Ollama
FastMCP - MCP server framework
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Transcribe YouTube via Whisper. Summaries, chapters, semantic-search across your corpus.
Personal YouTube AI knowledge base powered by RAG. Query your subscribed YouTube channels.
YouTube transcripts, video search, chapters and extractive summaries. No YouTube API key, no LLM.
YouTube transcripts, search, channel/playlist listings and upload tracking for AI agents.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceTransforms YouTube videos into a persistent, structured knowledge base using transcripts and visual frame analysis, enabling knowledge compounding and natural language querying.164MIT
- AlicenseNot gradedqualityAmaintenanceEnables search across videos you've watched via transcripts, on-screen text, and frames, citing exact timestamps. Point it at videos, channels, or playlists; it indexes everything locally and answers queries with deep links to the exact second.3MIT
- FlicenseNot gradedqualityDmaintenanceFetches YouTube transcripts and enables semantic search within them using local embeddings, allowing an LLM to retrieve relevant passages with timestamps.-
- AlicenseAqualityBmaintenanceEnables AI agents to search videos, retrieve metadata and transcripts, pinpoint exact moments via hybrid semantic search, and conduct multi-video research with timestamp deep links—all without YouTube API keys.51MIT