CAT
/MCP
SkillsMCPMarketplacesDigestToolsAdvertise

This week in Claude

Every Monday: Claude Code, Agent SDK, MCP, and the Anthropic platform moves worth your time.

Skills by Category
Frontend DevelopmentBackend & APIsTesting & QASecurityDevOps & CI/CDGit & Pull RequestsDocumentationCode Review & QualityAI & Agent BuildingSkill Development
MCP Servers by Category
Sales & MarketingWeb & Browser AutomationDatabasesAI & LLM ToolsCloud & InfrastructureCommunication & MessagingDeveloper ToolsDesign & CreativeDocuments & KnowledgeSearch & Web Crawling
Marketplaces by Category
AI Agents & OrchestrationLLM IntegrationDevelopment ToolsFrontend & UIBackend & APIsDatabasesTesting & Code QualityDevOps & CloudSecurity & ComplianceGit & Version Control

Cross AI Tools

Discover Claude Code plugins, extensions, and tools. Automatically updated directory of Anthropic Claude AI marketplaces with development tools, productivity plugins, and integrations.

Resources

  • Browse Skills
  • Browse MCP Servers
  • Browse Marketplaces
  • Plugins Reference

Community

  • About
  • Tools
  • Feedback
  • Privacy Policy
  • Advertise

Built for the Claude Code community with Claude Code by @mertduzgun

Independent project, not affiliated with Anthropic

YouTube Data

kirbah/mcp-youtube
1916 toolsauthSTDIOregistry active
Summary

Connects to YouTube Data API v3 and exposes search, video details, channel statistics, transcripts, comments, and trending video discovery. Built with token optimization as a first principle, stripping YouTube's bloated JSON payloads down by 64-87% compared to raw API responses. Includes optional MongoDB caching to protect your daily API quota when agents re-query the same data. Ships with transcript fetching in zero-config mode if you want to skip the API key setup. Designed for production use with 97% test coverage and strict type safety via Zod. Reach for this when you need your LLM to analyze YouTube content, research channels, or extract insights from comments without burning through context windows or quota limits.

CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Keep your Mac awake
Keep your Mac awake
Keep your Mac awake while Claude Code and 40+ AI agents run. Sleeps when they're idle.
One time payment $9 →
Context.devContext.dev
Context.dev
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Make money from your Skills
Make money from your Skills
On Capafy, your Skill runs online 24/7 as an agent product, and you get paid every time someone uses it.
Start earning →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Keep your Mac awake
Keep your Mac awake
Keep your Mac awake while Claude Code and 40+ AI agents run. Sleeps when they're idle.
One time payment $9 →
Context.devContext.dev
Context.dev
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Make money from your Skills
Make money from your Skills
On Capafy, your Skill runs online 24/7 as an agent product, and you get paid every time someone uses it.
Start earning →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →

Tools

Public tool metadata for what this MCP can expose to an agent.

16 tools
YOUTUBE_GET_CHANNEL_ACTIVITIESGets recent activities from a YouTube channel including video uploads, playlist additions, likes, and other channel events.6 params

Gets recent activities from a YouTube channel including video uploads, playlist additions, likes, and other channel events.

Parameters* required
partstring
Comma-separated list of activity resource properties to include (e.g., 'snippet', 'contentDetails', 'id').default: snippet,contentDetails
channelIdstring
The YouTube channel ID to retrieve activities for. Channel IDs typically start with 'UC'.
pageTokenstring
Pagination token from a previous response to get the next page of results.
maxResultsinteger
Maximum number of activities to return.default: 25
publishedAfterstring
Return activities published after this date-time (RFC 3339 format: YYYY-MM-DDTHH:MM:SSZ).
publishedBeforestring
Return activities published before this date-time (RFC 3339 format: YYYY-MM-DDTHH:MM:SSZ).
YOUTUBE_GET_CHANNEL_ID_BY_HANDLERetrieves the YouTube Channel ID for a specific YouTube channel handle.1 params

Retrieves the YouTube Channel ID for a specific YouTube channel handle.

