YouTube MCP Server
A Model Context Protocol (MCP) server for interacting with YouTube videos. This server provides tools for extracting video metadata, captions, and converting them to markdown format with various templates.
Features
- Video Metadata: Fetch comprehensive video information
- Caption Extraction: Support for auto-generated and manual captions
- Multiple Languages: Built-in support for English and French
- Template System: Three built-in markdown templates:
- Basic: Simple transcript format
- Detailed: Full metadata with timestamps
- Search: Results highlighting with context
- Search Functionality: Search within video captions
- Flexible Authentication: Supports both API key and OAuth2 authentication
Prerequisites
- Node.js (v16 or higher)
- npm or yarn
- A YouTube Data API key and/or OAuth2 credentials
Installation
- Clone the repository:
- Install dependencies:
- Build the project:
Configuration
Create a .env
file in the root directory with your YouTube credentials:
MCP Configuration
Add the server to your MCP settings file (usually at ~/.config/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json
):
Usage
The server provides the following tools:
1. Get Video Info
2. Get Captions
3. Convert to Markdown
4. List Templates
Dependencies
OAuth2 Setup
For OAuth2 authentication (required for private video access):
- Create a project in the Google Cloud Console
- Enable the YouTube Data API v3
- Create OAuth2 credentials (Web application type)
- Run the authentication script:
- Follow the browser prompts to authorize the application
- Copy the refresh token to your configuration
Customizing Templates
You can add custom templates by modifying the DEFAULT_TEMPLATES
array in src/index.ts
. Templates follow this structure:
License
MIT
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Enables interaction with YouTube videos by extracting metadata, captions in multiple languages, and converting content to markdown with various templates.
Related MCP Servers
- -securityFlicense-qualityThis server allows AI language models to interact with YouTube content through a standardized interface, providing features such as video and channel information retrieval, transcript management, and playlist operations.Last updated -59135TypeScript
DeepSRT MCP Serverofficial
AsecurityFlicenseAqualityAn MCP server that enables users to generate summaries of YouTube videos in multiple languages and formats through integration with DeepSRT's API.Last updated -133JavaScript- -securityFlicense-qualityEnables extraction of transcript text from YouTube videos by providing the video URL, supporting standard, shortened, and embed URL formats.Last updated -1JavaScript
- -securityAlicense-qualityA Model Context Protocol server that enables retrieval of transcripts from YouTube videos with language-specific support.Last updated -723MIT License