YouTube MCP — Claude Code MCP server: features and setup
Connect an AI assistant to YouTube search, video transcripts, channel details, and more. Transcript retrieval works without API credentials.
claude mcp add ytmcp -- npx -y @mrsknetwork/ytmcpWhat YouTube MCP does
YouTube MCP lets an assistant search for videos, channels, and playlists, then fetch transcripts, comments, video details, and channel data. Search filters include publication dates, duration, video quality, and region. Trending results can be narrowed by country and category.
The get_video_transcript tool uses yt-dlp and needs no credentials. For public search and metadata, provide a Google API key after enabling YouTube Data API v3. Private subscriptions and channel membership details use OAuth 2.0, so those account-specific tools require OAuth setup.
In Claude Code, add the server with claude mcp add ytmcp -- npx -y @mrsknetwork/ytmcp. Set GOOGLE_API_KEY for public API tools. OAuth credentials go in the MCP configuration as environment variables; the server also supports Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, and Gemini CLI.
What it helps with
- Search videos by topic, date, and region
- Retrieve spoken text from a video
- Look up channel details by ID or
@handle - Fetch video comments and their replies
- Inspect playlists and their video entries
Example prompts for the agent
- Find YouTube videos about MCP setup from a chosen region.
- Get the English transcript for this video.
- Show channel details and recent activity for
@MrBeast.
How to install YouTube MCP
Platform CLI
claude mcp add ytmcp -- npx -y @mrsknetwork/ytmcpPlatform CLI
codex mcp add youtube-mcp -- npx -y @mrsknetwork/ytmcpConfig file
{
"mcpServers": {
"youtube-mcp": {
"command": "npx",
"args": [
"-y",
"@mrsknetwork/ytmcp"
]
}
}
}Config file
{
"servers": {
"youtube-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@mrsknetwork/ytmcp"
]
}
}
}Platform CLI
gemini mcp add youtube-mcp npx -y @mrsknetwork/ytmcpStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about YouTube MCP
How do I install YouTube MCP in Claude Code?
Run claude mcp add ytmcp -- npx -y @mrsknetwork/ytmcp.
What does YouTube MCP do?
It gives an AI assistant tools for YouTube search and retrieval, including transcripts, video and channel details, comments, and playlists.
Do I need an API key to retrieve transcripts?
No. get_video_transcript uses yt-dlp without credentials. Public search and metadata tools require a Google API key.