Parameters* required
channel_handlestring
The YouTube channel handle (e.g., @Google) for which to retrieve the corresponding channel ID. This handle must start with an '@' symbol.
YOUTUBE_GET_CHANNEL_STATISTICSGets detailed statistics for YouTube channels including subscriber counts, view counts, and video counts.2 params

Gets detailed statistics for YouTube channels including subscriber counts, view counts, and video counts.

Parameters* required
idstring
Comma-separated list of YouTube channel IDs. Channel IDs typically start with 'UC'. This is a required field and must be non-empty
partstring
Comma-separated list of channel resource properties to include. Use 'statistics' for subscriber count.default: statistics
YOUTUBE_GET_VIDEO_DETAILS_BATCHRetrieves multiple YouTube video resource parts in a single batch call. Use when you need cohort-level metrics for many videos to reduce quota usage and latency.3 params

Retrieves multiple YouTube video resource parts in a single batch call. Use when you need cohort-level metrics for many videos to reduce quota usage and latency.

Parameters* required
hlstring
Language for localized metadata (snippet.localized); IETF language tag, e.g., 'en'.
idarray
List of YouTube video IDs to retrieve (comma-separated in request).
partsarray
Comma-separated list of video resource properties to include. Valid parts can be one or more of: snippet, contentDetails, statistics, status, player, topicDetails, recordingDetails, fileDetails, processingDetails, suggestions, liveStreamingDetails, localizations, paidProductPlacementDetails, id.
YOUTUBE_LIST_CAPTION_TRACKRetrieves a list of caption tracks for a YouTube video, returning an empty list if no captions exist or failing if the video ID is invalid or not found.2 params

Retrieves a list of caption tracks for a YouTube video, returning an empty list if no captions exist or failing if the video ID is invalid or not found.

Parameters* required
partstring
Specifies a comma-separated list of one or more caption resource parts that the API response will include. Valid parts are 'id' and 'snippet'.default: snippet
videoIdstring
The YouTube video ID for which the API should return caption tracks.
YOUTUBE_LIST_CHANNEL_VIDEOSLists videos from a specified YouTube channel, ensuring results are of `type: 'video'`.4 params

Lists videos from a specified YouTube channel, ensuring results are of `type: 'video'`.

Parameters* required
partstring
Specifies `search` resource properties to include; it must be `snippet` for this action. The `snippet` includes basic video details like ID, title, description, and thumbnails.default: snippet
channelIdstring
The unique ID of the YouTube channel for which videos are to be retrieved.
pageTokenstring
Token for pagination; use `nextPageToken` from a previous response for the next page, or `prevPageToken` for the previous page.
maxResultsinteger
The maximum number of videos to return per page.default: 5
YOUTUBE_LIST_PLAYLIST_ITEMSTool to list videos in a playlist, with pagination support. Use when walking through a channel's uploads playlist to enumerate all videos.7 params

Tool to list videos in a playlist, with pagination support. Use when walking through a channel's uploads playlist to enumerate all videos.

Parameters* required
partstring
Comma-separated list of playlistItem resource parts to include in the response. Valid values: 'snippet', 'contentDetails', 'id', 'status'.default: snippet,contentDetails
fieldsstring
Selector specifying which fields to include in a partial response.
videoIdstring
Filter results to only those containing the specified video ID.
pageTokenstring
The token for the page of results to retrieve. Obtained from a previous call's nextPageToken.
maxResultsinteger
The maximum number of items to return per page. Must be between 0 and 50.default: 50
playlistIdstring
The ID of the playlist for which to retrieve items. Typically a channel's uploads playlist ID.
onBehalfOfContentOwnerstring
Note: For YouTube content partners. Authorize using a properly scoped account.
YOUTUBE_LIST_USER_PLAYLISTSRetrieves playlists owned by the authenticated user, implicitly using mine=True.3 params

Retrieves playlists owned by the authenticated user, implicitly using mine=True.

Parameters* required
partstring
Specifies a comma-separated list of one or more playlist resource properties to include in the response. Common values are 'snippet', 'id', and 'contentDetails'.default: snippet
pageTokenstring
Token for pagination to retrieve a specific page of results.
maxResultsinteger
Maximum number of playlists to return.default: 5
YOUTUBE_LIST_USER_SUBSCRIPTIONSRetrieves the authenticated user's YouTube channel subscriptions, allowing specification of response parts and pagination.3 params

