youtube-mcp

youtube-mcp

0

The YouTube MCP Server is a Model Context Protocol server designed for interacting with YouTube videos. It offers functionalities such as extracting video metadata, fetching captions, and converting content to markdown format using customizable templates. The server supports operations in multiple languages and offers both API key and OAuth2 authentication.

YouTube MCP Server

A Model Context Protocol (MCP) server facilitating interactions with YouTube videos.

Features

  • Fetch video metadata and captions
  • Auto-generated and manual caption support
  • English and French language options
  • Includes basic, detailed, and search markdown templates
  • Video captions search
  • Supports API key and OAuth2 authentication

Prerequisites

  • Node.js (v16 or higher)
  • npm or yarn
  • YouTube Data API key or OAuth2 credentials

Installation

  1. Clone the repository
  2. Install dependencies
  3. Build the project

Configuration

Create a .env with your YouTube credentials, and add server settings to your MCP file.

Usage

Tools include getting video info, captions, converting to markdown, and listing templates.

Dependencies

Includes packages such as @modelcontextprotocol/sdk and google-auth-library.

OAuth2 Setup

  1. Create project in Google Cloud Console
  2. Enable YouTube Data API v3
  3. Create OAuth2 credentials
  4. Run the authentication script

Customizing Templates

Add custom templates by modifying the DEFAULT_TEMPLATES in src/index.ts.

License

MIT

Contributing

  1. Fork the repository
  2. Create feature branch
  3. Commit changes
  4. Push the branch
  5. Open a Pull Request