DY

dannysubsense/youtube-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

13 stars 10 forks 质量 65 趋势 20MIT

A comprehensive Model Context Protocol (MCP) server providing real-time YouTube Data API access for AI assistants.

概览

A comprehensive Model Context Protocol (MCP) server that provides real-time YouTube data access through the YouTube Data API v3. This server enables AI assistants to search, analyze, and retrieve detailed information about YouTube videos, channels, playlists, and more. 1. - Get comprehensive video information including title, description, statistics, and metadata 2. - Retrieve playlist information and metadata 3. - List videos within a playlist with details 4. - Get channel information including subscriber count, video count, and description 5. - List available video categories for specific regions 6. - Get recent videos from a YouTube channel 7. - Search YouTube for videos with customizable parameters 8. - Retrieve trending videos for specific regions 9. - Get comments from videos with sorting options 10. - Analyze engagement metrics and provide insights 11. - List playlists from a YouTube channel 12. - Get available caption/transcript information 13.

README

以下为原文 README 节选,完整内容请查看原文。

YouTube MCP Server

A comprehensive Model Context Protocol (MCP) server that provides real-time YouTube data access through the YouTube Data API v3. This server enables AI assistants to search, analyze, and retrieve detailed information about YouTube videos, channels, playlists, and more.

🚀 Features

14 Complete Functions

  1. get_video_details - Get comprehensive video information including title, description, statistics, and metadata
  2. get_playlist_details - Retrieve playlist information and metadata
  3. get_playlist_items - List videos within a playlist with details
  4. get_channel_details - Get channel information including subscriber count, video count, and description
  5. get_video_categories - List available video categories for specific regions
  6. get_channel_videos - Get recent videos from a YouTube channel
  7. search_videos - Search YouTube for videos with customizable parameters
  8. get_trending_videos - Retrieve trending videos for specific regions
  9. get_video_comments - Get comments from videos with sorting options
  10. analyze_video_engagement - Analyze engagement metrics and provide insights
  11. get_channel_playlists - List playlists from a YouTube channel
  12. get_video_caption_info - Get available caption/transcript information
  13. evaluate_video_for_knowledge_base - Intelligent content evaluation with freshness scoring for knowledge base curation
  14. get_video_transcript - Extract actual transcript content from YouTube videos

Key Capabilities

  • ✅ Real-time data from YouTube Data API v3
  • ✅ Comprehensive error handling and API quota management
  • ✅ Multiple URL format support (youtube.com, youtu.be, @usernames, channel IDs)
  • ✅ Intelligent content evaluation with technology freshness scoring
  • ✅ Flexible search and filtering options
  • ✅ Engagement analysis with industry benchmarks
  • ✅ Regional content support for trending and categories
  • ✅ MCP protocol compliance for seamless AI integration

📋 Requirements

  • Python 3.8+
  • YouTube Data API v3 key
  • MCP-compatible client (Claude Desktop, Cursor, etc.)
  • youtube-transcript-api (for transcript extraction functionality)

🛠️ Installation & Setup

Step 1: Clone the Repository

git clone https://github.com/dannySubsense/youtube-mcp-server.git
cd youtube-mcp-server

Step 2: Install Dependencies

pip install -r requirements.txt

Step 3: Get YouTube API Key

  1. Go to the Google Cloud Console
  2. Create a new project or select an existing one
  3. Enable the YouTube Data API v3
  4. Create credentials (API Key)
  5. (Optional) Restrict the API key to YouTube Data API v3 for security

Step 4: Configure API Key

Create a credentials.yml file in the project root:

youtube_api_key: "YOUR_YOUTUBE_API_KEY_HERE"
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "youtube": { "command": "python", "args": ["/path/to/youtube-mcp-server/youtube_mcp_server.py"], "env": { "YOUTUBE_API_KEY": "your_youtube_api_key_here" } } } }