Retrieves the authenticated user's YouTube channel subscriptions, allowing specification of response parts and pagination.

Parameters* required
partstring
Specifies the comma-separated subscription resource parts to include. Valid parts are `id`, `snippet`, `contentDetails`, and `subscriberSnippet`.default: snippet,contentDetails
pageTokenstring
Token for a specific page of results, obtained from a previous response. Omit for the first page.
maxResultsinteger
Maximum number of subscription items to return per page.default: 5
YOUTUBE_LOAD_CAPTIONSDownloads a specific YouTube caption track, which must be owned by the authenticated user, and returns its content as text. Note: This action requires you to own the video (YouTube Data API v3 restriction). Non-owned videos will return 403 Forbidden errors, including many auto...2 params

Downloads a specific YouTube caption track, which must be owned by the authenticated user, and returns its content as text. Note: This action requires you to own the video (YouTube Data API v3 restriction). Non-owned videos will return 403 Forbidden errors, including many auto...

Parameters* required
idstring
Unique YouTube-assigned ID of the caption track to download.
tfmtstring
Desired format for the caption track. Supported formats: 'srt' (SubRip), 'sbv' (SubViewer), 'vtt' (WebVTT).default: srt
YOUTUBE_SEARCH_YOU_TUBESearches YouTube for videos, channels, or playlists using a query term, returning the raw API response.5 params

Searches YouTube for videos, channels, or playlists using a query term, returning the raw API response.

Parameters* required
qstring
Search query term. Supports: - Basic text: 'machine learning' - Exact phrases: '"exact phrase"' - Exclusions: 'python -snake' - Multiple terms: 'AI OR ML' - Channel search: '@channelhandle' or channel name
partstring
Comma-separated list of search resource properties (e.g., 'id', 'snippet') to include in the API response.default: snippet
typestring
Restricts search to 'video', 'channel', or 'playlist'; comma-separate for multiple types (e.g., 'video,channel').default: video
pageTokenstring
Pagination token from a previous response's 'nextPageToken' or 'prevPageToken', used to retrieve a specific page of results.
maxResultsinteger
Maximum number of items to return per page.default: 5
YOUTUBE_SUBSCRIBE_CHANNELSubscribes the authenticated user to a specified YouTube channel, identified by its unique `channelId` which must be valid and existing.1 params

Subscribes the authenticated user to a specified YouTube channel, identified by its unique `channelId` which must be valid and existing.

Parameters* required
channelIdstring
Unique identifier (ID) of the YouTube channel to subscribe to (typically starts with 'UC').
YOUTUBE_UPDATE_THUMBNAILSets the custom thumbnail for a YouTube video using an image from thumbnailUrl; the authenticated user must have permission to edit the video.2 params

Sets the custom thumbnail for a YouTube video using an image from thumbnailUrl; the authenticated user must have permission to edit the video.

Parameters* required
videoIdstring
Identifier of the YouTube video for which to update the thumbnail.
thumbnailUrlstring
Publicly accessible URL of the new thumbnail image. Must be JPG, GIF, or PNG; under 2MB. Recommended: 16:9 aspect ratio, 1280x720 resolution (minimum 640px width).
YOUTUBE_UPDATE_VIDEOUpdates metadata for a YouTube video identified by videoId, which must exist; an empty list for tags removes all existing tags.6 params

Updates metadata for a YouTube video identified by videoId, which must exist; an empty list for tags removes all existing tags.

Parameters* required
tagsarray
New tags, replacing all existing. An empty list removes all. No change if omitted or `None`.
titlestring
New video title. No change if omitted or `None`.
videoIdstring
The video's unique YouTube ID, typically found in its URL.
categoryIdstring
New YouTube category ID. No change if omitted or `None`.
descriptionstring
New video description. No change if omitted or `None`.
privacyStatusstring
New privacy status ('public', 'private', or 'unlisted'). No change if omitted or `None`.
YOUTUBE_UPLOAD_VIDEOUploads a video from a local file path to a YouTube channel; the video file must be in a YouTube-supported format.6 params

Uploads a video from a local file path to a YouTube channel; the video file must be in a YouTube-supported format.

