MCP-Powered Video RAG
🎬 MCP-Powered Video RAG
用自然语言向你的视频提问——由 Whisper + ChromaDB + Groq + FastMCP 驱动。完全免费,且本地运行。
架构与工作原理

Your Video → Whisper (transcription) → ChromaDB (vector store)
↓
Antigravity IDE ← MCP Server ← Your Question
↓
Groq LLM (free) → Answer + TimestampsRelated MCP server: video-agent-mcp
技术栈(全部免费)
组件 | 工具 |
转录 | OpenAI Whisper(本地) |
嵌入模型 | sentence-transformers(本地) |
向量数据库 | ChromaDB(本地) |
MCP 框架 | FastMCP |
用于问答的 LLM | Groq(免费层) |
⚡ 快速开始
1. 安装依赖
uv sync2. 获取你的免费 Groq API 密钥
前往 https://console.groq.com/ → 创建账户 → 复制 API 密钥。
3. 设置环境
copy .env.example .env
# Edit .env and paste your GROQ_API_KEY4. 将 MCP 服务器添加到 Antigravity IDE
将 mcp_config.json 的内容复制到你的 Antigravity IDE MCP 设置中。
将 GROQ_API_KEY 更新为你的实际密钥。
5. 将视频放入 videos/ 文件夹
支持格式:.mp4, .mkv, .avi, .mov, .webm, .mp3, .wav
🛠️ 可用的 MCP 工具
工具 | 描述 |
| 转录并索引视频文件 |
| 对转录文本进行语义搜索 |
| 带时间戳的完整 RAG 问答 |
| 显示所有已索引的视频 |
| 从索引中移除视频 |
📖 示例用法(在 Antigravity IDE 中)
ingest_video("videos/my_lecture.mp4")
ask_video("What are the main topics discussed?")
search_video("neural networks explained", n_results=3)
ask_video("What did the speaker say about backpropagation?", video_name="my_lecture.mp4")⚙️ 配置(.env)
GROQ_API_KEY=your_key_here # Required — get free at console.groq.com
WHISPER_MODEL=base # tiny | base | small | medium | large
EMBEDDING_MODEL=all-MiniLM-L6-v2 # local embedding model
GROQ_MODEL=llama-3.1-8b-instant # Groq model for Q&A
CHROMA_DB_PATH=./chroma_db # where to persist the vector DB💡 提示
使用
WHISPER_MODEL=tiny可获得最快的转录速度(准确度较低)使用
WHISPER_MODEL=medium可获得高准确度(速度较慢)首次运行会下载 Whisper 和嵌入模型(每个约 200MB)——后续运行即时完成
ChromaDB 数据在重启后仍会保留在
./chroma_db/中
Available Tools
5 toolsask_videoA
Ask a natural language question about your videos and get an AI-generated answer.
This tool uses RAG: it retrieves the most relevant transcript chunks from ChromaDB, then sends them as context to a Groq LLM (free tier) to generate a precise answer with timestamps so you can jump directly to the relevant moment in the video.
| Name | Required | Description | Default |
|---|---|---|---|
| question | Yes | Your question in plain English (e.g. "What are the three main topics discussed?") | |
| video_name | No | Optional — restrict to a specific video file (e.g. "tutorial.mp4") | |
| n_context_chunks | No | Number of transcript chunks to use as context (default: 4) |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
delete_videoA
Remove a video and all its indexed data from the RAG system.
This deletes all transcript chunks for the specified video from ChromaDB. The original video file is NOT deleted — only the indexed data is removed.
| Name | Required | Description | Default |
|---|---|---|---|
| video_path | Yes | Path to the video file (same path used during ingestion). |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
ingest_videoA
Ingest a video file into the RAG system.
This transcribes the video using Whisper (locally, for free), splits the transcript into timed chunks, embeds them, and stores them in a local ChromaDB vector database for semantic search.
| Name | Required | Description | Default |
|---|---|---|---|
| video_path | Yes | Absolute or relative path to the video file. Supports .mp4, .mkv, .avi, .mov, .webm, .mp3, .wav, etc. |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
list_videosB
List all videos currently indexed in the RAG system.
Returns a summary of each ingested video including its name, path, and chunk count.
Returns: JSON list of indexed videos with metadata.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
search_videoB
Semantically search across all indexed video transcripts.
Returns the most relevant timestamped transcript chunks for a given query. You can optionally filter to a specific video by name.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Natural language search query (e.g. "what did they say about pricing?") | |
| n_results | No | Number of results to return (default: 5, max recommended: 10) | |
| video_name | No | Optional filename to restrict search to one video (e.g. "lecture.mp4") |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
5 tool updates
v0.1.0- First observed
ask_video - First observed
delete_video - First observed
ingest_video - First observed
list_videos - First observed
search_video
TDQS
Scored across 5 tools
Each tool maps to a distinct action (ingest, search, ask, list, delete). The only potential overlap is search_video vs ask_video, since both retrieve transcript chunks, but the descriptions clearly differentiate raw chunk retrieval from LLM-generated answers with context.
All five tools follow a strict verb_noun snake_case pattern (ingest_video, search_video, ask_video, list_videos, delete_video). The convention is predictable and uniform.
Five tools is well-scoped for a video RAG system. Each tool covers a meaningful, non-redundant part of the workflow with no filler.
The surface covers the full lifecycle: ingestion, two retrieval modes (search and Q&A), listing indexed content, and deletion. Re-ingesting a video handles the update case, so there are no obvious dead ends.
Maintenance
Related MCP Connectors
Real-time video transcripts, RAG captions, metadata, search & comments MCP. OAuth or API key.
Transcribe YouTube via Whisper. Summaries, chapters, semantic-search across your corpus.
MCP server for Clipkit — gives AI agents a video toolbox via the Clipkit schema.
Multimodal video analysis MCP — transcription, vision, and OCR for any video URL.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to query local video timelines by extracting speech, frame captions, and on-screen text into a SQLite store, exposing search and retrieval tools via MCP.PolyForm Noncommercial 1.0.0
- AlicenseNot gradedqualityCmaintenanceEnables automated video learning workflows by ingesting video URLs, managing remote GPU ASR transcription, pulling transcripts, generating digest summaries, and searching local notes via MCP tools.MIT
- AlicenseAqualityCmaintenanceEnables MCP clients to transcribe audio/video files locally, generate SRT subtitles, and burn captions into videos via tool calls, without a cloud API.3MIT
- FlicenseNot gradedqualityAmaintenanceEnables ingesting YouTube videos into a persistent, searchable wiki with transcript extraction, scene-change vision analysis, and cross-video knowledge compounding. MCP clients can then ask questions and receive reasoned answers with source citations.-