YouTube MCP Server

YouTube MCP Server

Provides AI assistants with comprehensive YouTube analytics and channel management capabilities, including channel performance, video analytics, audience insights, and content strategy tools.

Category
Visit Server

README

šŸŽ¬ YouTube MCP Server: Remote MCP on Cloudflare Workers

A powerful Model Context Protocol (MCP) server that provides AI assistants with comprehensive YouTube analytics and channel management capabilities. Built with TypeScript, deployed on Cloudflare Workers, and secured with Google OAuth.

✨ Features

šŸ“Š YouTube Analytics

  • Channel Performance: Revenue, views, subscriber growth, engagement metrics
  • Video Analytics: Deep performance analysis with retention rates and traffic sources
  • Audience Insights: Demographics, geography, device usage, and viewing patterns
  • Top Content: Identify best-performing videos by views, revenue, or engagement

šŸŽÆ Content Strategy Tools

  • Trending Analysis: AI-powered content suggestions based on current trends
  • Competitor Intelligence: Analyze competitor channels and identify content gaps
  • Performance Optimization: Recommendations based on your channel's data

šŸ” YouTube Data Access

  • Video Search: Find videos across YouTube with advanced filtering
  • Channel Information: Get detailed channel stats and recent uploads
  • Video Details: Comprehensive metadata, stats, and engagement data

šŸ› ļø Quick Start

Prerequisites

  • YouTube channel with uploaded content
  • Google Cloud Console project with YouTube APIs enabled
  • Cloudflare Workers account

1. Clone and Install

git clone https://github.com/lauragift21/youtube-mcp-server.git
cd youtube-mcp-server
npm install

2. Configure OAuth

  1. Create Google OAuth Credentials:

    • Go to Google Cloud Console
    • Enable YouTube Data API v3 and YouTube Analytics API
    • Create OAuth 2.0 credentials (Web Application)
    • Add redirect URI: https://your-worker.workers.dev/callback
  2. Set Environment Variables:

    npx wrangler secret put GOOGLE_OAUTH_CLIENT_ID
    npx wrangler secret put GOOGLE_OAUTH_CLIENT_SECRET
    npx wrangler secret put COOKIE_ENCRYPTION_KEY
    

You can generate a random string for COOKIE_ENCRYPTION_KEY

3. Deploy

npx wrangler deploy

Connect to Claude Desktop

Add to your Claude Desktop configuration:

{
  "mcpServers": {
    "youtube-mcp-server": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://your-deployment.workers.dev/sse"
      ]
    }
  }
}

Connect to Cloudflare AI Playground

You can connect your MCP server from the Cloudflare AI Playground, which is a remote MCP client:

  • Go to https://playground.ai.cloudflare.com/
  • Enter your deployed MCP server URL (remote-mcp-server-authless.<your-account>.workers.dev/sse)
  • You can now use your MCP tools directly from the playground!

šŸ”§ Available Tools

Analytics Tools

  • youtube_getChannelAnalytics - Get channel performance metrics
  • youtube_analyzeVideoPerformance - Deep dive into video performance
  • youtube_getTopVideos - Find your best-performing content
  • youtube_getAudienceDemographics - Understand your viewers

Content Strategy Tools

  • youtube_suggestContentIdeas - AI-powered topic suggestions
  • youtube_analyzeCompetitors - Competitive analysis and benchmarking

Data Tools

  • youtube_searchVideos - Search YouTube with advanced filters
  • youtube_getVideoDetails - Get comprehensive video information
  • youtube_getChannelInfo - Channel overview and statistics
  • youtube_getChannelVideos - Recent uploads from any channel

šŸ’” Example Queries

Try these questions with Claude Desktop:

šŸ“ˆ Channel Analytics

"Show me my YouTube channel performance for the past 30 days"

šŸŽÆ Content Strategy

"What should I make a video about next in the AI/tech space?"

"Analyze my competitors and show me content opportunities I'm missing"

šŸ‘„ Audience Insights

"Who are my viewers? Show me demographics and geography data"

šŸ—ļø Architecture

ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”    ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”    ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
│   Claude Desktop │────│  MCP Server      │────│ YouTube APIs    │
│   (MCP Client)   │    │  (Cloudflare)    │    │ (Google)        │
ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜    ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜    ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
                                │
                       ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
                       │  OAuth Provider  │
                       │  (Google Auth)   │
                       ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜

Key Components

  • MCP Server: Handles tool requests and API communication
  • OAuth Provider: Manages Google authentication and token refresh
  • YouTube Data API: Public video and channel information
  • YouTube Analytics API: Private channel analytics and revenue data

šŸ”— Links


Built with ā¤ļø by Gift Egwuenu | Powered by MCP & Cloudflare Workers

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured