YouTube Toolbox acts as a specialized bridge that allows AI assistants to interact with and understand the vast world of YouTube content. In simple terms, it gives an AI the ability to "watch" videos by reading their transcripts, look up specific video details, and even browse through comment sections to see what people are saying. Instead of an AI just knowing a video exists, this tool allows it to dive deep into the actual information contained within the video, making it an essential companion for summarizing tutorials, researching topics, or gathering public opinion. For developers and power users, this MCP server provides a robust set of functions including advanced video searching with region-specific filters, channel metadata retrieval, and the ability to fetch related content. It goes beyond basic data fetching by offering sophisticated transcript extraction in multiple languages, allowing AI models to process spoken content as structured text. This makes it incredibly useful for building agents that need to perform market research, monitor trending topics across different territories, or provide detailed answers based on video-based educational material. At a more technical level, the toolbox features enhanced transcript tools that allow for timestamped segments, keyword filtering within captions, and multi-video analysis. It is designed for seamless integration with AI environments like Claude Desktop and Cursor, utilizing the Model Context Protocol to provide LLMs with direct, programmatic access to the YouTube Data API v3. By supporting Docker and the UV package manager, it offers a flexible, high-performance way for developers to inject real-time video data into their AI workflows, enabling complex tasks like automated video indexing and cross-video content comparison.
Category: Design, Media & Creative
Tags: data-extraction, transcripts, video-metadata, youtube
bash npx -y @smithery/cli install @jikime/py-mcp-youtube-toolbox --client claude Option B: Manual Setup 1. Clone the repository: bash git clone https://github.com/jikime/py-mcp-youtube-toolbox.git cd py-mcp-youtube-toolbox 2. Install the UV package manager: bash curl -LsSf https://astral.sh/uv/install.sh | sh 3. Set up the virtual environment: bash uv venv -p 3.12 source .venv/bin/activate # On MacOS/Linux # or .venv\Scripts\activate on Windows 4. Install dependencies: bash uv pip install -r requirements.txt 5. Configure Environment Variables: Create a .env file from the example and add your YouTube API key: bash cp env.example .env # Update YOUTUBE_API_KEY=your_youtube_api_key in the .env file Option C: Docker Setup 1. Build the image: docker build -t py-mcp-youtube-toolbox . 2. Run the container: docker run -e YOUTUBE_API_KEY=your_youtube_api_key py-mcp-youtube-toolbox ---claude_desktop_config.json or mcp.json for Cursor): Manual Configuration: json { "mcpServers": { "YouTube Toolbox": { "command": "/path/to/bin/uv", "args": [ "--directory", "/path/to/py-mcp-youtube-toolbox", "run", "server.py" ], "env": { "YOUTUBE_API_KEY": "your_youtube_api_key" } } } } Docker Configuration: json { "mcpServers": { "YouTube Toolbox": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "YOUTUBE_API_KEY=your_youtube_api_key", "py-mcp-youtube-toolbox" ] } } } ---search_videos: Search for YouTube videos with advanced filtering (duration, region, etc.). * get_video_details: Get detailed metadata for a video (views, likes, etc.). * get_video_comments: Retrieve comments from a video with sorting options. * get_related_videos: Find videos related to a specific video ID. * get_trending_videos: Get trending videos by region. * get_channel_details: Get subscriber counts and channel metadata. * get_video_transcript: Extract transcripts/captions in specific languages. * get_video_enhanced_transcript: Advanced extraction with filtering, search, and multi-video support. * transcript_summary: Generate AI summaries of video content based on transcripts. ---zRgAEIoZEVQ in English and summarize it." * "Show me the most recent 10 comments for video zRgAEIoZEVQ sorted by time." * "Find trending videos in the United States region." * "Give me detailed information and subscriber counts for the channel UCRpOIr-NJpK9S483ge20Pgw." * "Find 5 videos related to the video zRgAEIoZEVQ."get_video_transcript or get_video_enhanced_transcript to extract the full text of a video. It can then use the transcript_summary tool to generate a concise summary or a structured outline of the video’s key points. Example: A user provides a URL for a 2-hour technical conference talk. The AI uses the toolbox to fetch the transcript, identifies the segment where "Vector Databases" are discussed using the query filter in the enhanced transcript tool, and provides a 3-paragraph summary of that specific section.get_video_comments tool, an AI can programmatically retrieve a large volume of comments sorted by time or relevance. The AI can then analyze the text to identify common complaints, frequently asked questions, or overall sentiment. Example: A developer releases a new tool on YouTube. They ask their AI assistant to "Analyze the comments from my latest video and list the top 3 feature requests and any reported bugs." The AI uses the MCP to pull the last 100 comments and synthesizes a report.search_videos with advanced filtering (channel, duration, region) and get_trending_videos. This allows users to track specific competitors or monitor what is gaining traction in a particular geographic market or topic area. Example: A marketing professional asks, "What are the top-performing videos about 'sustainable fashion' in the UK from the last 7 days?" The AI uses search_videos with region_code=GB and publishedAfter filters, then uses get_video_details to compare view counts and engagement rates of the results.Part of MCP Servers