Parameters* required
tagsarray
List of keyword tags (strings) for the video, used to improve discoverability.
titlestring
The title for the video.
categoryIdstring
YouTube category ID (e.g., '22' for People & Blogs). See YouTube Data API docs for a full list of category IDs.
descriptionstring
Detailed description of the video content, optionally including keywords and context.
privacyStatusstring
Privacy status: 'public', 'private' (uploader/specified users only), or 'unlisted' (link accessible, not publicly listed).
videoFilePathstring
Video file to upload. Provide a FileUploadable object with valid s3key, mimetype, and name.
YOUTUBE_VIDEO_DETAILSRetrieves specified information parts (e.g., snippet, contentDetails, statistics) for a YouTube video, identified by its ID.2 params

Retrieves specified information parts (e.g., snippet, contentDetails, statistics) for a YouTube video, identified by its ID.

Parameters* required
idstring
The YouTube video ID (typically an 11-character string) for which details are to be retrieved.
partstring
Comma-separated list of video resource parts that the API response will include. Valid parts: 'snippet' (title, description, thumbnails), 'contentDetails' (duration, definition, dimension), 'statistics' (view count, like count, comment count), 'status' (upload status, privacy status), 'player' (embed HTML), 'topicDetails' (associated topics), 'recordingDetails' (recording location and date), 'liveStreamingDetails' (live broadcast details), and 'localizations' (localized metadata).default: snippet,contentDetails,statistics

YouTube Data MCP Server (@kirbah/mcp-youtube)

CI Status Code Coverage NPM Version NPM Downloads Node.js Version Support

A production-grade YouTube Data MCP server engineered specifically for AI agents.

Unlike standard API wrappers that flood your LLM with redundant data, this server strips away YouTube's heavy payload bloat. It is designed to save you massive amounts of context window tokens, protect your daily API quotas via caching, and run reliably without breaking your workflows.

Why Choose This Server?

Most MCP servers are weekend projects. @kirbah/mcp-youtube is built for reliable, daily, cost-effective agentic workflows.

📉 1. Save Up to 87% on Tokens (and Context Window)

The raw YouTube API returns massive JSON payloads filled with nested eTags, redundant thumbnails, and localization data that LLMs don't need. This server structures the data to give your LLM exactly what it needs to reason, and nothing else.

%%{init: { "theme": "base", "themeVariables": { "xyChart": { "plotColorPalette": "#ef4444, #22c55e" } } } }%%
xychart-beta
    title "Token Consumption (Lower is Better)"
    x-axis ["getVideoDetails", "searchVideos", "getChannelStats"]
    y-axis "Context Tokens" 0 --> 1200
    bar "Raw YouTube API" [854, 1115, 673]
    bar "MCP-YouTube (Optimized)" [209, 402, 86]
API MethodRaw YouTube TokensMCP-YouTube TokensToken SavingsData Size
getChannelStatistics67386~87% Less1.9 KB ➔ 0.2 KB
getVideoDetails854209~75% Less2.9 KB ➔ 0.6 KB
searchVideos1115402~64% Less3.4 KB ➔ 1.2 KB

(Curious? You can compare the raw API responses vs optimized outputs in the examples folder).

🛡️ 2. Protect Your API Quotas (Smart Caching)

The YouTube Data API has strict daily limits (10,000 quota units). If your LLM gets stuck in a loop or re-asks a question, standard servers will drain your API limit in minutes. This server includes an optional MongoDB caching layer. If your agent requests a video details or searches the same trending videos twice, the server serves it from the cache - costing you 0 API quota points.

🏗️ 3. Production-Grade & Actively Maintained

Tired of MCP tools crashing your AI client? This server is built to be a rock-solid dependency:

  • 97% Test Coverage: Comprehensively unit-tested (check the Codecov badge).
  • Zero Lint Errors/Warnings: Enforces strict, clean code (npm run lint passes 100%).
  • Active Security: Automated Dependabot patching ensures underlying libraries are never left with known vulnerabilities.
  • Strict Type Safety: Built using Zod validation and the robust MCP TypeScript Starter architecture.

Quick Start: Installation

