MCP Servers

A collection of Model Context Protocol servers, templates, tools and more.

Y
Youtube Channel Data MCP

Connect Claude Desktop to your private YouTube channel analytics via OAuth2

Created 3/7/2026
Updated about 5 hours ago
Repository documentation and setup instructions

📺 YouTube Channel Data MCP

Connect Claude Desktop to your private YouTube channel. Ask AI to analyze your real videos, watch time, subscribers, traffic sources, audience demographics — all from your actual YouTube Studio data. 100% free, open source, runs locally.

Claude MCP Node.js License MIT Stars Twitter


🤔 What Is This?

This is a Model Context Protocol (MCP) server that connects Claude Desktop directly to the YouTube Analytics API using OAuth2.

Instead of manually copying data from YouTube Studio into ChatGPT, you can just ask Claude:

"Analyze my channel and tell me why I'm not growing" "Which videos should I make more of?" "Where are my viewers coming from?"

And Claude reads your real private data — watch time, subscriber trends, demographics, traffic sources — and gives you actual AI-powered answers.

Claude Desktop  →  YouTube MCP Server  →  YouTube Analytics API  →  Your Private Data
     (you)              (this repo)            (Google OAuth2)           (stays local)

Everything runs on YOUR machine. Nothing is sent to any third party.


✨ What Data Claude Can Access

📊 Channel Level

| What | Details | |------|---------| | Subscribers | Total count, gained per day, lost per day | | Views | Total lifetime views, daily breakdown | | Watch Time | Estimated minutes watched, average view duration | | Video Count | Total uploads | | Channel description, creation date, branding |

🎬 Video Level

| What | Details | |------|---------| | All videos | Title, views, likes, comments, duration, publish date | | Top performers | Ranked by views, watch time, likes, subs gained, comments | | Per-video analytics | Day-by-day views, watch time, engagement for any video | | Video search | Search your own uploads by keyword | | Comments | Top comments from any video for audience research |

📡 Traffic Sources

| Source | What It Tells You | |--------|-----------------| | YouTube Search | People finding you via search | | Suggested Videos | YouTube recommending your content | | Browse Features | Homepage, trending, subscriptions feed | | External | Links from outside YouTube | | Direct / Other | Direct URL, unknown sources |

👥 Audience Demographics

| Dimension | Data | |-----------|------| | Age groups | 13-17, 18-24, 25-34, 35-44, 45-54, 55-64, 65+ | | Gender | Male / Female breakdown | | Countries | Top 20 countries by views | | Devices | Mobile, Desktop, Tablet, TV, Game Console |


🚀 Install — 3 Ways

Option A — One Command (Easiest)

git clone https://github.com/itsadityasharma/youtube-channel-data-mcp.git
cd youtube-channel-data-mcp
bash install.sh

The script guides you through everything. Takes ~15 minutes.

Option B — Download ZIP (No Git needed)

  1. Click the green Code button above → Download ZIP
  2. Unzip to your Desktop
  3. Open Terminal → cd ~/Desktop/youtube-channel-data-mcp
  4. Run bash install.sh

Option C — Manual Step by Step

Follow the detailed guide below ↓


📋 What You Need Before Starting

| Requirement | Where to get it | Cost | |------------|----------------|------| | Mac (10.15+) | You have it | Free | | Node.js 18+ | nodejs.org → Download LTS | Free | | Claude Desktop | claude.ai/download | Free | | Google account | The one that owns your YouTube channel | Free | | Google Cloud project | console.cloud.google.com | Free |


🔧 Manual Setup — Full Guide

STEP 1 — Create Google Cloud Project

  1. Go to console.cloud.google.com
  2. Click "Select a project" (top left) → "New Project"
  3. Name: YouTube MCP → Click Create
  4. Make sure your new project is selected in the top bar

STEP 2 — Enable YouTube APIs

In your project:

  1. Go to APIs & Services → Library
  2. Search "YouTube Data API v3" → Click → Enable
  3. Go back to Library
  4. Search "YouTube Analytics API" → Click → Enable

⚠️ You need BOTH. YouTube Data API gets video info. YouTube Analytics API gets private stats like watch time and demographics.


STEP 3 — Set Up OAuth Consent Screen

  1. Go to APIs & Services → OAuth consent screen
  2. User type → select External → Click Create
  3. Fill in:
    • App name: YouTube MCP
    • User support email: your Gmail
    • Developer contact: your Gmail
  4. Click Save and Continue
  5. On Scopes page → click Save and Continue (skip for now)
  6. On Test Users page → click + Add Users → add your YouTube channel Gmail → click Save
  7. Click Save and ContinueBack to Dashboard

STEP 4 — Create OAuth Credentials

  1. Go to APIs & Services → Credentials
  2. Click + Create Credentials → OAuth client ID
  3. Application type → select Desktop app
  4. Name: YouTube MCP Desktop
  5. Click Create
  6. A popup appears → click Download JSON
  7. Rename the downloaded file to exactly: credentials.json

STEP 5 — Install the MCP Server

Open Terminal on your Mac (Cmd + Space → type Terminal → Enter):

# Download this repo
git clone https://github.com/itsadityasharma/youtube-channel-data-mcp.git
cd youtube-channel-data-mcp

# Move your credentials file in
mv ~/Downloads/credentials.json ./credentials.json

# Install dependencies
npm install

STEP 6 — Authenticate With YouTube

node auth.js

