home / mcp / youtube mcp server

YouTube MCP Server

Provides YouTube search and transcript capabilities via MCP for Claude Desktop and other clients.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "bendelpino-youtube-mcp": {
      "command": "python",
      "args": [
        "youtube_server.py"
      ],
      "env": {
        "YOUTUBE_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

This MCP server lets Claude Desktop and other applications search YouTube videos and fetch transcripts through a simple, extensible interface. It provides two core actions—searching videos and extracting transcripts—and an AI-ready prompt template to analyze YouTube content, all accessible via the MCP protocol.

How to use

You can use this server from an MCP client to perform two main tasks: search YouTube for videos based on a query, and retrieve transcripts for a given video. You can also leverage the built-in prompt template to guide AI-driven analysis of multiple videos. In practice, you compose requests through your MCP client to call the available tools by name, passing the required parameters.

How to install

Prerequisites: Python 3.8+ and a working network connection. You will also need a YouTube Data API key to enable search and transcript features.

# Create a virtual environment
python3 -m venv .venv

# Activate the virtual environment
source .venv/bin/activate

# Install dependencies
pip install -r requirements.txt

Configuration and running

Prepare your environment and start the server locally. You will set your YouTube API key in the environment used by the server.

# Copy example environment file
cp .env.example .env

# Edit .env and add your YouTube API key
YOUTUBE_API_KEY=your_actual_api_key_here

To run the server after configuring the API key, activate the virtual environment and start the Python script that runs the MCP server.

# Activate virtual environment
source .venv/bin/activate

# Run the server
python youtube_server.py

If you are configuring Claude Desktop or another MCP client, you can use the following local (stdio) command configuration to start the server from your MCP client setup.

{
  "mcpServers": {
    "youtube": {
      "command": "python",
      "args": ["youtube_server.py"],
      "env": {
        "YOUTUBE_API_KEY": "your_key_here"
      }
    }
  }
}

Additional notes

The server exposes three main tools: search_youtube_videos, get_youtube_transcript, and analyze_youtube_content_prompt. These tools enable searching for videos, retrieving transcripts, and performing AI-assisted content analysis across multiple videos.

Security and troubleshooting

Watch for missing API key or insufficient permissions. The server will limit searches if the API key is absent. Transcript extraction may fail for videos without captions. Respect YouTube API quotas and rate limits.

Available tools

search_youtube_videos

Search YouTube for videos based on a query and return a list of video information including titles, channels, descriptions, URLs, and metadata.

get_youtube_transcript

Extract the transcript for a specified YouTube video URL or ID, returning timestamps and metadata.

analyze_youtube_content_prompt

AI prompt template used to perform comprehensive analysis of YouTube content across multiple videos.