🟢 Zero-Config Mode (No API Key Required)

Want to just fetch transcripts? You can use this server immediately without any configuration! Just install and go. Add a YouTube API key later to unlock deep search and analytics.

The easiest way to install this server is by clicking the "Add to Claude Desktop" button on the Glama server page.

If you are configuring manually (e.g., in Cursor), just add this bare-minimum setup:

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

✨ Tip: In Zero-Config mode, you can ask your AI to simply "Read the transcript for youtube://transcript/{videoId}"!

🟡 Manual Configuration (Unlock All Features)

If you prefer to configure your MCP client manually (e.g., Claude Desktop or Cursor), add the following to your configuration file:

  1. Get a YouTube Data API v3 Key (See Setup Instructions below).
  2. (Highly Recommended) Get a free MongoDB Connection String to enable quota-saving caching.
{
  "mcpServers": {
    "youtube": {
      "command": "npx",
      "args": ["-y", "@kirbah/mcp-youtube"],
      "env": {
        "YOUTUBE_API_KEY": "YOUR_YOUTUBE_API_KEY_HERE",
        "MDB_MCP_CONNECTION_STRING": "mongodb+srv://user:pass@cluster0.abc.mongodb.net/youtube_niche_analysis"
      }
    }
  }
}

(Windows PowerShell Users: If npx fails, try using "command": "cmd" and "args": ["/k", "npx", "-y", "@kirbah/mcp-youtube"])

Key Features

  • Optimized Video Information: Search videos with advanced filters. Retrieve detailed metadata, statistics (views, likes, etc.), and content details, all structured for minimal token footprint.
  • Efficient Transcript Management: Fetch video captions/subtitles with multi-language support, perfect for content analysis by LLMs.
  • Insightful Channel Analysis: Get concise channel statistics (subscribers, views, video count) and discover a channel's top-performing videos without data bloat.
  • Lean Trend Discovery: Find trending videos by region and category, and get lists of available video categories, optimized for quick AI processing.
  • Structured for AI: All responses are designed to be easily parsable and immediately useful for language models.
  • Efficient Comment Retrieval: Fetch video comments with fine-grained control over the number of results and replies, optimized for sentiment analysis and feedback extraction.

Available Tools

The server provides the following MCP tools, each designed to return token-optimized data:

Tool NameDescriptionParameters (see details in tool schema)
getVideoDetailsRetrieves detailed, lean information for multiple YouTube videos including metadata, statistics, engagement ratios, and content details.videoIds (array of strings)
searchVideosSearches for videos or channels based on a query string with various filtering options, returning concise results.query (string), maxResults (optional number), order (optional), type (optional), channelId (optional), etc.
getTranscriptsRetrieves token-efficient transcripts (captions) for multiple videos, with options for full text or key segments (intro/outro).videoIds (array of strings), lang (optional string for language code), format (optional enum: 'full_text', 'key_segments' - default 'key_segments')
getChannelStatisticsRetrieves lean statistics for multiple channels (subscriber count, view count, video count, creation date).channelIds (array of strings)
getChannelTopVideosRetrieves a list of a channel's top-performing videos with lean details and engagement ratios.channelId (string), maxResults (optional number)
getTrendingVideosRetrieves a list of trending videos for a given region and optional category, with lean details and engagement ratios.regionCode (optional string), categoryId (optional string), maxResults (optional number)
getVideoCategoriesRetrieves available YouTube video categories (ID and title) for a specific region, providing essential data only.regionCode (optional string)
getVideoCommentsRetrieves comments for a YouTube video. Allows sorting, limiting results, and fetching a small number of replies per comment.videoId (string), maxResults (optional number), order (optional), maxReplies (optional number), commentDetail (optional string)
findConsistentOutlierChannelsIdentifies channels that consistently perform as outliers within a specific niche. Requires a MongoDB connection.niche (string), minVideos (optional number), maxChannels (optional number)

For detailed input parameters and their descriptions, please refer to the inputSchema within each tool's configuration file in the src/tools/ directory (e.g., src/tools/video/getVideoDetails.ts).

