Get the FREE Ultimate OpenClaw Setup Guide →

Youtube

YouTube MCP Server is an AI-powered solution designed to revolutionize your YouTube experience. It empowers users to search for YouTube videos, retrieve detailed transcripts, and perform semantic searches over video content—all without relying on the official API. By integrating with a vector database, this server streamlines content discovery.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio ia-programming-youtube-mcp uv run server.py \
  --env GOOGLE_API_KEY="your_api_key_here"

How to use

The YouTube MCP Server exposes a set of tools to search YouTube videos, fetch transcripts, and perform semantic search over stored transcripts. It runs via the uv package manager and expects a Python-based server.py script. Before you start, ensure you have Python 3.8+ and a Google API key for embeddings, then install and run the server as described below. Once running, you can connect any MCP-compatible client (such as Claude) and discover the available tools automatically for use in prompts and workflows.

Available tools include: 1) search-youtube to find YouTube videos by a query, returning a list of results with basic metadata; 2) get-transcript to retrieve the transcript of a given video URL; 3) store-video-info to save video metadata and transcripts into a vector database for later semantic search; 4) search-transcripts to perform semantic search over stored transcripts and return relevant snippets or matches. These tools enable iterative, context-aware retrieval and analysis of video content without relying on the official YouTube API for search.

To use these tools from a client, start the server using the uv-based command, then connect your MCP client. The client will discover the tools automatically and you can invoke them with natural-language prompts such as “Search for Python tutorial videos” or “Get the transcript of this video: [video_url]”.

How to install

Prerequisites:

  • Python 3.8+
  • uv package manager
  • A Google API key for embeddings

Installation steps:

  1. Clone the repository:
git clone <repository-url>
cd <repository-directory>
  1. Create and activate a virtual environment using uv: On Windows:
uv venv
.\venv\Scripts\activate

On Unix/MacOS:

source .venv/bin/activate
  1. Install dependencies with uv:
uv pip install -r requirements.txt
  1. Create a .env file with your Google API key:
GOOGLE_API_KEY=your_api_key_here
  1. Run the server (direct method) to verify it starts:
uv run server.py
  1. If you prefer Claude.app configuration, add the following to your MCP config (as described in the README) and ensure your environment variable GOOGLE_API_KEY is set:
"mcpServers": {
  "youtube": {
    "command": "uv",
    "args": ["run", "server.py"],
    "env": {
      "GOOGLE_API_KEY": "your_api_key_here"
    }
  }
}

Additional notes

Notes and tips:

  • Ensure GOOGLE_API_KEY is correctly set in the environment where the server runs; the tools rely on embeddings and may fail if the key is missing.
  • The vector database used by store-video-info should be available and writable; check any configuration for storage backend if you customize the setup.
  • When using Claude.app or other clients, tools are discovered automatically once the server is running and reachable.
  • If you encounter connectivity or library errors, verify that Python 3.8+ is in use and that dependencies listed in requirements.txt are installed successfully with uv.
  • For Windows paths in Claude.config, you can point directly to the Python executable and server.py as shown in the README example.

Related MCP Servers

Sponsor this space

Reach thousands of developers