youtube-mcp
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
- Clone the repository
- Install dependencies
- 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
- Create project in Google Cloud Console
- Enable YouTube Data API v3
- Create OAuth2 credentials
- Run the authentication script
Customizing Templates
Add custom templates by modifying the DEFAULT_TEMPLATES
in src/index.ts
.
License
MIT
Contributing
- Fork the repository
- Create feature branch
- Commit changes
- Push the branch
- Open a Pull Request