video-url-analyzer-mcp
これは何ですか?
Video URL Analyzer MCPは、Claude(またはMCP互換のAI)がYouTube、TikTok、Instagramの動画をURLを貼り付けるだけで分析できるようにするModel Context Protocol (MCP) サーバーです。GoogleのGemini APIを活用し、音声と映像の両方を分析することで、文字起こしの抽出、AIによるインサイトの提供、さらには実行可能なチュートリアル手順の抽出まで行います。
Related MCP server: Social → Context
機能
YouTube分析 — Gemini APIによる直接分析(ダウンロード不要)
TikTok & Instagram —
yt-dlpによるダウンロードとGemini Files APIを使用した非同期ジョブパターン音声・映像のフル分析 — 動画フレームと音声・発話の両方を分析
6つのツール — 分析、文字起こし、Q&A、視聴・分析、チュートリアル実行、ジョブ確認
バイリンガル — アラビア語と英語のプロンプトおよび応答をサポート
非同期ジョブ — バックグラウンド処理によりClaude Desktopのタイムアウトによるクラッシュを防止
セキュリティ強化 — URL許可リスト、SSRF保護、コマンドインジェクション防止、パストラバーサルブロック
ゼロコンフィグインストール —
uvx video-url-analyzer-mcpを実行するだけですぐに使用可能
対応プラットフォーム
プラットフォーム | 手法 | 速度 |
YouTube | Geminiによる直接分析 — ダウンロード不要 | 即時 |
TikTok | tikwm.com API (高速) → yt-dlp フォールバック | ~8秒 |
curl_cffiによるページスクレイピング (高速) → yt-dlp フォールバック | ~10秒 |
YouTube動画はGeminiのネイティブな動画理解機能を通じて直接分析されるため、ダウンロードやアップロードがゼロで、最高速度で処理されます。
クイックスタート
オプション1: uvx (推奨)
uvが必要です。
Claude Desktop -- 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-mcpCursor / VS Code -- .cursor/mcp.json または .vscode/mcp.jsonに追加:
{
"servers": {
"video-analyzer": {
"command": "uvx",
"args": ["video-url-analyzer-mcp"],
"env": { "GEMINI_API_KEY": "your_key" }
}
}
}Windsurf -- ~/.codeium/windsurf/mcp_config.jsonに追加:
{
"mcpServers": {
"video-analyzer": {
"command": "uvx",
"args": ["video-url-analyzer-mcp"],
"env": { "GEMINI_API_KEY": "your_key" }
}
}
}オプション2: pip install
pip install video-url-analyzer-mcpオプション3: ソースからインストール
git clone https://github.com/u2n4/video-url-analyzer-mcp.git
cd video-url-analyzer-mcp
pip install -e .ツール
ツール | 説明 |
| カスタムプロンプトを使用した音声・映像のフル分析。最先端のマルチモーダル理解のためにGeminiを使用します。 |
| 話者識別付きのタイムスタンプ付き文字起こしを抽出。自動検出により100以上の言語をサポート。 |
| 「何人登場していますか?」「0:45に表示されているブランドは何ですか?」「主な主張を要約して」など、動画に関するあらゆる質問に対応。 |
| 技術系動画からチュートリアル手順、シェルコマンド、コードスニペット、ファイルパスを抽出。 |
| 抽出された手順を安全に確認し、承認を得て実行。コマンドとパスの検証によるサンドボックス環境。 |
| TikTok/Instagramの非同期ダウンロードのバックグラウンドジョブステータスをポーリング。 |
仕組み
YouTube — 同期処理: URLがGemini APIに直接送信され、即座に分析されます(ダウンロードなし)。
TikTok & Instagram — 非同期処理: 動画がyt-dlp経由でダウンロードされ、Gemini Files APIにアップロードされて分析された後、クリーンアップされます。job_idが即座に返されるため、check_analysis_jobでポーリングします。
使用例
# 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")アーキテクチャ
コンポーネント | 役割 |
Gemini API | マルチモーダルモデル — 音声と映像を一度に理解 |
FastMCP 3.x | stdioトランスポート上のMCPプロトコルフレームワーク |
yt-dlp + curl_cffi | アンチボットを回避するためのブラウザなりすまし機能付き動画ダウンローダー |
tikwm.com API | yt-dlpがWAFでブロックされた際のTikTok用高速パスフォールバック |
バックグラウンドジョブ | Claude Desktopのタイムアウトを防ぐためのTikTok/Instagram用非同期スレッド |
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プラットフォーム検出
URLは自動的に適切なパイプラインにルーティングされます:
YouTube:
youtube.com,youtu.be,youtube.com/shorts/TikTok:
tiktok.com,vm.tiktok.com,vt.tiktok.comInstagram:
instagram.com/reels/,instagram.com/reel/,instagram.com/p/
セキュリティ
このサーバーは包括的な脅威モデルに対して強化されています:
レイヤー | 保護内容 |
SSRF | URL許可リスト — YouTube、TikTok、Instagramドメインのみ許可。プライベートIP、localhost、 |
コマンドインジェクション |
|
パストラバーサル | 25以上の機密パスパターンをブロック( |
TLS | すべてのダウンロードで完全な証明書検証を実施。 |
ブラウザCookie |
|
ダウンロードサイズ | 動画あたり100MBのハード制限。 |
DoS保護 | 最大10個の同時バックグラウンドジョブ。1時間後に自動期限切れ。200分析のストレージ上限。 |
スキーマ検証 | GeminiのJSON応答を実行前に検証。応答サイズは500K文字に制限。 |
依存関係 | すべてのバージョンを |
設定
変数 | 説明 | デフォルト |
| Google Gemini APIキー (必須) | — |
| 分析結果を保存するディレクトリ |
|
| yt-dlpのブラウザCookieを有効化 |
|
技術スタック
技術 | 用途 |
Google Gemini API SDK | |
MCPプロトコルフレームワーク | |
動画ダウンローダー | |
ブラウザなりすまし (TLSフィンガープリント) | |
環境変数読み込み |
トラブルシューティング
問題 | 解決策 |
|
|
TikTokのダウンロード失敗 | tikwm.comフォールバックが自動的に有効になります。 |
Instagramのダウンロード失敗 | ブラウザなりすましサポートのため |
Windowsで | コマンドとして |
Claude Desktopのタイムアウト | TikTok/Instagramはバックグラウンドで実行されます — |
Pythonが見つからない | python.org からPython 3.10+をインストールしてください |
貢献
ガイドラインについては CONTRIBUTING.md を参照してください。
ライセンス
MIT — LICENSE を参照してください。
サポート
もしこれが役に立ったなら、ぜひこのリポジトリにスターを付けてください!
サウジアラビア東部州にて ❤️ を込めて作成。
العربية
خادم تحليل الفيديو بالذكاء الاصطناعي
خادم MCP لتحليل الفيديو باستخدام Google Gemini — احدث واقوى نموذج ذكاء اصطناعي متعدد الوسائط من جوجل.
المميزات
الاداة | الوصف |
| تحليل شامل للصوت والصورة مع دعم الاوامر المخصصة |
| استخراج النص المنطوق مع الطوابع الزمنية — يدعم +100 لغة |
| اسال اي سؤال عن محتوى الفيديو |
| استخراج خطوات الشروحات التقنية والاوامر والاكواد |
| مراجعة وتنفيذ الخطوات المستخرجة بامان |
المنصات المدعومة
المنصة | السرعة |
يوتيوب | فوري — تحليل مباشر بدون تحميل |
تيك توك | ~8 ثواني — واجهة tikwm.com السريعة |
انستاجرام | ~10 ثواني — استخراج مباشر من الصفحة |
التثبيت السريع
git clone https://github.com/u2n4/video-url-analyzer-mcp.git
cd video-url-analyzer-mcp
pip install -e .الامان
الخادم محمي ضد:
SSRF — قائمة بيضاء للنطاقات المسموحة فقط
حقن الاوامر — حظر الاوامر الخطيرة + تنفيذ بدون shell
اختراق المسارات — حظر 25+ مسار حساس
حماية من الحمل الزائد — حد اقصى 10 مهام متزامنة
الحصول على مفتاح API
اذهب الى Google AI Studio
انشئ مفتاح API مجاني
ضعه في ملف
.env
Available Tools
18 toolsanalyze_videoA
Analyze a video or photo/slideshow post from YouTube, TikTok, or Instagram.
Provides comprehensive audio + visual analysis using Gemini AI. Works with videos AND photo/slideshow posts on TikTok, Instagram, and YouTube community posts. YouTube videos are analyzed directly and return the result immediately. TikTok and Instagram videos are processed in the background — the tool returns a job_id. Use check_analysis_job(job_id) to poll for the result.
Inputs: url (required), model, prompt. Returns: result
analyze_video_segmentB
Analyze only a selected video segment.
Uses Gemini video_metadata clipping when available. Gemini performs video/audio/visual reasoning. detail controls model + max_output_tokens + thinking/media config.
Inputs: end (required), url (required), start (required), model, +3 more. Returns: result
ask_about_videoA
Ask a specific question about a video or photo/slideshow post.
Works with videos AND photo/slideshow posts on TikTok, Instagram, and YouTube community posts. YouTube returns the answer immediately. TikTok/Instagram return a job_id — use check_analysis_job(job_id) to poll for the result.
Inputs: url (required), question (required), model. Returns: result
ask_video_contextC
Answer a question from saved video context without Gemini by default.
Inputs: question (required), video_id_or_url (required), detail, use_gemini, +1 more. Returns: result
check_analysis_jobA
Check the status of a background video analysis job.
When analyze_video, get_transcript, ask_about_video, or watch_and_analyze returns a job_id (for TikTok/Instagram videos), use this tool to poll for the result. Keep calling until status is "completed" or "failed".
Inputs: job_id (required). Returns: result
cleanup_video_cacheC
Inspect or clean managed video cache files. Safe dry-run by default.
Inputs: scope, dry_run, video_id. Returns: result
delete_video_contextC
Delete one saved local video context file.
Inputs: video_id_or_url (required). Returns: result
execute_tutorial_stepsA
Review or execute tutorial steps extracted by watch_and_analyze.
SAFETY: By default (confirm=false), this only shows a summary of what WOULD be executed. Set confirm=true ONLY after reviewing the steps.
Inputs: steps_json (required), confirm. Returns: result
find_video_momentsB
Find moments in a video matching a semantic query.
Gemini performs the video/audio/visual reasoning. detail controls model + max_output_tokens + thinking/media config. compact is default and returns concise structured JSON.
Inputs: url (required), query (required), model, detail, +3 more. Returns: result
get_transcriptA
Extract speech transcript from a video or slideshow audio track.
YouTube returns the result immediately. TikTok/Instagram return a job_id — use check_analysis_job(job_id) to poll for the result. Slideshows without audio return a structured slideshow_no_audio response.
Inputs: url (required), lang, model. Returns: result
get_video_clipC
Extract a local video clip under 30 seconds and return metadata.
Inputs: end (required), start (required), video_id_or_url (required), reason, +3 more. Returns: result
get_video_evidence_assetC
Find saved visual evidence and return a local frame/clip reference.
Inputs: request (required), video_id_or_url (required), asset_type, preferred_end, +3 more. Returns: result
get_video_frameC
Extract a local still frame and return compact asset metadata.
Inputs: timestamp (required), video_id_or_url (required), reason, force_refresh, +1 more. Returns: result
list_video_contextsC
List saved local video context files.
Inputs: limit, filter_text. Returns: result
list_video_sourcesC
List cached video sources, contexts, and assets. Never calls Gemini.
Inputs: limit, filter_text. Returns: result
prepare_slideshow_assetsA
Return slideshow images as ordered MCP image blocks for client-side vision.
This tool does not call Gemini. It downloads TikTok Photo Mode, Instagram photo/carousel posts, or YouTube community post images, then returns each image directly to the MCP client with an explicit image_index label. Use it when you want Claude/the client AI to inspect the images itself instead of receiving a Gemini-generated analysis.
Inputs: url (required), include_audio. Returns: result
prepare_video_contextC
Analyze a whole video once and save a local structured context.
Inputs: url (required), model, detail, chunk_seconds, +1 more. Returns: result
watch_and_analyzeA
Watch a video tutorial and extract all technical steps, commands, and code.
Downloads the video, analyzes it with Gemini AI, and returns structured JSON with every command, code snippet, file path, and tool mentioned. YouTube returns the result immediately. TikTok/Instagram return a job_id — use check_analysis_job(job_id) to poll for the result.
This tool ONLY analyzes — it does NOT execute anything. Use execute_tutorial_steps to run the extracted steps after review.
Inputs: url (required), lang, model. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 18 tools
Several tools have overlapping purposes, such as analyze_video, watch_and_analyze, and prepare_video_context all performing analysis, and multiple get_* tools for extracting clips/frames. While descriptions provide some differentiation, an agent could easily confuse them.
Tool names consistently use verb_noun snake_case (e.g., analyze_video, get_transcript). Minor deviations include ask_video_context (missing preposition) and watch_and_analyze (compound verb), but overall pattern is predictable.
18 tools is somewhat high for a video analyzer, covering analysis, Q&A, extraction, and management. The count is at the upper bound of reasonable, but many tools are specialized and the scope justifies most.
The tool surface covers analysis, Q&A, transcript, moments, clips, context management, and tutorial extraction. Missing operations like updating sources or more advanced editing, but core workflows are well-supported.
Maintenance
Related MCP Connectors
Transcripts and AI summaries of TikTok, YouTube, Instagram, Facebook and X videos from a link.
Turn YouTube, TikTok, Instagram, Facebook, X and article URLs into transcripts, comments and JSON.
Transcripts, summaries, chapters and timestamped search for video links, for AI agents.
Any video URL to LLM-ready transcript. ASR built in, no captions needed. TikTok, X, TED and more.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAutomatically scans and summarizes video links (YouTube, Instagram Reels) and text links (blogs, articles) using AI-powered transcription and summarization. Provides concise 3-sentence summaries without requiring API keys.-
- AlicenseNot gradedqualityDmaintenanceTransforms social media links (TikTok, Instagram, YouTube) and videos into text context with transcription, OCR, and metadata for AI agents like Claude and Cursor.MIT
- AlicenseNot gradedqualityCmaintenanceEnables extracting timestamped transcripts from YouTube and TikTok URLs, including title, channel, and duration, via a single tool.MIT
- AlicenseAqualityCmaintenanceEnables agents to turn public video links into timestamped transcripts, chapters, and clip suggestions for YouTube, Twitch, Kick, and TikTok.3MIT