video-analyzer
Allows analyzing videos with Google's Gemini API, including uploading video files, polling processing, and generating structured ad-creative analysis reports with scene breakdowns, transcripts, and performance signals.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@video-analyzeranalyze C:/ads/summer_sale.mp4 and summarize the ad creative"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Video Analyzer
Gemini-powered video analysis for ad creatives — a web app, a desktop app, a Python CLI, and an MCP server.
Point it at a video file or a folder of videos. Each video is uploaded to Gemini (which watches the full video — audio, visuals, on-screen text, transitions) and returns a structured ad-creative analysis as markdown: scene-by-scene breakdown, full transcript, creative-structure teardown, performance signals, and an iteration brief.
New to this? Download SETUP-WITH-AI.md, attach it to any AI chat (Claude, ChatGPT, Gemini), and press Enter. The AI walks you through setup one step at a time.
Install
git clone https://github.com/thomasbrosch/video-analyzer.git
cd video-analyzer
pip install -e .Requires Python 3.10+.
Related MCP server: Google Ads MCP Server
API key
You bring your own Gemini key; this repo never contains one. Get a free key from https://aistudio.google.com/apikey, then set it once (Windows):
setx GEMINI_API_KEY <your_key>Open a new terminal after setx so the variable is picked up. You can also pass
--api-key on the CLI or set it in the MCP server config.
CLI usage
video-analyzer "C:\path\to\some_ad.mp4" # analyze one video
video-analyzer "C:\path\to\ads_folder\" # analyze a whole folder
video-analyzer "C:\path\to\ads_folder\" -m pro # use the Pro model
video-analyzer "C:\path\to\ads_folder\" -o ".\reports\" # save markdown files
video-analyzer "C:\path\to\some_ad.mp4" -v # verbose (upload/processing logs)
video-analyzer "C:\path\to\some_ad.mp4" --json # machine-readable JSON outputYou can also run it as a module: python -m video_analyzer <path>.
Options
Flag | Meaning |
|
|
| Directory to write |
| Gemini API key (overrides |
| Custom analysis prompt (overrides the default) |
| Keep uploaded files on Gemini after analysis |
| Verbose logging |
| Output results as JSON |
Models
Name | API ID | Use for |
| latest Gemini Flash | Batch processing a folder of ads, quick turnaround |
| latest Gemini Pro | Deep single-video analysis, complex creatives |
Desktop app (Windows)
video-analyzer-guiDrag videos in, pick a model and report format (Markdown, Word, PDF), and paste your key once.
Web app
A browser version with the same analysis. Run it locally:
pip install -e ".[web]"
export GEMINI_API_KEY=your_key # optional; visitors can paste their own instead
python -m video_analyzer.webapp # http://localhost:8080Deploy it anywhere that runs a Docker container (Render, Google Cloud Run, Railway, Fly.io):
docker build -t video-analyzer .
docker run -p 8080:8080 -e GEMINI_API_KEY=your_key video-analyzerSet GEMINI_API_KEY as a secret environment variable on the host, never in the repo. If you host it
publicly with your own key, protect your bill:
Variable | Default | Purpose |
| none | Require a passphrase to use the server's key (visitors can still paste their own key) |
| 200 | Max video size |
| 5 | Analyses per IP per hour on the server's key |
| 50 | Total analyses per day on the server's key |
Also set a spending cap on the key in Google AI Studio / Cloud billing.
Supported formats
.mp4 .mpeg .mov .avi .flv .mpg .webm .wmv .3gp .m4v .mkv
MCP server (Claude Desktop)
Add to claude_desktop_config.json:
{
"mcpServers": {
"video-analyzer": {
"command": "video-analyzer-mcp",
"env": {
"GEMINI_API_KEY": "<your_key>"
}
}
}
}Exposes two tools: analyze_video (file or folder) and list_videos (preview a folder).
Privacy
Videos are sent to Google's Gemini API for analysis, so don't upload footage you aren't allowed to share with Google. The web app deletes the uploaded file from the server and from Gemini storage when the analysis finishes.
How it works
Videos are uploaded via the Gemini Files API, polled until they finish processing,
analyzed with generate_content, and (by default) deleted from Gemini storage
afterward. Large videos take longer to process; the uploader waits up to 5 minutes.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
- mcpOAuthio.styleforge
Brand-aware creative studio for Claude: 200+ tools for on-brand ads, video, email and campaigns.
Ask Claude about your ads: Meta, Google, TikTok, LinkedIn, GA4 & Shopify. No AI credits.
Turn Claude into a creative studio: DNA-locked characters, images, video, voiceover — 55 tools.
GA4, Google Ads and Search Console in Claude. Read-only OAuth, multi-account for agencies.
Related MCP Servers
- AlicenseBqualityCmaintenanceEnables Claude Desktop to generate text and analyze images using Google's Gemini Pro API. Provides seamless integration between Claude and Gemini's AI capabilities through natural language commands.2MIT
- FlicenseNot gradedqualityDmaintenanceEnables Claude Desktop to access and manage Google Ads data, including campaigns, ad groups, keywords, budgets, and visualizations, through natural language interactions.19-
- AlicenseNot gradedqualityDmaintenanceEnables video processing operations (speed adjustment, keyframe optimization, concatenation, and file management) using FFmpeg via Claude Desktop.242 npm4MIT
- AlicenseAqualityDmaintenanceEnables Claude to analyze short-form video ads by extracting frames, audio, and transcripts, providing visual contact sheets, audio profiles, and YAMNet audio-event tags via MCP tools.4MIT