loading…
Search for a command to run...
loading…
Analyze YouTube, TikTok, and Instagram videos from URL. Extracts transcripts, generates AI insights, and pulls tutorial steps from any video link.
Analyze YouTube, TikTok, and Instagram videos from URL. Extracts transcripts, generates AI insights, and pulls tutorial steps from any video link.
MCP server to analyze YouTube, TikTok & Instagram videos from URL — transcripts, AI insights, tutorial extraction
Video URL Analyzer MCP is a Model Context Protocol (MCP) server that lets Claude (or any MCP-compatible AI) analyze videos from YouTube, TikTok, and Instagram — just paste a URL. Powered by Google's Gemini API with full audio + visual analysis, it extracts transcripts, provides AI-powered insights, and can even extract executable tutorial steps.
Paste a YouTube, TikTok, or Instagram URL into Claude and ask:
Analyze this video. Give me:
1. a concise summary
2. transcript highlights with timestamps
3. important visual details not obvious from the transcript
4. any tools, commands, products, or code shown on screen
Video URL Analyzer MCP turns a video link into structured context: transcript, visual understanding, Q&A, and tutorial extraction.
uvx video-url-analyzer-mcp and you are running| Platform | Method | Speed |
|---|---|---|
| YouTube | Direct Gemini analysis — no download needed | Instant |
| TikTok | tikwm.com API (fast) → yt-dlp fallback | ~8s |
| Page scrape via curl_cffi (fast) → yt-dlp fallback | ~10s |
YouTube videos are analyzed directly through Gemini's native video understanding — zero download, zero upload, maximum speed.
Requires uv.
Claude Desktop -- add to claude_desktop_config.json:
{
"mcpServers": {
"video-analyzer": {
"command": "uvx",
"args": ["video-url-analyzer-mcp"],
"env": {
"GEMINI_API_KEY": "your_key"
}
}
}
}
Claude Code:
claude mcp add video-analyzer -s user -e GEMINI_API_KEY=your_key -- uvx video-url-analyzer-mcp
Cursor / VS Code -- add to .cursor/mcp.json or .vscode/mcp.json:
{
"servers": {
"video-analyzer": {
"command": "uvx",
"args": ["video-url-analyzer-mcp"],
"env": { "GEMINI_API_KEY": "your_key" }
}
}
}
Windsurf -- add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"video-analyzer": {
"command": "uvx",
"args": ["video-url-analyzer-mcp"],
"env": { "GEMINI_API_KEY": "your_key" }
}
}
}
# Install uv if needed
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
# Restart PowerShell, then add the MCP server
claude mcp add video-analyzer -s user -e GEMINI_API_KEY=your_key -- uvx video-url-analyzer-mcp
# Verify
claude mcp list
pip install video-url-analyzer-mcp
git clone https://github.com/u2n4/video-url-analyzer-mcp.git
cd video-url-analyzer-mcp
pip install -e .
| Tool | What it does |
|---|---|
analyze_video |
Full audio + visual analysis with custom prompts. Uses Gemini for state-of-the-art multimodal understanding. |
get_transcript |
Extract timestamped transcript with speaker identification. Supports 100+ languages via auto-detection. |
ask_about_video |
Ask any question — "How many people appear?", "What brand is shown at 0:45?", "Summarize the main argument." |
watch_and_analyze |
Extract tutorial steps, shell commands, code snippets, and file paths from technical videos. |
execute_tutorial_steps |
Review extracted steps safely, then execute with confirmation. Sandboxed with command & path validation. |
check_analysis_job |
Poll background job status for TikTok/Instagram async downloads. |
Safety note:
execute_tutorial_stepsis intended for reviewed, user-approved tutorial steps. Treat commands extracted from videos as untrusted. Prefer review/dry-run first, and do not execute commands from unknown videos without understanding them.
- Default behavior is review-oriented.
confirm=truemay execute commands.- Users must review and understand commands before execution.
YouTube — Synchronous: URL is sent directly to Gemini API for instant analysis (no download).
TikTok & Instagram — Asynchronous: Video is downloaded via yt-dlp, uploaded to Gemini Files API, analyzed, then cleaned up. Returns a job_id immediately — poll with check_analysis_job.
This server is designed to be explicit about where video data goes.
| Platform | Data flow |
|---|---|
| YouTube | The video URL is sent to Gemini for native multimodal analysis. The server does not download the YouTube video by default. |
| TikTok | The video may be downloaded temporarily, uploaded to Gemini Files API for analysis, then cleaned up after processing. |
| The video may be downloaded temporarily, uploaded to Gemini Files API for analysis, then cleaned up after processing. |
Notes:
GEMINI_API_KEY is required for full multimodal analysis in the current version.VIDEO_ANALYZER_COOKIES=true.ANALYSES_DIR depending on configuration.# Full video analysis
analyze_video("https://www.youtube.com/watch?v=dQw4w9WgXcQ")
# Custom analysis prompt
analyze_video("https://www.tiktok.com/@user/video/123",
prompt="List every product shown and estimate prices")
# Multilingual transcript extraction
get_transcript("https://www.instagram.com/reel/ABC123/", lang="ar")
# Ask specific questions about video content
ask_about_video("https://youtu.be/abc",
question="What programming language is used in the tutorial?")
# Watch & build — extract tutorial steps
watch_and_analyze("https://www.youtube.com/watch?v=tutorial123")
Analyze this YouTube video and give me a summary, transcript highlights, and visual details.
Ask this video: what tools, apps, products, or commands appear on screen?
Watch this tutorial and extract the steps, commands, file paths, and warnings. Do not execute anything.
حلل هذا الفيديو بالعربي، وطلع لي الملخص، أهم النقاط، وأي أوامر أو أدوات تظهر في الشرح.
| Component | Role |
|---|---|
| Gemini API | Multimodal model — full audio + visual understanding in a single pass |
| FastMCP 3.x | MCP protocol framework over stdio transport |
| yt-dlp + curl_cffi | Video download with Chrome browser impersonation to bypass anti-bot |
| tikwm.com API | TikTok fast-path fallback when yt-dlp is WAF-blocked |
| Background Jobs | Async threading for TikTok/Instagram to prevent Claude Desktop timeouts |
video-url-analyzer-mcp/
├── pyproject.toml # Package metadata & dependencies
├── src/
│ └── video_url_analyzer_mcp/
│ ├── __init__.py # Package init + version
│ ├── __main__.py # python -m support
│ └── server.py # Main MCP server (all 6 tools)
├── .env.example # Environment variable template
├── llms.txt # AI-readable project summary
├── llms-install.md # AI-readable install guide
├── CONTRIBUTING.md
├── CHANGELOG.md
└── LICENSE
URLs are automatically routed to the correct pipeline:
youtube.com, youtu.be, youtube.com/shorts/tiktok.com, vm.tiktok.com, vt.tiktok.cominstagram.com/reels/, instagram.com/reel/, instagram.com/p/This server has been hardened against a comprehensive threat model:
| Layer | Protection |
|---|---|
| SSRF | URL allowlist — only YouTube, TikTok, Instagram domains accepted. Private IPs, localhost, file:// blocked. |
| Command Injection | shell=False + shlex.split(). Dangerous command blocklist (rm -rf, reverse shells, eval, pipe-to-shell). |
| Path Traversal | 25+ sensitive path patterns blocked (.ssh, .aws, .env, system dirs, AppData). |
| TLS | Full certificate validation on all downloads. |
| Browser Cookies | Opt-in only via VIDEO_ANALYZER_COOKIES=true. Disabled by default. |
| Download Size | Hard limit of 100 MB per video. |
| DoS Protection | Max 10 concurrent background jobs. Auto-expiry after 1 hour. Storage cap of 200 analyses. |
| Schema Validation | Gemini JSON responses validated before execution. Response size capped at 500K chars. |
| Dependencies | All versions pinned in pyproject.toml. |
GEMINI_API_KEY for full video understanding in the current version.check_analysis_job to poll status.| Variable | Description | Default |
|---|---|---|
GEMINI_API_KEY |
Google Gemini API key (required) | — |
ANALYSES_DIR |
Directory to store analysis results | ./analyses |
VIDEO_ANALYZER_COOKIES |
Enable browser cookies for yt-dlp | false |
| Technology | Purpose |
|---|---|
| google-genai | Google Gemini API SDK |
| FastMCP | MCP protocol framework |
| yt-dlp | Video downloader |
| curl_cffi | Browser impersonation (TLS fingerprint) |
| python-dotenv | Environment variable loading |
| Issue | Solution |
|---|---|
GEMINI_API_KEY not set |
Create .env file or pass via environment variable |
| TikTok download fails | tikwm.com fallback activates automatically. Ensure curl_cffi is installed. |
| Instagram download fails | pip install curl_cffi for browser impersonation support |
ENOENT on Windows |
Use uvx video-url-analyzer-mcp as the command |
| Claude Desktop timeout | TikTok/Instagram run in background — use check_analysis_job(job_id) to poll |
| Python not found | Install Python 3.10+ from python.org |
Gemini API provides the best current experience because it can analyze audio and visuals together.
A future fallback mode is planned for users who do not want to provide an API key or when the API is unavailable:
Video URL
→ extract metadata, captions/transcript, and selected keyframes locally
→ return structured context to the MCP client
→ let the user's AI client analyze the prepared context
Planned modes:
| Mode | Status | Description |
|---|---|---|
| API mode | Available now | Uses Gemini for full multimodal video analysis. |
| Client AI fallback | Planned | The MCP server prepares transcript, metadata, and keyframes for the client AI to analyze. |
| Local basic mode | Planned | Returns metadata/transcript/keyframes only, without external model analysis. |
Important: Client AI fallback quality will depend on the MCP client. Some MCP clients may not pass image content from tool results to the model reliably, so transcript/metadata fallback will remain important.
See CONTRIBUTING.md for guidelines.
MIT — see LICENSE.
If you find this useful, please star this repository!
Made with ❤️ in the Eastern Province of Saudi Arabia.
خادم MCP لتحليل الفيديو باستخدام Google Gemini — احدث واقوى نموذج ذكاء اصطناعي متعدد الوسائط من جوجل.
| الاداة | الوصف |
|---|---|
analyze_video |
تحليل شامل للصوت والصورة مع دعم الاوامر المخصصة |
get_transcript |
استخراج النص المنطوق مع الطوابع الزمنية — يدعم +100 لغة |
ask_about_video |
اسال اي سؤال عن محتوى الفيديو |
watch_and_analyze |
استخراج خطوات الشروحات التقنية والاوامر والاكواد |
execute_tutorial_steps |
مراجعة وتنفيذ الخطوات المستخرجة بامان |
| المنصة | السرعة |
|---|---|
| يوتيوب | فوري — تحليل مباشر بدون تحميل |
| تيك توك | ~8 ثواني — واجهة tikwm.com السريعة |
| انستاجرام | ~10 ثواني — استخراج مباشر من الصفحة |
git clone https://github.com/u2n4/video-url-analyzer-mcp.git
cd video-url-analyzer-mcp
pip install -e .
الخادم محمي ضد:
.envGEMINI_API_KEY مطلوب حالياً للتحليل الكامل.الخطة القادمة هي إضافة وضع fallback بحيث يقوم السيرفر بتجهيز النص، البيانات الوصفية، ولقطات مختارة من الفيديو، ثم يترك التحليل للذكاء الاصطناعي الموجود في العميل نفسه.
Add this to claude_desktop_config.json and restart Claude Desktop.
{
"mcpServers": {
"video-url-analyzer-mcp": {
"command": "npx",
"args": []
}
}
}