youtube-mcp
Provides tools for analyzing YouTube channels and videos, including channel summaries, top videos, detailed video statistics, audience retention curves, traffic sources, reach/CTR data, and comments.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@youtube-mcpWhat was my best video by CTR last week?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
youtube-mcp
An MCP server that lets you analyze @ザビエル-zav's YouTube channel directly from Claude.
It aims to answer questions like "Which video had the best CTR last week?" by fetching real data.
Built with Node.js (no Python). It wraps the YouTube Analytics API / Reporting API / Data API v3
with the official Node libraries (googleapis, google-auth-library) and exposes them as tools
via the official MCP TypeScript SDK (@modelcontextprotocol/sdk).
APIs used and how they are divided
Data wanted | API | How it is retrieved |
Views, watch time, average view duration, subscriber changes, traffic sources, audience | YouTube Analytics API | Returns JSON on request |
Thumbnail impressions, impression CTR | YouTube Reporting API (Bulk Reports) | Register a job in advance → CSV generated daily → download and read |
Video titles, descriptions, comments | YouTube Data API v3 | Returns JSON on request |
Only CTR has a fundamentally different retrieval method (bulk reports), so it follows a separate path:
register-reach-job.js registers the job → download-reports.js periodically accumulates CSVs locally.
Related MCP server: YouTube MCP Server
Setup
1. Google Cloud Console
Create a project
Enable the following 3 APIs
YouTube Analytics API
YouTube Reporting API
YouTube Data API v3
Configure the OAuth consent screen (user type = External, add your own Google account as a test user)
Credentials > OAuth client ID > Create one with application type = Desktop app, and download the JSON
Place the downloaded JSON in the root of this repository under the name
client_secret.jsonNever commit
client_secret.jsonor thetoken.jsoncreated after the first authentication. It is already in.gitignore, but be careful not to rungit add -fby mistake.
2. Node.js and dependencies
Node.js 18 or later is required (if not installed, install the LTS version from nodejs.org.
The installer includes npm, so no separate PATH configuration is needed like with Python).
npm install3. Register the reach report (CTR) job — run this first
The Reporting API starts generating data from the day the job is registered, and historical data can only go back 30 days from the registration point. The longer you delay registration, the more past CTR data is lost, so run this before anything else.
npm run register-reach-jobOn the first run, a browser opens and asks for authentication (after that, token.json handles automatic renewal).
4. Start the MCP server
npm startTo use it from Claude Desktop, register it in claude_desktop_config.json as follows.
{
"mcpServers": {
"youtube-analytics": {
"command": "node",
"args": ["/absolute/path/to/youtube-mcp/server.js"]
}
}
}5. Download reach reports (a few hours to 2 days after registration)
npm run download-reportsCSVs are accumulated under data/reach/<report_type>/. Reports disappear on YouTube's side after 60 days
(30 days for historical data), so keep running this regularly (ideally once a day).
On Windows, use Task Scheduler; on Mac/Linux, set up a cron job.
The get_reach tool reads these local CSVs.
List of exposed tools
Tool name | Arguments | Returns |
|
| Views, watch time, and subscriber changes for the whole period |
|
| Top videos by views and their basic metrics |
|
| Detailed metrics for a specified video |
|
| Audience retention curve (in 10% steps) + point of greatest drop-off |
|
| Breakdown of traffic sources |
|
| Thumbnail impressions and CTR (aggregated from locally stored CSVs) |
|
| List of comments (by relevance) |
Output is not raw JSON but rounded numbers and text tables capped at about 20 entries (to reduce context consumption on the Claude side).
Known limitations
Analytics API data lags up to about 2 days behind what YouTube Studio shows. "Yesterday's numbers" may not be available.
get_reachonly looks at CSVs already downloaded locally. Data for periods whendownload-reports.jswas not run will not appear.The exact column structure of
channel_reach_basic_a1/channel_reach_combined_a1is unconfirmed.get_reachhas a fallback that guesses column names by keyword, but check once against the headers of an actually downloaded CSV.No write scopes are attached (read-only). There is no path that could accidentally modify or delete videos.
Deployment target branches
Where you want to use it | What you need |
Claude Desktop app | Just run |
claude.ai (Web/Mobile) | Must be published as a remote MCP server accessible over HTTPS |
If you also want to use it from mobile, the quickest path is to switch StdioServerTransport to
StreamableHTTPServerTransport (@modelcontextprotocol/sdk/server/streamableHttp.js)
and piggyback on your existing hosting environment.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables Claude to access and manage YouTube channel data through the YouTube Data API v3 and YouTube Analytics API. Provides tools for reading analytics, fetching video metadata, searching uploads, and updating video SEO directly from Claude.91MIT
- FlicenseNot gradedqualityDmaintenanceProvides AI assistants with comprehensive YouTube analytics and channel management capabilities, including channel performance, video analytics, audience insights, and content strategy tools.391
- AlicenseAqualityDmaintenanceEnables YouTube integration with Claude Code, including video search, metadata retrieval, transcript fetching, channel exploration, and trending videos.81MIT
- AlicenseAqualityCmaintenanceEnables AI assistants to access YouTube organic analytics, including channel stats, video performance, watch time, and audience engagement, via the YouTube Data API v3 and Analytics API v2.621MIT
Related MCP Connectors
YouTube transcripts, search, channels, playlists and bulk transcript jobs for AI agents. 14 tools.
Agent-callable creator intelligence: 952+ scored YouTube creators across 180 niches.
Provide token-optimized, structured YouTube data to enhance your LLM applications. Access efficien…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Zavier0305/youtube-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server