# kirbah-mcp-youtube [Health: Active]

**Category:** 🗄️ Databases  
**Repository:** https://github.com/kirbah/mcp-youtube  
**GitHub Stars:** 34  
**npm Downloads (last month):** 5257  
**Views:** 4  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/kirbah-mcp-youtube

## Description
Provide token-optimized, structured YouTube data to enhance your LLM applications. Access efficien…

## Tools
Capabilities this server exposes over MCP:

- **getVideoDetails** — Get detailed information about multiple YouTube videos. Returns comprehensive data including video metadata, statistics, and content details. Use this when you need complete information about specific videos.
- **searchVideos** — Universal search tool for YouTube content. Use this to find **videos** (default) or **channels**. To find a specific content creator, you MUST set `type` to 'channel'. Supports filtering by `recency` (e.g., 'pastWeek') and `videoDuration`. Returns `videoId` or `channelId` needed for other tools.
- **getTranscripts** — Retrieves specific, meaningful segments of a video's transcript. By default, it returns the intro 'hook' and the final 'outro' or call to action. It can also return the full transcript text. Use this to efficiently analyze a video's key messaging.
- **getVideoComments** — Retrieves comments for a video. Warning: Setting `maxReplies` > 0 significantly increases API cost. Only set `maxReplies` if you specifically need to analyze conversation threads. Defaults to top-level comments only.
- **getChannelStatistics** — Retrieves statistics for multiple channels. Returns detailed metrics including subscriber count, view count, video count, and channel creation date for each channel. Use this when you need to analyze the performance and reach of multiple YouTube channels.
- **getChannelTopVideos** — Retrieves a channel's most popular videos. CRITICAL: Requires a valid `channelId` (starting with 'UC...'), NOT a channel handle or name. Use `searchVideos` (type='channel') first to find the `channelId` if you only have a name.
- **getTrendingVideos** — Retrieves trending videos based on region and category. Returns a list of videos that are currently popular in the specified region and category. Use this when you want to discover what's trending in specific areas or categories. To get available category IDs and their names, use the getVideoCategories tool first.
- **getVideoCategories** — Retrieves available video categories for a specific region. Returns a list of YouTube video categories with their IDs and titles that can be used for filtering trending videos or other category-specific operations. Different regions may have different available categories.
- **findConsistentOutlierChannels** — A powerful, high-cost discovery tool. It finds emerging channels that show consistent, high-performance relative to their size within a specific topic and timeframe.

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

```json
"mcpServers": {
  "kirbah-mcp-youtube": {
    "command": "npx",
    "args": ["-y","@kirbah/mcp-youtube"],
    "env": {
      "YOUTUBE_API_KEY": "",
      "MDB_MCP_CONNECTION_STRING": ""
    }
  }
}
```

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

## Documentation

## What kirbah-mcp-youtube does

kirbah-mcp-youtube connects MCP-compatible AI clients to YouTube data operations. Its tools cover video metadata and statistics, video and channel search, captions, channel performance, trending content, categories, comments, and niche-level outlier discovery.

The responses are deliberately reduced to fields useful for language-model workflows rather than reproducing the full YouTube API payload. Video and channel results can include metadata, counts, engagement ratios, dates, and other content details in a compact structure. Transcript retrieval supports full captions or selected sections such as introductions and conclusions.

## How it works

The package runs as an MCP server over a local standard-input/output process. A client starts it with `npx -y @kirbah/mcp-youtube`, then exposes the registered tools to an AI agent.

Transcript access can be used without environment configuration. Adding a YouTube Data API v3 key enables the server's broader search and analytics operations. An optional MongoDB connection provides a caching layer for repeated requests, including searches and video or trend lookups, which can avoid spending additional YouTube API quota on cached results.

## Setup and configuration

A minimal client entry is:

```json
{
  "mcpServers": {
    "youtube": {
      "command": "npx",
      "args": ["-y", "@kirbah/mcp-youtube"]
    }
  }
}
```

For expanded functionality, add `YOUTUBE_API_KEY` with a YouTube Data API v3 key. To enable MongoDB-backed caching and niche analysis, add `MDB_MCP_CONNECTION_STRING` with a MongoDB connection string. The package can be configured manually in clients such as Claude Desktop or Cursor. On Windows PowerShell, the setup notes recommend invoking `npx` through `cmd` if a direct `npx` command fails.

## Tools and capabilities

- `getVideoDetails` accepts multiple video IDs and returns concise metadata, statistics, engagement ratios, and content information.
- `searchVideos` searches for videos or channels with query, result-count, ordering, type, channel, and related filters.
- `getTranscripts` retrieves captions for multiple videos, either as complete text or selected key segments, with multi-language support.
- `getChannelStatistics` returns subscriber, view, video-count, and creation-date data for multiple channels.
- `getChannelTopVideos` lists a channel's best-performing videos with compact details and engagement ratios.
- `getTrendingVideos` finds trending videos by region and optional category.
- `getVideoCategories` lists category IDs and titles for a selected region.
- `getVideoComments` retrieves comments with sorting, result limits, and a small configurable number of replies per comment.
- `findConsistentOutlierChannels` identifies channels that repeatedly outperform others in a defined niche and requires MongoDB.

## Limitations and notes

The YouTube Data API has a daily quota, so repeated uncached requests can consume available units. MongoDB caching is optional but is relevant when agents repeat searches or analytics requests. The outlier-channel tool requires a MongoDB connection. Results are optimized for compact AI processing, so this server is better suited to targeted analysis than to retrieving every field in YouTube's raw API responses.

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

