Labsco
MCP SERVER

YouTube Data MCP

by kirbah

YouTube data an agent can afford — lean payloads, transcripts at zero API cost, optional caching to protect the quota.

Social Media Accounts & PostingVerified
Summary
The same YouTube answers at a fraction of the context and the quota.

Two costs get in the way of using the YouTube API from an agent, and both are dealt with here. The raw payload is largely eTags, thumbnail sets and localisation the model will never read — channel statistics come back at 86 tokens here against 673 raw — and the daily 10,000-unit quota vanishes quickly when an agent repeats itself, which the optional MongoDB cache prevents by serving repeats for nothing. Transcripts cost no quota at all, which is why the server is worth running before you have decided whether to get a key.

What it is

A YouTube Data API v3 client that trims the response before it reaches the model. Video details, search, channel statistics, top videos, trending, categories, comments and transcripts, each reshaped down to the fields something has to reason over.

What you get
  • Video details for several videos at once — metadata, statistics, engagement ratios, content details — with the API's nested eTags, thumbnail sets and localisation blocks stripped out
  • Video and channel search with filters on order, type and channel
  • Transcripts for several videos at once: the full text, or just the key segments — the intro hook and the closing call to action
  • Channel statistics: subscriber count, view count, video count, creation date
  • A channel's top-performing videos with engagement ratios, and trending videos by region and category
  • The video categories available for a region
  • Comments with sorting, a result limit, and a few replies per comment
  • Channels that consistently outperform within a niche, which needs the MongoDB connection configured
  • A cache layer that serves a repeated request for 0 quota units instead of spending them twice
Requirements

Node.js 20.0.0 or newer, run with npx -y @kirbah/mcp-youtube over stdio. It starts with no configuration at all, and in that state transcripts work — everything else needs a YouTube Data API v3 key in YOUTUBE_API_KEY. Quota is the real constraint: the daily allowance is 10,000 units, getVideoDetails, getChannelStatistics and getTrendingVideos cost 1 unit a call, getTranscripts costs 0, searchVideos costs 100 and getChannelTopVideos 101. That is why a MongoDB connection string in MDB_MCP_CONNECTION_STRING is worth adding — a cached repeat costs nothing — and it is also what the outlier-channel tool needs to run at all.

Setup effort

One command plus a key — npx -y @kirbah/mcp-youtube, then supply credentials