YouTube MCP Server
Provides tools for interacting with YouTube content, including video details, search, transcripts, channel information, and playlists.
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 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 installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- 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/moyohussein/youtube-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server