YouTube MCP Server

YouTube MCP Server

By IA-Programming GitHub

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.

youtube ai
Overview

What is YouTube MCP Server?

YouTube MCP Server is an AI-powered solution designed to enhance your YouTube experience by allowing users to search for videos, retrieve detailed transcripts, and perform semantic searches over video content without relying on the official API.

How to use YouTube MCP Server?

To use the YouTube MCP Server, clone the repository, set up a virtual environment, install dependencies, and run the server using the provided commands. You can then use it with any MCP-compatible client like Claude Desktop App.

Key features of YouTube MCP Server?

  • Search YouTube videos without using the official API.
  • Retrieve video transcripts.
  • Store video information and transcripts in a vector database.
  • Perform semantic search over stored video transcripts.

Use cases of YouTube MCP Server?

  1. Searching for educational videos on specific topics.
  2. Retrieving transcripts for video content to aid in study or research.
  3. Performing semantic searches to find relevant video content based on context rather than just keywords.

FAQ from YouTube MCP Server?

  • Can I use this server without a Google API key?

No, a Google API key is required for embeddings.

  • Is there a limit to the number of videos I can search?

No, you can search as many videos as you want, but the maximum results returned can be configured.

  • Is this project open-source?

Yes, YouTube MCP Server is open-source and contributions are welcome.

Content

YouTube MCP Server

A Model Context Protocol (MCP) server that provides tools for searching YouTube videos, retrieving transcripts, and performing semantic search over video content.

Support Us

If you find this project helpful and would like to support future projects, consider buying us a coffee! Your support helps us continue building innovative AI solutions.

Your contributions go a long way in fueling our passion for creating intelligent and user-friendly applications.

Table of Contents

Features

  • Search YouTube videos without using the official API
  • Retrieve video transcripts
  • Store video information and transcripts in a vector database
  • Perform semantic search over stored video transcripts

Prerequisites

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

Installation

  1. Clone this repository

  2. Create and activate a virtual environment using uv:

uv venv
# On Windows:
.venv\Scripts\activate
# On Unix/MacOS:
source .venv/bin/activate
  1. Install dependencies using uv:
uv pip install -r requirements.txt
  1. Create a .env file with your Google API key:
GOOGLE_API_KEY=your_api_key_here

Running the Server

There are two ways to run the MCP server:

1. Direct Method

To start the MCP server directly:

uv run python server.py

2. Configure for Claude.app

Add to your Claude settings without using any package manager this works for windows:

"mcpServers": {
  "youtube": {
    "command": "C:\\Path\\To\\Your\\Project\\.venv\\Scripts\\python.exe",
    "args": ["C:\\Path\\To\\Your\\Project\\server.py"],
    "env": {
      "GOOGLE_API_KEY": "your_api_key_here"
    }
  }
}

Using Uv package manager this works for windows:

"mcpServers": {
  "youtube": {
    "command": "uv",
    "args": ["--directory", "C:\\Path\\To\\Your\\Project", "run", "server.py"],
    "env": {
      "GOOGLE_API_KEY": "your_api_key_here"
    }
  }
}

Available Tools

The server provides the following tools:

  1. search-youtube: Search for YouTube videos based on a query

    • Parameters:
      • query: Search query string
      • max_results: Maximum number of results to return (default: 5)
  2. get-transcript: Get the transcript of a YouTube video

    • Parameters:
      • video_url: URL of the YouTube video
  3. store-video-info: Store video information and transcript in the vector database

    • Parameters:
      • video_url: URL of the YouTube video
      • metadata: Optional metadata about the video
  4. search-transcripts: Search stored video transcripts using semantic search

    • Parameters:
      • query: Search query
      • limit: Maximum number of results to return (default: 3)

Using with MCP Clients

This server can be used with any MCP-compatible client, such as Claude Desktop App. The tools will be automatically discovered and made available to the client.

Example Usage

  1. Start the server using one of the methods described above
  2. Open Claude Desktop App
  3. Look for the hammer icon to verify that the YouTube tools are available
  4. You can now use commands like:
    • "Search for Python tutorial videos"
    • "Get the transcript of this video: [video_url]"
    • "Search through stored video transcripts about machine learning"

Debugging

If you encounter any issues:

  1. Make sure your Google API key is correctly set in the .env file
  2. Check that all dependencies are installed correctly
  3. Verify that the server is running and listening for connections
  4. Look for any error messages in the server output

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

No tools information available.

A Model Context Protocol server for integrating HackMD's note-taking platform with AI assistants.

MCP Deep Research Server using Gemini creating a Research AI Agent

research ai
View Details
MCP-Mealprep
MCP-Mealprep by JoshuaRL

This project takes a number of MCP servers from GitHub locations, packages them together with this repo's GHCR container, and launches them with docker-compose to run as a stack for ML/AI resources.

docker ai
View Details

BioMCP: Biomedical Model Context Protocol

bioinformatics ai
View Details
MySQL MCP Server
MySQL MCP Server by designcomputer

A Model Context Protocol (MCP) server that enables secure interaction with MySQL databases

Toolbase
Toolbase by Toolbase-AI

A desktop application that adds powerful tools to Claude and AI platforms

Website
Website by FunnyWolf

Adversary simulation and Red teaming platform with AI