MCP ExplorerExplorer

Mcp Youtube

@bzurkowskion a year ago
2 MIT
FreeCommunity
AI Systems
MCP server for YouTube

Overview

What is Mcp Youtube

mcp-youtube is a Model Context Protocol (MCP) server that provides structured access to YouTube data for AI assistants and applications. It allows AI systems to interact with YouTube content through a standardized interface.

Use cases

Use cases for mcp-youtube include building AI assistants that can search for videos, analyzing comments for sentiment, retrieving educational video transcripts, and creating applications that provide insights into YouTube content.

How to use

To use mcp-youtube, you need to have Docker installed and obtain Google API credentials for the YouTube Data API. Build the Docker image and run the container with your API key to start accessing YouTube data.

Key features

Key features of mcp-youtube include video search by keywords, retrieval of channel information, access to public playlist videos, detailed video metadata, comment retrieval, video transcripts in multiple languages, and transcript translation.

Where to use

mcp-youtube can be used in various fields such as AI development, content analysis, educational applications, and any application that requires structured access to YouTube data.

Content

✨ YouTube MCP Server ✨

A Model Context Protocol (MCP) server providing structured access to YouTube data for AI assistants and applications. It lets AI systems interact with YouTube content through a standardized interface. The server offers tools for searching videos, retrieving channel information, accessing transcripts, and analyzing comments.

Table of Contents

Features

  • Video Search - Search for videos across YouTube by keywords and filters
  • Channel Information - Retrieve details about YouTube channels by ID, handle, or username
  • Playlist Access - Get videos from public YouTube playlists
  • Video Metadata - Access detailed metadata for any YouTube video
  • Comment Retrieval - Fetch comments from YouTube videos
  • Video Transcripts - Get and list video transcripts in multiple languages
  • Transcript Translation - Translate video transcripts to different languages

Installation

Prerequisites

Running with Docker

Build the Docker image:

docker build -t mcp-youtube .

Run the container:

docker run -p 8000:8000 -e YOUTUBE_API_KEY=<your_api_key> mcp-youtube

Configuration

Cursor AI

To use this MCP server with Cursor AI, add the following configuration to your MCP settings:

{
  "mcp": {
    "tools": [
      {
        "name": "youtube",
        "server": {
          "url": "http://localhost:8000"
        }
      }
    ]
  }
}

Tools

The following tools are available for interacting with YouTube:

search_videos

Search for videos on YouTube.

Arguments:

  • query (required): The search query
  • max_results (optional, default: 10): Maximum number of results to return
  • order (optional, default: “relevance”): Order of the results (‘relevance’, ‘date’, ‘rating’, ‘viewCount’)
  • region_code (optional): ISO 3166-1 alpha-2 country code (e.g., ‘US’, ‘GB’)
  • language (optional): ISO 639-1 language code (e.g., ‘en’, ‘fr’)
  • published_after (optional): Only return videos published after this datetime (RFC 3339 format)
  • published_before (optional): Only return videos published before this datetime (RFC 3339 format)

list_channels

List YouTube channel details.

Arguments:

  • One of the following is required:
    • channel_id: The YouTube channel ID to retrieve details for
    • handle: The YouTube handle to retrieve details for
    • username: The YouTube username to retrieve details for
  • max_results (optional, default: 10): Maximum number of channels to return

list_playlist_videos

List videos from a specific YouTube playlist.

Arguments:

  • playlist (required): The playlist ID or URL to list videos from
  • max_results (optional, default: 10): Maximum number of videos to return

get_video_details

Get details for a specific YouTube video.

Arguments:

  • video (required): The video ID or URL to get details for

list_video_comments

Get comments for a specific YouTube video.

Arguments:

  • video (required): The video ID or URL to get comments for
  • max_results (optional, default: 20): Maximum number of comments to return
  • order (optional, default: “relevance”): Order of the comments (‘relevance’ or ‘time’)

get_video_transcript

Get transcript for a specific YouTube video.

Arguments:

  • video (required): The video ID or URL to get transcript for
  • language_code (required): ISO 639-1 language code of the transcript (e.g., ‘en’, ‘fr’)
  • preserve_formatting (optional, default: false): Whether to preserve HTML formatting in the transcript
  • include_timestamps (optional, default: false): Whether to include timestamps in the transcript

list_video_transcripts

List available transcripts for a specific YouTube video.

Arguments:

  • video (required): The video ID or URL to list transcripts for

translate_video_transcript

Translate transcript for a specific YouTube video to the specified language.

Arguments:

  • video (required): The video ID or URL to translate transcript for
  • language_code (required): ISO 639-1 language code of the translation (e.g., ‘en’, ‘fr’).
  • preserve_formatting (optional, default: false): Whether to preserve HTML formatting in the transcript

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers