# youtube-video-analyzer [Health: Active]

**Category:** 🎥 Multimedia Process  
**Repository:** https://github.com/ludmila-omlopes/youtube-video-analyzer-mcp  
**GitHub Stars:** 5  
**npm Downloads (last month):** 132  
**Views:** 2  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/youtube-video-analyzer

## Description
MCP stdio server for analyzing YouTube videos with Google Gemini

## Tools
Capabilities this server exposes over MCP:

- **analyze_youtube_video** — Analyze a public YouTube video with Google Gemini. The YouTube URL is normalized to a canonical watch URL, then sent as video input with optional clip offsets attached through videoMetadata. Detects the dominant language of the video, returns natural-language fields in that language, and accepts an optional custom JSON schema.
- **analyze_long_youtube_video** — Analyze a long public YouTube video with Gemini long-video handling. Auto mode prefers uploaded-file analysis first because Files API is the recommended path for long videos, and falls back to URL chunks when needed. Direct YouTube URL chunking remains available as an explicit strategy for public videos, but should be treated as a preview-oriented convenience path.
- **continue_long_video_analysis** — Continue analyzing a previously uploaded long-video session. When possible, this tool reuses the cached uploaded asset created by analyze_long_youtube_video instead of re-downloading the video.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "youtube-video-analyzer": {
    "command": "npx",
    "args": ["-y","@ludylops/youtube-video-analyzer-mcp"],
    "env": {
      "GEMINI_API_KEY": ""
    }
  }
}
```

**Requires environment variables:** `GEMINI_API_KEY` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What youtube-video-analyzer MCP server does

The youtube-video-analyzer MCP server exposes Google Gemini-based analysis for public YouTube videos through MCP stdio. It can summarize or inspect short videos, analyze bounded clip windows, focus on spoken content, retrieve normalized public metadata, and extract a high-resolution JPEG frame at a requested timestamp.

Long videos and VODs have two supported workflows. MCP task-capable clients can use the native long-video analysis and follow-up tools. Clients with fixed synchronous timeouts can start a background job, poll its status, retrieve the result, or cancel it. Completed long-video work may produce a reusable session for follow-up questions.

The server can return structured JSON when a custom response schema is supplied. It is intended for public YouTube content; access restrictions imposed by YouTube or Gemini can prevent analysis.

## How it works

Analysis requests send the YouTube URL, prompts, and relevant media or derived chunks to Google Gemini. For long videos, the server first exposes local capability information so the client can select an appropriate strategy.

When `yt-dlp`, `ffmpeg`, and a writable temporary directory are available, the long-video workflow can download temporary media and use an uploaded Gemini file session. The `url_chunks` strategy avoids local media downloads but can require additional Gemini calls. Short-video analysis and bounded windows are available through `analyze_youtube_video`, while `analyze_youtube_video_audio` supplies audio-first instructions for speech-focused material.

Frame extraction uses `yt-dlp` and `ffmpeg` to download a small, temporary high-quality window and return an exact JPEG frame. If timestamp refinement is requested, Gemini selects the timestamp; it does not generate the image pixels.

## Setup and configuration

The youtube-video-analyzer MCP server requires Node.js 20 or newer and a Gemini API key. Add the published npm package to an MCP client's configuration with `npx`, or install it globally and run the included setup command. A YouTube Data API key is optional overall but required by `get_youtube_video_metadata`.

The main environment variables are `GEMINI_API_KEY`, `YOUTUBE_API_KEY`, `GEMINI_MODEL`, `YT_DLP_PATH`, and `MCP_LOG_LEVEL`. The repository also supports local development with `npm install`, `npm run build`, `npm test`, and `npm start`.

For best long-video support, install `yt-dlp` and `ffmpeg`. If those tools are unavailable, use URL chunking or analyze a shorter bounded window instead.

## Tools and capabilities

Available MCP tools include:

- Inspecting local support for long-video strategies.
- Fetching normalized public YouTube metadata.
- Extracting timestamped JPEG frames, with optional timestamp refinement.
- Analyzing short videos, bounded clips, or speech-focused content.
- Running native long-video tasks or compatibility background jobs.
- Polling, retrieving, and cancelling long-video jobs.
- Continuing a previous long-video session with follow-up questions.

The youtube-video-analyzer MCP server is a fit for agents that need video summaries, timestamped observations, spoken-content analysis, metadata lookup, or question answering over a previously analyzed long video.

## Limitations and notes

The youtube-video-analyzer MCP server sends requested URLs, prompts, media, or derived chunks to Google Gemini. With uploaded-file processing, local tools may first download temporary media. URL chunking reduces local downloads but may increase the number of Gemini requests.

Private, deleted, age-restricted, member-only, DRM-protected, or region-blocked videos may fail depending on YouTube and Gemini access. Long-video native tools require MCP task execution; use the background-job sequence when the client supports only synchronous calls with a fixed timeout. Users must comply with applicable YouTube and Gemini terms, copyright requirements, and local law.

_Full upstream README: https://allmcps.com/mcp/youtube-video-analyzer/readme_