Note on API Quota Costs: Most tools are highly efficient. getVideoDetails, getChannelStatistics, and getTrendingVideos cost only 1 unit per call. The getTranscripts tool has 0 API cost. The new getVideoComments tool has a variable cost: the base call is 1 unit, but if you request replies (by setting maxReplies > 0), it costs an additional 1 unit for each top-level comment it fetches replies for. The search-based tools are the most expensive: searchVideos costs 100 units and getChannelTopVideos costs 101 units.

Advanced Usage & Local Development

If you wish to contribute, modify the server, or run it locally outside of an MCP client's managed environment:

Prerequisites

  • Node.js (version specified in package.json engines field - currently >=20.0.0)
  • npm (usually comes with Node.js)
  • A YouTube Data API v3 Key (see YouTube API Setup)

Local Setup

  1. Clone the repository:

    git clone https://github.com/kirbah/mcp-youtube.git
    cd mcp-youtube
    
  2. Install dependencies:

    npm ci
    
  3. Configure Environment: Create a .env file in the root by copying .env.example:

    cp .env.example .env
    

    Then, edit .env to add your YOUTUBE_API_KEY:

    YOUTUBE_API_KEY=your_youtube_api_key_here
    MDB_MCP_CONNECTION_STRING=your_mongodb_connection_string_here
    

Development Scripts

# Run in development mode with live reloading
npm run dev

# Build for production
npm run build

# Run the production build (after npm run build)
npm start

# Lint files
npm run lint

# Run tests
npm run test
npm run test -- --coverage # To generate coverage reports

# Inspect MCP server using the Model Context Protocol Inspector
npm run inspector

Local Development with an MCP Client

To have an MCP client run your local development version (instead of the published NPM package):

  1. Ensure you have a script in package.json for a non-watching start, e.g.:

    "scripts": {
      "start:client": "tsx ./src/index.ts"
    }
    
  2. Configure your MCP client to spawn this local script:

    {
      "mcpServers": {
        "youtube_local_dev": {
          "command": "npm",
          "args": ["run", "start:client"],
          "working_directory": "/absolute/path/to/your/cloned/mcp-youtube",
          "env": {
            "YOUTUBE_API_KEY": "YOUR_LOCAL_DEV_API_KEY_HERE"
          }
        }
      }
    }
    

    Note on the env block above: Setting YOUTUBE_API_KEY directly in the env block for the client configuration is one way to provide the API key. Alternatively, if your server correctly loads its .env file based on the working_directory, you might not need to specify it in the client's env block, as long as your local .env file in the project root contains the YOUTUBE_API_KEY. The working_directory path must be absolute and correct for the server to find its .env file.

YouTube API Setup

  1. Go to the Google Cloud Console.
  2. Create a new project or select an existing one.
  3. In the navigation menu, go to "APIs & Services" > "Library".
  4. Search for "YouTube Data API v3" and Enable it for your project.
  5. Go to "APIs & Services" > "Credentials".
  6. Click "+ CREATE CREDENTIALS" and choose "API key".
  7. Copy the generated API key. This is your YOUTUBE_API_KEY.
  8. Important Security Step: Restrict your API key to prevent unauthorized use. Click on the API key name, and under "API restrictions," select "Restrict key" and choose "YouTube Data API v3." You can also add "Application restrictions" (e.g., IP addresses) if applicable.

System Requirements

  • Node.js: >=20.0.0 (as specified in package.json)
  • npm (for managing dependencies and running scripts)

Deep Dive: findConsistentOutlierChannels Tool

The findConsistentOutlierChannels tool is designed to identify emerging or established YouTube channels that consistently outperform their size within a specific niche. This tool is particularly useful for content creators, marketers, and analysts looking for high-potential channels.

Important Note: This tool requires a MongoDB connection to store and analyze channel data. Without MDB_MCP_CONNECTION_STRING configured, this tool will not be available.

Internal Logic Overview

