YouTube MCP Server

YouTube MCP Server

Enables AI models to interact with YouTube content through 18 MCP tools for videos, transcripts, channels, and playlists.

Category
Visit Server

README

YouTube MCP Server

A Model Context Protocol (MCP) server for YouTube, running on Cloudflare Workers using the Agents SDK (McpAgent). Enables AI language models to interact with YouTube content through 18 MCP tools.

Deployment

# Install dependencies
npm install

# Set secrets
npx wrangler secret put YOUTUBE_API_KEY
npx wrangler secret put GOOGLE_OAUTH_CLIENT_ID    # Required for transcripts
npx wrangler secret put GOOGLE_OAUTH_CLIENT_SECRET # Required for transcripts

# Deploy
npx wrangler deploy

# MCP endpoint: https://youtube-mcp-server.<your-subdomain>.workers.dev/mcp

Development

# Local dev with auto-reload
npm run dev

# Typecheck
npm run typecheck

Create a .env file for local development (see .env.example), then:

npx wrangler dev --port 8787

Available Tools (18)

Video

Tool Description
videos_getVideo Get detailed video information
videos_searchVideos Search videos with channel-level filtering
videos_getVideoStats Get view count, likes, comments statistics
videos_getTrendingVideos Get trending videos by region
videos_getRelatedVideos Find related videos ("Up Next" suggestions)

Transcript

Tool Description
transcripts_getTranscript Retrieve video captions (requires Google OAuth)
transcripts_searchTranscript Search within a video transcript
transcripts_getTimestampedTranscript Get transcript with human-readable timestamps

Channel

Tool Description
channels_getChannel Get channel information with enrichment
channels_getChannels Bulk channel lookup
channels_searchChannels Search channels with subscriber/creator filtering
channels_findCreators Discover creators matching a topic
channels_listVideos List recent videos from a channel
channels_getStatistics Get channel subscriber/video/view counts
channels_getPlaylists Get all playlists by a channel

Playlist

Tool Description
playlists_getPlaylist Get playlist details
playlists_getPlaylistItems List videos in a playlist
playlists_searchPlaylists Search for public playlists

Authentication

  • 15 tools (video, channel, playlist) use only the YouTube Data API key
  • 3 transcript tools require Google OAuth 2.0 (YouTube Captions API requires it)

To enable transcripts:

  1. Create OAuth 2.0 credentials in Google Cloud Console
  2. Add redirect URI: https://your-worker.workers.dev/auth/google/callback
  3. Set secrets and deploy
  4. Visit /auth/google on your worker to authorize

Architecture

Built on Cloudflare Workers using:

  • agents (McpAgent) — Durable Object-backed MCP server
  • @modelcontextprotocol/sdk — MCP protocol implementation
  • zod — Input validation for all tool schemas
  • KV — Response caching (1h search, 24h details)

No googleapis, youtube-transcript, or ytdl-core — all YouTube API calls use native fetch().

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