The YouTube MCP Server acts as a smart bridge that allows AI models to "see" and interact with everything on YouTube. Instead of just knowing a video exists, an AI using this tool can look up specific topics, browse trending content, and even read through the comment sections to understand what people are saying. It essentially turns YouTube’s massive library of video data into a searchable, readable database that any AI assistant can use to answer questions or find information more effectively. Beyond basic searches, this server empowers developers to perform deep content analysis directly within their AI workflows. It can extract video transcripts, pull detailed channel statistics, and generate comprehensive summaries of long-form content. One of its most impressive capabilities is its set of specialized educational tools; it can automatically transform a video into a series of study flashcards or a comprehensive ten-question quiz, complete with multiple-choice options and difficulty levels based on the transcript and metadata. For developers, this MCP implementation provides a standardized interface built on Python and the YouTube Data API v3, removing the friction of manual API management and complex authentication. By leveraging the Model Context Protocol architecture, it offers a modular tool registry that includes everything from video discovery to social interaction data. This setup allows Large Language Models to call specific functions—like retrieving related videos or generating automated content summaries—seamlessly, making it an essential building block for creating sophisticated AI applications that require real-time access to the world’s largest video platform.
Category: Design, Media & Creative
Tags: education, metadata, transcripts, video, youtube
bash git clone https://github.com/temiedani/youtube-mcp-server.git cd youtube-mcp-server 2. Set up Python Environment: bash # Create virtual environment python -m venv .venv # Activate virtual environment # On macOS/Linux: source .venv/bin/activate # On Windows: .venv\Scripts\activate 3. Install Dependencies: bash uv pip install -e . 4. Google Cloud Credentials: - Go to Google Cloud Console. - Enable YouTube Data API v3. - Create OAuth 2.0 Client ID (Type: "Desktop app"). - Download the JSON, rename it to credentials.json, and place it in the project root. - Run the server once manually to perform the OAuth flow: python mcp_videos.py ---.env file in the project root: env # Required YOUTUBE_API_KEY=your_api_key_here # Optional YOUTUBE_API_QUOTA_LIMIT=10000 YOUTUBE_API_REGION=US Claude Desktop Configuration: To add this to Claude Desktop, add the following to your claude_desktop_config.json: json { "mcpServers": { "youtube-mcp": { "command": "python", "args": [ "/absolute/path/to/youtube-mcp-server/mcp_videos.py" ], "env": { "YOUTUBE_API_KEY": "your_api_key_here" } } } } Note: Ensure credentials.json and token.pickle are in the same directory as the script. ---get_videos | search (str), max_results (int) | Search for YouTube videos. | | get_video_info | video_id (str) | Get detailed video information and stats. | | get_channel_details| channel_id (str) | Get subscriber counts and channel metadata. | | get_video_comments_tool | video_id (str), max_results (int) | Retrieve and analyze user comments. | | get_trending_videos_tool | region_code (str), max_results (int) | List current trending videos by region. | | get_related_videos_tool | video_id (str), max_results (int) | Find content related to a specific video. | | summarize_video | video_id (str), include_comments (bool) | Generate a comprehensive summary of a video. | | generate_video_flashcards | video_id (str), max_cards (int), categories (list), difficulty (str) | Create educational flashcards with timestamps. | | generate_video_quiz | video_id (str) | Generate a 10-question quiz (MCQ, T/F, Fill-in-blank). | ---dQw4w9WgXcQ focusing on the key definitions." - Testing Knowledge: "Create a quiz based on the content of the YouTube video at this URL: [URL]." - Channel Research: "Get the channel statistics and most recent trending videos in the US region for 'Technology' category."generate_video_flashcards and generate_video_quiz tools, the AI can create structured recall exercises directly from the source material. Example: A medical student watches a 45-minute lecture on "Renal Physiology." They ask the AI: "Generate 10 medium-difficulty flashcards and a multiple-choice quiz based on this video." The AI uses the MCP to pull the transcript, identifies key concepts like "Glomerular Filtration Rate," and presents a formatted quiz with answers and explanations.get_trending_videos_tool, get_channel_details, and get_video_comments_tool. An AI can process this data to identify patterns, sentiment, and content gaps within a specific niche. Example: A tech YouTuber asks the AI: "Analyze the top 5 trending tech videos in the US today. Compare their view-to-like ratios and summarize the top three most common complaints in the comment sections." The AI fetches the data via the MCP and provides a report on what topics are currently resonating or failing with the audience.summarize_video and get_video_info tools, an AI can "watch" several videos on behalf of the developer. It can scan transcripts for specific code snippets or keywords and provide a concise summary of the solution found in each video. Example: A developer asks: "I'm getting a 404 error with my Next.js middleware. Find a YouTube tutorial that addresses this and give me a summary of the fix." The AI searches for relevant videos, summarizes the most highly-rated one, and provides the specific timestamp where the code fix is demonstrated.Part of MCP Servers