video-url-analyzer-mcp
This MCP server analyzes videos from YouTube, TikTok, and Instagram using Google Gemini AI, offering transcription, Q&A, tutorial extraction, context management, and more.
Analyze videos (
analyze_video): Comprehensive audio + visual analysis with optional custom prompts.Extract transcripts (
get_transcript): Timestamped transcripts with speaker identification in 100+ languages.Ask questions (
ask_about_video): Query specific video content using natural language.Find moments (
find_video_moments): Locate matching moments with structured output.Analyze segments (
analyze_video_segment): Focus analysis on a specific time range.Manage contexts (
prepare_video_context/ask_video_context): Save reusable video contexts for local follow-up queries, reducing re-analysis costs; list/delete as needed.Extract assets (
get_video_frame/get_video_clip): Capture frames or short clips (30s cap); retrieve evidence assets.Tutorial analysis (
watch_and_analyze): Extract shell commands, code snippets, file paths, and step-by-step instructions from technical videos.Execute tutorial steps (
execute_tutorial_steps): Safely review and optionally execute extracted steps — defaults to dry-run; requires explicitconfirm=true.Background jobs (
check_analysis_job): Poll async job status for TikTok/Instagram downloads via a returned job ID.Cache management (
list_video_sources/cleanup_video_cache): Inspect metadata and clean up cached files.
Platform behavior: YouTube videos are analyzed instantly via Gemini's native understanding (no download needed); TikTok and Instagram videos are processed asynchronously in the background. Security hardening includes SSRF, command injection, and path traversal protections. Behavior is configurable via environment variables (API keys, models, timeouts, storage paths).
Analyze Instagram videos/reels from URL with async processing, extracting transcripts, AI insights, and Q&A capabilities.
Analyze TikTok videos from URL with async processing, extracting transcripts, AI insights, and Q&A capabilities.
Analyze YouTube videos from URL, extract transcripts, AI insights, tutorial steps, and perform Q&A on video content.
Features
v1.4 exposes 17 MCP tools:
Tool | What it does |
| Full audio + visual analysis with custom prompts. Uses Gemini multimodal understanding. |
| Extract timestamped transcript with speaker identification. Supports 100+ languages via auto-detection. |
| Ask any question about the video content. |
| Find matching moments with compact/standard/full structured output. |
| Analyze only a selected time range. |
| Analyze once and save a reusable local context for follow-up questions and evidence lookup. |
| Answer from saved context by default; Gemini reanalysis is explicit opt-in. |
| List saved local contexts. |
| Delete one saved context. |
| Extract a local still frame, using the YouTube fast path when possible. |
| Extract a short local clip, with a 30s cap and YouTube fast path when possible. |
| Select saved evidence and return a frame or clip reference. |
| Inspect local source/context/asset cache metadata. |
| Dry-run or clean managed cache files; dry-run is the default. |
| Extract tutorial steps, shell commands, code snippets, and file paths from technical videos. |
| Validate and review extracted steps safely; executes only with confirmation. |
| Poll background job status for TikTok/Instagram async downloads. |
Supported Platforms
Platform | Method | Speed |
YouTube | Direct Gemini analysis — no download needed for analysis. Frame/clip extraction uses | Instant / fast local extraction |
TikTok | tikwm.com API (fast) → yt-dlp fallback with a safe MP4 H.264/H.265 selector that avoids unsupported ByteDance | ~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. For YouTube evidence assets,
source.mp4is not always required: saved contexts keep the original URL, so frame/clip tools can use the local stream fast path later.
Architecture
Component | Role |
Gemini 2.5 Flash | Latest 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. TikTok downloads prefer locally decodable MP4 H.264/H.265 formats and reject ByteDance |
tikwm.com API | TikTok fast-path fallback when yt-dlp is WAF-blocked |
ffmpeg | Local frame/clip extraction, including YouTube stream URL extraction without full-video downloads |
Background Jobs | Async threading for TikTok/Instagram to prevent Claude Desktop timeouts. Failed inner results are reported as failed jobs, not completed jobs. |
Operating Modes
These are behavior modes, not tool names:
Mode | Behavior |
| Default adaptive behavior: YouTube direct analysis; TikTok/Instagram fast API/scrape then yt-dlp fallback; saved contexts reused when available. |
| Gemini-backed analysis or reanalysis. This is used by analysis tools and explicit Gemini opt-ins. |
| MCP client workflow mode: long TikTok/Instagram analysis returns a background |
| Saved-context, cache, frame, and clip operations that avoid Gemini unless explicitly requested. |
Quick Start
The packaged runtime lives at src/video_url_analyzer_mcp/server.py; the
console entry point is video_url_analyzer_mcp:main. Pick whichever
install path matches your workflow.
Option A — uvx (no install)
uvx video-url-analyzer-mcpWorks on Windows / macOS / Linux as long as uv is on PATH.
Option B — Windows wizard (recommended for new users)
git clone https://github.com/u2n4/video-url-analyzer-mcp.git
cd video-url-analyzer-mcp
powershell -ExecutionPolicy Bypass -File scripts\install_windows.ps1The wizard:
Verifies Python 3.10+ and (optionally)
uv.Installs the package as an editable checkout or via
uv tool install.Lets you save
GEMINI_API_KEYto a User environment variable or to a gitignored.env.keys.local. Keys are masked in logs (AIza...abcd), never printed in full.Lets you pick a default model via
VIDEO_ANALYZER_MODEL.Runs an offline import smoke test.
Hands off to
scripts/configure_mcp_clients.ps1for client setup.
Option C — Manual install (any OS)
git clone https://github.com/u2n4/video-url-analyzer-mcp.git
cd video-url-analyzer-mcp
pip install -e .
python -m video_url_analyzer_mcpGet a free key at Google AI Studio,
then set it once in your shell environment (setx GEMINI_API_KEY ... on
Windows, or your ~/.zshrc / ~/.bashrc on macOS/Linux). For local dev
only, you can also drop it in a gitignored .env.keys.local next to the
repo.
Windows launcher
start.bat loads .env.keys.local (if present), sets safe defaults
(VIDEO_ANALYZER_MODE=auto), and runs python -m video_url_analyzer_mcp.
Use it as a command value in any MCP client that prefers a single
executable.
Integration
Run scripts/configure_mcp_clients.ps1 for an interactive menu, or copy
the snippets below from docs/mcp-config-examples.md. The wizard backs up
existing client config, validates JSON/TOML, and never overwrites unrelated
MCP servers.
Claude Desktop (%APPDATA%\Claude\claude_desktop_config.json)
{
"mcpServers": {
"video-url-analyzer": {
"command": "uvx",
"args": ["video-url-analyzer-mcp"]
}
}
}The wizard prefers leaving the API key in your OS environment. If you must
embed it, add "env": { "GEMINI_API_KEY": "YOUR_KEY_HERE" }.
Claude Code (CLI)
claude mcp add video-url-analyzer --transport stdio -- uvx video-url-analyzer-mcpOr, after pip install -e . in the repo:
claude mcp add video-url-analyzer --transport stdio -- python -m video_url_analyzer_mcpCodex CLI (~/.codex/config.toml)
[mcp_servers.video-url-analyzer]
command = "uvx"
args = ["video-url-analyzer-mcp"]VS Code / GitHub Copilot MCP
Workspace registration writes .vscode/mcp.json:
{
"servers": {
"video-url-analyzer": {
"command": "uvx",
"args": ["video-url-analyzer-mcp"]
}
}
}For all clients, restart the application after editing config so the new
MCP server is picked up. Full snippets — including Cursor, Windsurf, and
Antigravity — live in docs/mcp-config-examples.md.
Usage Examples
# Full video analysis with Gemini 2.5 Flash
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?")
# Analyze once, then ask locally from the saved context
prepare_video_context("https://youtu.be/abc", detail="standard")
ask_video_context("https://youtu.be/abc",
question="What happens near the end?")
# Extract visual evidence without embedding binary data in the tool output
get_video_frame("https://youtu.be/abc", timestamp="00:30")
get_video_clip("https://youtu.be/abc", start="00:20", end="00:28")
# Watch & build — extract tutorial steps
watch_and_analyze("https://www.youtube.com/watch?v=tutorial123")Security
This server has been hardened against a comprehensive threat model audit:
Layer | Protection |
SSRF | URL allowlist — only YouTube, TikTok, Instagram domains accepted. Private IPs, localhost, |
Command Injection |
|
Path Traversal | 25+ sensitive path patterns blocked ( |
TLS | Full certificate validation on all downloads. |
Browser Cookies | Opt-in only via |
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 |
Environment Variables
Variable | Description | Default |
| Google Gemini API key | Required |
| Directory for saved analyses |
|
| Directory for saved reusable video contexts |
|
| Directory for cached downloaded source media |
|
| Directory for extracted frames/clips |
|
| Enable browser cookie access ( |
|
| Override download and yt-dlp timeout values, in seconds | Existing per-operation defaults |
| Override ffmpeg extraction timeout values, in seconds | Existing per-operation defaults |
| Optional Gemini HTTP timeout, in seconds | SDK default |
| Single-knob default model id used for both fast and deep model resolution. Per-call | unset |
| Override for compact/standard detail mode |
|
| Override for |
|
Default fast model:
gemini-3.1-flash-lite-preview. Default deep model (used whendetail="full"):gemini-3.1-pro-preview. SetVIDEO_ANALYZER_MODELto override both at once. Model availability can vary by Google account, region, and API tier — fall back togemini-flash-latestif the 3.1 preview ids are not yet enabled for your key. |VIDEO_ANALYZER_MODE| Behavior preset (auto/api/client/local); read bystart.bat|auto|
Troubleshooting
Issue | Solution |
| Create |
TikTok download fails | tikwm.com fallback activates automatically. Ensure |
TikTok | v1.4 avoids these unsupported ByteDance streams when a compatible MP4 H.264/H.265 format exists. If no compatible stream is available, tools return a structured |
Instagram download fails |
|
| Use |
Impersonate target not available | Reinstall: |
Claude Desktop timeout | TikTok/Instagram run in background — use |
Background job says failed | Expected when the worker result is an error, Gemini file processing fails, or media validation rejects the source. |
| It reuses cached contexts unless |
YouTube | Expected in some cases. Frame/clip tools can recover from the saved URL and use |
Transient Gemini 503/5xx | Gemini |
Tech Stack
Technology | Version | Purpose |
Latest | Multimodal video analysis engine | |
3.1.0 | MCP protocol framework | |
2026.3.3 | Video downloader | |
0.14.0 | Browser impersonation (TLS fingerprint) | |
1.66.0 | Official Google GenAI SDK |
License
MIT
العربية
خادم تحليل الفيديو بالذكاء الاصطناعي
خادم MCP لتحليل الفيديو باستخدام Google Gemini 2.5 Flash — احدث واقوى نموذج ذكاء اصطناعي متعدد الوسائط من جوجل.
المميزات
الاداة | الوصف |
| تحليل شامل للصوت والصورة مع دعم الاوامر المخصصة |
| استخراج النص المنطوق مع الطوابع الزمنية — يدعم +100 لغة |
| اسال اي سؤال عن محتوى الفيديو |
| تحليل الفيديو مرة واحدة وحفظ سياق محلي قابل لاعادة الاستخدام |
| الاجابة من السياق المحفوظ بدون Gemini افتراضيا |
| استخراج صورة او مقطع كدليل محلي، مع مسار سريع ليوتيوب عبر yt-dlp + ffmpeg |
| استخراج خطوات الشروحات التقنية والاوامر والاكواد |
| مراجعة وتنفيذ الخطوات المستخرجة بامان |
المنصات المدعومة
المنصة | السرعة |
يوتيوب | فوري — تحليل مباشر بدون تحميل |
تيك توك | ~8 ثواني — واجهة tikwm.com السريعة |
انستقرام | ~10 ثواني — استخراج مباشر من الصفحة |
التثبيت السريع (ويندوز)
استنسخ الريبو ثم شغل المعالج التفاعلي:
git clone https://github.com/u2n4/video-url-analyzer-mcp.git
cd video-url-analyzer-mcp
powershell -ExecutionPolicy Bypass -File scripts\install_windows.ps1البديل بدون تثبيت: uvx video-url-analyzer-mcp.
الامان
الخادم محمي ضد:
SSRF — قائمة بيضاء للنطاقات المسموحة فقط
حقن الاوامر — حظر الاوامر الخطيرة + تنفيذ بدون shell
اختراق المسارات — حظر 25+ مسار حساس
حماية من الحمل الزائد — حد اقصى 10 مهام متزامنة
الحصول على مفتاح API
اذهب الى Google AI Studio
انشئ مفتاح API مجاني
ضعه في ملف
.env:
GEMINI_API_KEY=مفتاحك_هناMaintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/u2n4/video-url-analyzer-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server