YouTube MCP
The YouTube MCP server connects AI assistants to YouTube, enabling search, content retrieval, metadata access, and account management. Capabilities vary by authentication tier:
No Auth Required
Extract full video transcripts using yt-dlp, with options for language, time range, and manual vs. auto-generated preference.
API Key Required
Search & Discovery: Search for videos, channels, or playlists by keyword with filters for date range, duration, quality, region, and sort order. Fetch trending videos by country and category. List video categories by region.
Video & Channel Metadata: Retrieve video metadata (title, description, tags, duration, views, likes, comment count) and channel metadata (subscriber count, video count, uploads playlist ID) by channel ID or
@handle.Playlists: List playlists for a channel or by ID, and enumerate videos within a playlist.
Comments & Captions: Fetch top-level comment threads (with keyword filtering), replies to specific comments, and available caption tracks for a video.
Channel Info: View a channel's recent activity feed (uploads, playlist additions) and its section layout.
Localization: List all YouTube-supported languages and regions with their codes and names.
OAuth Required
List your own subscriptions, channel members (paying), and membership tiers.
Revoke the OAuth token to sign out.
All tools are read-only — no write or modify capabilities are provided.
Provides tools for searching YouTube videos, retrieving video transcripts, metadata, comments, captions, channel details, trending videos, playlists, and managing subscriptions and memberships via OAuth.
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 MCPget transcript of video dQw4w9WgXcQ"
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
Connect AI assistants to YouTube: search, transcripts, metadata, and more.
What can it do?
Once connected, your AI can:
Extract clean, word-for-word video transcripts. No credentials required.
Search YouTube by keyword, date range, duration, quality, and region.
Fetch trending videos for any country and category.
Retrieve video stats, metadata, comments, captions, and channel details.
Look up channels by
@handle(e.g.@MrBeast).Access your own subscriptions, members, and membership tiers via OAuth.
Related MCP server: youtube-connector-mcp
Getting Started
The server supports three access tiers. Pick the one that fits your use case.
Guest Mode (No Setup)
Works out of the box. The get_video_transcript tool uses yt-dlp to extract transcripts without any API credentials.
{
"mcpServers": {
"youtube-mcp": {
"command": "npx",
"args": ["-y", "@mrsknetwork/ytmcp@latest"]
}
}
}API Key (Recommended)
Unlocks all public data tools. Best for search, metadata, comments, trending videos, and transcripts.
1. Get a Google API Key
Open the Google Cloud Console.
Enable YouTube Data API v3 for your project.
Go to Credentials and create an API Key.
2. Add to your MCP client config or .env file
Pass GOOGLE_API_KEY via env in your MCP client config, or place GOOGLE_API_KEY=YOUR_KEY inside a .env file in the project directory.
{
"mcpServers": {
"youtube-mcp": {
"command": "npx",
"args": ["-y", "@mrsknetwork/ytmcp@latest"],
"env": {
"GOOGLE_API_KEY": "YOUR_GOOGLE_API_KEY"
}
}
}
}OAuth 2.0
1. Create an OAuth 2.0 Client
Open the Google Cloud Console.
Enable YouTube Data API v3 for your project.
Go to Credentials > Create Credentials > OAuth 2.0 Client ID.
Set Application type to Web application.
Add this exact Redirect URI:
http://localhost:31415/oauth2callback.Go to OAuth Consent Screen > Test Users and add your Gmail address.
2. Add to your MCP client config
Credentials are passed securely via environment variables in the MCP config. They are never stored in files.
{
"mcpServers": {
"youtube-mcp": {
"command": "npx",
"args": ["-y", "@mrsknetwork/ytmcp@latest"],
"env": {
"GOOGLE_CLIENT_ID": "your-client-id.apps.googleusercontent.com",
"GOOGLE_CLIENT_SECRET": "your-client-secret"
}
}
}
}3. First-time login
On your first tool call, the AI will share a login link. Click it, authorize the app in your browser, then tell the AI you are done. Your session is saved. You will not need to log in again unless you revoke access.
4. Signing out
Ask your AI to call revoke_oauth_token to sign out and delete your stored credentials at any time.
Available Tools
Tool | Auth | Description |
| None | Download a full spoken transcript using yt-dlp. Specify |
| API Key | Search YouTube for videos, channels, or playlists. Filter by |
| API Key | Fetch title, description, tags, duration, and stats (views, likes, comments) for one or more videos by ID. |
| API Key | Fetch channel profile, subscriber count, video count, and uploads playlist ID. Accepts a channel ID or |
| API Key | Fetch the most popular videos on YouTube for a given |
| API Key | List playlists for a channel, or fetch specific playlists by ID. Returns title, description, and item count. |
| API Key | List all videos inside a playlist in order. Returns title, position, and video ID for each entry. |
| API Key | Fetch top-level comment threads for a video or channel. Filter by keyword with |
| API Key | Fetch replies to a specific comment thread by |
| API Key | List available caption tracks for a video, including language code and type (manual or auto-generated). |
| API Key | List YouTube video category names and IDs for a given region. Use the IDs with |
| API Key | Fetch a channel's recent activity feed, including uploads and playlist additions. |
| API Key | List the shelf sections displayed on a channel's page, in order. |
| API Key | List all languages supported by YouTube, with language codes and localized names. |
| API Key | List all regions supported by YouTube, with region codes and names. |
| API Key / OAuth | List public subscriptions for a channel by |
| OAuth | List current paying members of your channel. Requires an active memberships program. |
| OAuth | List the membership tier names and levels configured for your channel. |
| OAuth | Sign out and permanently delete your stored Google credentials from the server. |
Building from Source
git clone https://github.com/mrsknetwork/ytmcp.git
cd ytmcp
npm install
npm run build
cp .env.example .env # Set GOOGLE_API_KEY inside .env
node build/server/index.jsLicense
Licensed under the MIT License.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityCmaintenanceEnables AI assistants to search videos, read channels, browse playlists, fetch comments, and get transcripts from YouTube using the YouTube Data API v3 and InnerTube API for captions.Last updated2GPL 3.0
- Flicense-qualityCmaintenanceEnables AI assistants to search videos, channels, and playlists, retrieve video metadata, transcripts, and comments via the YouTube Data API v3.Last updated73
- Alicense-qualityFmaintenanceEnables AI assistants to extract YouTube video metadata, subtitles, and top comments without downloading videos.Last updated6MIT
- AlicenseAqualityDmaintenanceEnables AI tools to access YouTube content, including transcript extraction, video/channel info, and search.Last updated430MIT
Related MCP Connectors
Provide token-optimized, structured YouTube data to enhance your LLM applications. Access efficien…
YouTube transcripts, subtitles, and video metadata as structured JSON via an Apify Actor.
💯 The fastest YouTube transcript + YouTube search MCP for AI agents. Try for free.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/mrsknetwork/ytmcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server