# youtube-video-analyzer

youtube-video-analyzer — an MCP server that analyzes public YouTube videos via Google Gemini. Extracts speech, metadata, frames, handles long streams.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 5 repo stars
- Author: ludmila-omlopes
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/ludmila-omlopes/youtube-video-analyzer-mcp
- Updated: 2026-05-21
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/youtube-video-analyzer

## What it does

The server connects Gemini tools to Claude Code, Cursor, and other MCP clients. It can summarize videos, transcribe speech, fetch metadata through the YouTube Data API, and extract high-resolution frames using `yt-dlp` and `ffmpeg`. For long videos and VODs, the server offers two paths: MCP tasks (if the client supports them) or background jobs with status polling. When local tools are unavailable, the server switches to `url_chunks` strategy — no media downloads, but more Gemini calls.

Requires Node.js 20 or newer and a Gemini API key. YouTube Data API is only needed for metadata. Without `yt-dlp` and `ffmpeg` in `PATH`, the server cannot extract frames or process long videos via local files — only the URL strategy remains.

The server sends video URLs, prompts, and media fragments to Gemini. Private, deleted, age-restricted, and region-blocked videos may fail.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `GEMINI_API_KEY`, `GEMINI_MODEL`, `YT_DLP_PATH` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env GEMINI_API_KEY=<GEMINI_API_KEY> --env GEMINI_MODEL=<GEMINI_MODEL> --env YT_DLP_PATH=<YT_DLP_PATH> --transport stdio youtube-video-analyzer -- npx -y @ludylops/youtube-video-analyzer-mcp
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add youtube-video-analyzer --env GEMINI_API_KEY=<GEMINI_API_KEY> --env GEMINI_MODEL=<GEMINI_MODEL> --env YT_DLP_PATH=<YT_DLP_PATH> -- npx -y @ludylops/youtube-video-analyzer-mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "youtube-video-analyzer": {
            "command": "npx",
            "args": [
                "-y",
                "@ludylops/youtube-video-analyzer-mcp"
            ],
            "env": {
                "GEMINI_API_KEY": "<GEMINI_API_KEY>",
                "GEMINI_MODEL": "<GEMINI_MODEL>",
                "YT_DLP_PATH": "<YT_DLP_PATH>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "youtube-video-analyzer": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@ludylops/youtube-video-analyzer-mcp"
            ],
            "env": {
                "GEMINI_API_KEY": "<GEMINI_API_KEY>",
                "GEMINI_MODEL": "<GEMINI_MODEL>",
                "YT_DLP_PATH": "<YT_DLP_PATH>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e GEMINI_API_KEY=<GEMINI_API_KEY> -e GEMINI_MODEL=<GEMINI_MODEL> -e YT_DLP_PATH=<YT_DLP_PATH> youtube-video-analyzer npx -y @ludylops/youtube-video-analyzer-mcp
```
Replace <…> with your own values

## When to use it
- summarize a long stream or podcast
- transcribe speech from a video
- extract a frame from a video at a timestamp
- fetch video metadata via YouTube Data API
- ask a follow-up question about an already analyzed video

## Example prompts
- Analyze this video and extract key points
- Extract a frame at 2:30 from this video
- Fetch video metadata and show the duration

## Similar
- [video-content-analyzer](https://affpapa.org/en/nevibecode/skills/video-content-analyzer.md) — skill · 918 installs
- [Video URL Analyzer](https://affpapa.org/en/nevibecode/mcp/video-url-analyzer.md) — MCP server · ★ 5 repo stars
- [youtube-research](https://affpapa.org/en/nevibecode/skills/manojbajaj95-youtube-research.md) — skill · 200 installs
- [youtube-transcribe](https://affpapa.org/en/nevibecode/skills/youtube-transcribe.md) — skill · 1700 installs
- [youtube-video-generation](https://affpapa.org/en/nevibecode/skills/youtube-video-generation.md) — skill · 370 installs
- [youtube-publishing-and-metadata](https://affpapa.org/en/nevibecode/skills/youtube-publishing-and-metadata.md) — skill · 1300 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