The tool operates through a multi-phase analysis process, leveraging both YouTube Data API and a MongoDB database:

  1. Candidate Search (Phase 1):

    • Uses the provided query to search for relevant videos and channels on YouTube.
    • Filters initial results based on videoCategoryId and regionCode if specified.
    • Collects a broad set of potential channels for deeper analysis.
  2. Channel Filtering (Phase 2):

    • Retrieves detailed statistics for candidate channels (subscribers, total views, video count).
    • Filters channels based on channelAge (e.g., 'NEW' for channels under 6 months, 'ESTABLISHED' for 6-24 months).
    • Ensures channels meet a minimum video count to be considered for consistency.
  3. Deep Analysis (Phase 3):

    • For each filtered channel, fetches their recent top-performing videos.
    • Calculates a "viral factor" for each video (e.g., views relative to subscriber count).
    • Assesses the consistencyLevel (e.g., 'MODERATE' for ~30% of videos showing outlier performance, 'HIGH' for ~50%).
    • Determines outlierMagnitude (e.g., 'STANDARD' for views > subscribers, 'STRONG' for views > 3x subscribers).
  4. Ranking & Formatting (Phase 4):

    • Ranks channels based on their consistency, outlier magnitude, and overall performance within the niche.
    • Formats the results into a token-optimized structure suitable for LLMs, including key channel metrics and examples of outlier videos.

Key Parameters Controlling the Flow

The behavior of this tool is primarily controlled by the following parameters:

  • query (string, required): The central topic or niche to analyze (e.g., "DIY home repair", "quantum computing explained").
  • channelAge (enum: "NEW", "ESTABLISHED", default: "NEW"): Focuses the search on emerging or more mature channels.
  • consistencyLevel (enum: "MODERATE", "HIGH", default: "MODERATE"): Sets the threshold for how consistently a channel's videos must perform as outliers.
  • outlierMagnitude (enum: "STANDARD", "STRONG", default: "STANDARD"): Defines how significantly a video's performance must exceed typical expectations (e.g., views vs. subscribers) to be considered an "outlier."
  • videoCategoryId (string, optional): Narrows the search to a specific YouTube category ID.
  • regionCode (string, optional): Targets channels relevant to a particular geographical region.
  • maxResults (number, default: 10): Limits the number of top outlier channels returned.

Security Considerations

  • API Key Security: Your YOUTUBE_API_KEY is sensitive. Never commit it directly to your repository. Use environment variables (e.g., via a .env file which should be listed in .gitignore).
  • API Quotas: The YouTube Data API has a daily usage quota (default is 10,000 units). All tool calls deduct from this quota. Monitor your usage in the Google Cloud Console and be mindful of the cost of each tool. For a detailed breakdown of costs per API method, see the official documentation.
  • Input Validation: The server uses Zod for robust input validation for all tool parameters, enhancing security and reliability.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Featured
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Keep your Mac awake
Keep your Mac awake
Keep your Mac awake while Claude Code and 40+ AI agents run. Sleeps when they're idle.
One time payment $9 →
Context.devContext.dev
Context.dev
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Make money from your Skills
Make money from your Skills
On Capafy, your Skill runs online 24/7 as an agent product, and you get paid every time someone uses it.
Start earning →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →

Configuration

YOUTUBE_API_KEYsecret

YouTube Data API v3 key

MDB_MCP_CONNECTION_STRINGsecret

MongoDB connection string for caching

Categories
Data & AnalyticsMedia & Entertainment
Registryactive
Package@kirbah/mcp-youtube
TransportSTDIO
AuthRequired
UpdatedJun 10, 2026
View on GitHub

Related Data & Analytics MCP Servers

View all →
Google Sheets

com.mcparmory/google-sheets

Create, read, and modify spreadsheet data, formatting, and sheets
25
Google Sheets

domdomegg/google-sheets-mcp

Allow AI systems to read, write, and query spreadsheet data via Google Sheets.
2
Google Sheets Mcp

henilcalagiya/google-sheets-mcp

Powerful tools for automating Google Sheets using Model Context Protocol (MCP)
14
Futuristic Risk Intelligence

cct15/war-dashboard-data

Geopolitical conflict risk, political events, and maritime traffic data for AI agents
1
Mcp Google Sheets Full

moooonad/mcp-google-sheets-full

Full Google Sheets MCP: 26 tools + run_sheets_script escape hatch. User OAuth, no service account.
CSV to JSON API

io.github.br0ski777/csv-to-json

Parse CSV to JSON array. Auto-detect delimiter, headers. x402 micropayment.