Your browser opens → log in with the Google account that owns your YouTube channel → click Allow.

If you see "This app isn't verified" → click AdvancedGo to YouTube MCP (unsafe) — this is totally normal for personal apps.

You'll see ✅ YouTube Connected! in the browser. Done.


STEP 7 — Connect to Claude Desktop

Open this file in TextEdit:

~/Library/Application Support/Claude/claude_desktop_config.json

Via Terminal:

open -a TextEdit ~/Library/Application\ Support/Claude/claude_desktop_config.json

Add this (replace YOURNAME with your Mac username):

{
  "mcpServers": {
    "youtube-analytics": {
      "command": "node",
      "args": ["/Users/YOURNAME/youtube-channel-data-mcp/server.js"]
    }
  }
}

To find your username run: echo $USER in Terminal

Restart Claude Desktop. Done! ✅


💬 Ready-to-Use Claude Prompts

Copy-paste these directly into Claude Desktop after setup:

🔍 First test

Use youtube-analytics MCP and show me my channel overview

📊 Full channel audit

Pull my YouTube channel overview, top 20 videos by watch time, 
90-day analytics, traffic sources and audience demographics. 
Give me a complete performance report with actionable growth recommendations.

🎯 Video topic strategy

Get my top 20 videos by watch time. Analyze patterns — what topics, 
video lengths, and title styles perform best? Suggest 10 new video 
ideas based on what's actually working on my channel.

👥 Audience deep dive

Show me my full audience demographics — age groups, gender, top countries, 
device types. Based on this real data, what content style, posting schedule 
and topics would resonate most with my actual audience?

📡 Traffic source audit

Show my traffic sources breakdown. How dependent am I on one source? 
What specific steps can I take to grow YouTube Search traffic for my channel?

💬 Comment mining for ideas

Get the top comments from my 5 most-viewed videos. What questions are 
people asking? What are they requesting? What frustrations come up? 
Turn this into a 30-day content calendar.

📉 Underperformer diagnosis

Get all my videos. Compare my bottom 10 vs top 10 by view-to-subscriber ratio. 
Why did the lower ones underperform? What would you do differently with that content?

🚀 Growth acceleration

Analyze my channel analytics for the last 6 months. Which months had the 
best growth? What videos drove it? What patterns do you see that I should 
double down on? Give me a 90-day growth plan.

🔒 Privacy & Security

| Question | Answer | |----------|--------| | Does my data go to any server? | ❌ No. Runs 100% on your Mac | | Can it post or delete videos? | ❌ No. Read-only access only | | Is it safe to use OAuth? | ✅ Same system used by TubeBuddy, VidIQ, Hootsuite | | Who can see my analytics? | Only you — it's on your machine | | Can I revoke access? | ✅ Any time at myaccount.google.com/permissions |

Never commit credentials.json or tokens.json to any git repository.


🛠 Troubleshooting

"credentials.json not found"

ls ~/youtube-channel-data-mcp/
# You should see credentials.json listed
# If not: mv ~/Downloads/credentials.json ~/youtube-channel-data-mcp/

"Not authenticated. Run node auth.js"

cd ~/youtube-channel-data-mcp && node auth.js

Port 3000 already in use

lsof -ti:3000 | xargs kill -9 && node auth.js

Claude Desktop doesn't show YouTube tools

  • Check JSON syntax in config (missing comma = broken)
  • Replace YOURNAME with your actual Mac username (echo $USER)
  • Force quit Claude completely via Activity Monitor → reopen

"This app isn't verified" Google warning

  • Click AdvancedGo to YouTube MCP (unsafe)
  • Normal for personal apps — you built it, you trust it

Access blocked / org_internal error

  • You're logged into a Google Workspace account in the browser
  • Open an Incognito window → run auth.js again → log in with personal Gmail

Quota exceeded

  • YouTube Data API free limit: 10,000 units/day
  • Analytics queries cost ~1–10 units each
  • Wait 24h or request quota increase in Google Cloud Console

📁 Files in This Repo

youtube-channel-data-mcp/
├── server.js          ← The MCP server Claude connects to
├── auth.js            ← Run once to link your YouTube account
├── install.sh         ← Automated installer script
├── package.json       ← Node.js dependencies
├── .gitignore         ← Keeps your credentials out of git
├── README.md          ← This guide
├── credentials.json   ← ⚠️ YOU add this (never commit!)
└── tokens.json        ← ⚠️ Auto-created after auth (never commit!)

🤝 Contributing

PRs welcome! Things that would be great:

  • Windows support
  • Linux support
  • Additional MCP tools (YouTube Reporting API, revenue data)
  • Better error messages and recovery flows

📄 License

MIT — free to use, modify, share, and build on.


👨‍💻 About

Built by Aditya Sharma

I build tools at the intersection of AI and marketing. Follow along:

If this saved you time → star the repo ⭐ and share it with a creator friend!


Keywords: youtube mcp server, claude desktop youtube, youtube analytics mcp, connect claude to youtube, youtube api claude, youtube analytics ai, private youtube data claude, youtube mcp oauth2, claude youtube channel analysis, model context protocol youtube

Quick Setup
Installation guide for this server

Install Package (if required)

npx @modelcontextprotocol/server-youtube-channel-data-mcp

Cursor configuration (mcp.json)

{ "mcpServers": { "adityaarsharma-youtube-channel-data-mcp": { "command": "npx", "args": [ "adityaarsharma-youtube-channel-data-mcp" ] } } }