YouTube MCP Server
Provides tools for interacting with YouTube content, including video details, search, transcripts, channel information, and playlists.
Click on "Deploy 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 MCP Serversearch for recent videos from MKBHD"
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 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/mcpRelated MCP server: YouTube MCP Server
Development
# Local dev with auto-reload
npm run dev
# Typecheck
npm run typecheckCreate a .env file for local development (see .env.example), then:
npx wrangler dev --port 8787Available Tools (18)
Video
Tool | Description |
| Get detailed video information |
| Search videos with channel-level filtering |
| Get view count, likes, comments statistics |
| Get trending videos by region |
| Find related videos ("Up Next" suggestions) |
Transcript
Tool | Description |
| Retrieve video captions (requires Google OAuth) |
| Search within a video transcript |
| Get transcript with human-readable timestamps |
Channel
Tool | Description |
| Get channel information with enrichment |
| Bulk channel lookup |
| Search channels with subscriber/creator filtering |
| Discover creators matching a topic |
| List recent videos from a channel |
| Get channel subscriber/video/view counts |
| Get all playlists by a channel |
Playlist
Tool | Description |
| Get playlist details |
| List videos in a playlist |
| 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:
Create OAuth 2.0 credentials in Google Cloud Console
Add redirect URI:
https://your-worker.workers.dev/auth/google/callbackSet secrets and deploy
Visit
/auth/googleon your worker to authorize
Architecture
Built on Cloudflare Workers using:
agents(McpAgent) — Durable Object-backed MCP server@modelcontextprotocol/sdk— MCP protocol implementationzod— Input validation for all tool schemasKV — Response caching (1h search, 24h details)
No googleapis, youtube-transcript, or ytdl-core — all YouTube API calls use native fetch().
This server cannot be deployed
Maintenance
Related MCP Connectors
YouTube transcripts, search, channels, playlists and bulk transcript jobs for AI agents. 14 tools.
YouTube transcripts, search, channel/playlist listings and upload tracking for AI agents. No signup.
YouTube public video, comment, reply, channel, search, and speech-to-text transcript tools.
💯 The fastest YouTube transcript + YouTube search MCP for AI agents. Try for free.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI language models to interact with YouTube content through a standardized interface, providing tools for retrieving video information, transcripts, channel analytics, and trend analysis.47565MIT
- AlicenseAqualityCmaintenanceEnables AI models to interact with YouTube content including video details, transcripts, channel information, playlists, and search functionality through the YouTube Data API.71110MIT
- AlicenseAqualityDmaintenanceEnables AI tools to access YouTube content, including transcript extraction, video/channel info, and search.414MIT
- AlicenseNot gradedqualityAmaintenanceEnables interaction with YouTube via MCP, including search, transcript retrieval, trending videos, and AI community discovery.MIT