# mcp-youtube-intelligence [Health: Active]

**Category:** 🌐 Social Media  
**Repository:** https://github.com/Dmitriusan/mcp-youtube-intelligence  
**GitHub Stars:** 0  
**npm Downloads (last month):** 769  
**Views:** 6  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/mcp-youtube-intelligence

## Description
MCP server for extracting structured intelligence from YouTube channels and videos — transcripts, topics, competitive signals

## Tools
Capabilities this server exposes over MCP:

- **analyze_channel** — Analyze a YouTube channel and return a JSON object with: channel_id, channel_title, channel_url, sample_video_ids[], videos_analyzed (count of videos fetched from playlist), transcripts_available (count with actual caption content), topics[] (top keyword frequencies across all transcripts), topics_structured[] (per-video semantic analysis — each entry has video_id/theme/entities[]/tags[]), note (which analysis mode ran — and, when Gemini was configured but failed, why), and optional output_path (local artifact path). Requires YOUTUBE_API_KEY and APIFY_TOKEN; set GEMINI_API_KEY for topics_structured semantic analysis (falls back to keyword-only when absent). Supported channel inputs: @handle (e.g. @fireship), youtube.com/@handle URL, /channel/UC... URL, bare 24-char UCxxxxxx ID, or legacy /c/ and /user/ URLs.

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

```json
"mcpServers": {
  "mcp-youtube-intelligence": {
    "command": "npx",
    "args": ["-y","mcp-youtube-intelligence"],
    "env": {
      "YOUTUBE_API_KEY": "",
      "APIFY_TOKEN": "",
      "GEMINI_API_KEY": "",
      "ANALYZE_CHANNEL_OUTPUT_DIR": ""
    }
  }
}
```

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

## Documentation

## What mcp-youtube-intelligence does

mcp-youtube-intelligence turns recent YouTube channel content into a structured intelligence report. The main operation, `analyze_channel`, resolves a channel, fetches recent uploads, obtains transcript content, and summarizes the available text.

The result includes the resolved channel ID and title, the channel URL supplied to the tool, analyzed video IDs, the number of videos fetched, and the number with usable captions. It also returns a keyword list based on word frequency across transcripts. When Gemini analysis is available, each eligible video can include a theme, named entities, and tags.

This makes the server suitable for reviewing a creator’s recurring subjects, comparing content themes, or building a lightweight research workflow around YouTube channels. It analyzes up to 50 recent videos, with five used by default.

## How it works

The server runs as a command-line MCP process using stdio transport. An MCP client starts the command and communicates with the exposed tool rather than using the command interactively in a terminal.

Channel input can be an `@handle`, a full handle URL, a `/channel/UC...` URL, a bare 24-character channel ID, or a legacy `/c/` or `/user/` URL. The server finds the channel’s uploads and processes the requested number of recent videos.

Transcript-wide keyword extraction always runs when transcript text is available. It counts plain English words and returns up to 20 high-frequency keywords. Gemini processing sends only the first 1,000 words of each transcript for semantic analysis. If Gemini is unavailable, fails, or returns unusable content, the response uses keyword analysis and records the analysis mode or reason in `note`.

## Setup and configuration

Install the package globally with:

```bash
npm install -g mcp-youtube-intelligence
```

The server needs a YouTube Data API v3 key in `YOUTUBE_API_KEY` and an Apify token in `APIFY_TOKEN`. `GEMINI_API_KEY` is optional; add it to enable per-video semantic topics. Gemini failures also trigger the keyword-only fallback.

A typical Claude Desktop configuration invokes the installed command over stdio:

```json
{
  "mcpServers": {
    "youtube-intelligence": {
      "command": "mcp-youtube-intelligence",
      "env": {
        "YOUTUBE_API_KEY": "your-youtube-api-key",
        "APIFY_TOKEN": "your-apify-token",
        "GEMINI_API_KEY": "your-gemini-api-key"
      }
    }
  }
}
```

Set `ANALYZE_CHANNEL_OUTPUT_DIR` to choose where per-channel JSON artifacts are written. An absolute path is preferable because the default `./output/` location depends on the MCP client’s working directory. The report can still be returned if artifact writing fails.

## Tools and capabilities

- `analyze_channel`: Analyze a YouTube channel using a supported handle, URL, or channel ID.
- Select the number of recent videos with `max_videos`, from the default of 5 up to 50.
- Extract transcript availability and sample video IDs.
- Produce cross-transcript keyword frequencies.
- Generate Gemini-based themes, entities, and tags per video when configured.
- Write a JSON analysis artifact and return its local path when the write succeeds.

The command also supports `--help` and `--version` or their short forms, while running without flags starts the MCP server.

## Limitations and notes

Keyword extraction is limited to plain English words, so transcripts in other languages may yield few or no entries in `topics`. Gemini structured results can still work with non-English transcripts when Gemini is configured. Only the first 1,000 words of each transcript are sent to Gemini.

Videos without caption content cannot contribute transcript-based analysis. A video that Gemini blocks or for which Gemini returns no usable result is omitted from `topics_structured`. The response’s `note` identifies the fallback or missing-transcript condition when relevant.

The server writes output artifacts locally, and a client working directory such as `/` may prevent the default relative output directory from being created. Use an absolute output directory when persistence matters.

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

