YouTube MCP Server
Servidor MCP de YouTube
Un servidor de Protocolo de Contexto de Modelo (MCP) para interactuar con vídeos de YouTube. Este servidor proporciona herramientas para extraer metadatos y subtítulos de vídeo, y convertirlos a formato Markdown con diversas plantillas.
Características
Metadatos de video : obtenga información completa del video
Extracción de subtítulos : compatibilidad con subtítulos generados automáticamente y manualmente
Varios idiomas : soporte integrado para inglés y francés
Sistema de plantillas : tres plantillas de rebajas integradas:
Básico: Formato de transcripción simple
Detallado: metadatos completos con marcas de tiempo
Búsqueda: Resultados resaltados con contexto
Función de búsqueda : Buscar dentro de los subtítulos de los videos
Autenticación flexible : admite tanto la clave API como la autenticación OAuth2
Related MCP server: YouTube Video Summarizer MCP Server
Prerrequisitos
Node.js (v16 o superior)
npm o hilo
Una clave de API de datos de YouTube y/o credenciales OAuth2
Instalación
Clonar el repositorio:
git clone [repository-url]
cd youtube-mcpInstalar dependencias:
npm installConstruir el proyecto:
npm run buildConfiguración
Crea un archivo .env en el directorio raíz con tus credenciales de YouTube:
YOUTUBE_API_KEY=your_api_key
YOUTUBE_CLIENT_ID=your_client_id
YOUTUBE_CLIENT_SECRET=your_client_secret
YOUTUBE_REFRESH_TOKEN=your_refresh_token # Optional, for OAuth2Configuración de MCP
Agregue el servidor a su archivo de configuración de MCP (generalmente en ~/.config/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json ):
{
"mcpServers": {
"youtube": {
"command": "node",
"args": ["path/to/youtube-mcp/build/index.js"],
"env": {
"YOUTUBE_API_KEY": "your_api_key",
"YOUTUBE_CLIENT_ID": "your_client_id",
"YOUTUBE_CLIENT_SECRET": "your_client_secret"
},
"disabled": false,
"alwaysAllow": []
}
}
}Uso
El servidor proporciona las siguientes herramientas:
1. Obtener información del video
use_mcp_tool youtube get_video_info {
"url": "https://www.youtube.com/watch?v=VIDEO_ID"
}2. Obtener subtítulos
use_mcp_tool youtube get_captions {
"url": "https://www.youtube.com/watch?v=VIDEO_ID",
"language": "en" // Optional, defaults to "en"
}3. Convertir a Markdown
use_mcp_tool youtube convert_to_markdown {
"url": "https://www.youtube.com/watch?v=VIDEO_ID",
"template_name": "detailed", // Optional, "basic", "detailed", or "search"
"language": "en", // Optional
"options": { // Optional
"include_chapters": true,
"search_term": "keyword" // Only for search template
}
}4. Plantillas de lista
use_mcp_tool youtube list_templatesDependencias
{
"dependencies": {
"@modelcontextprotocol/sdk": "latest",
"googleapis": "^146.0.0",
"google-auth-library": "^9.0.0",
"youtube-captions-scraper": "^2.0.0",
"express": "^4.18.2",
"open": "^9.1.0"
},
"devDependencies": {
"@types/node": "^20.0.0",
"typescript": "^5.0.0",
"tsx": "^4.0.0"
}
}Configuración de OAuth2
Para la autenticación OAuth2 (necesaria para el acceso a video privado):
Crear un proyecto en Google Cloud Console
Habilitar la API de datos de YouTube v3
Crear credenciales OAuth2 (tipo de aplicación web)
Ejecute el script de autenticación:
node src/get-api-key.jsSiga las instrucciones del navegador para autorizar la aplicación.
Copia el token de actualización a tu configuración
Personalización de plantillas
Puedes agregar plantillas personalizadas modificando la matriz DEFAULT_TEMPLATES en src/index.ts . Las plantillas siguen esta estructura:
interface MarkdownTemplate {
name: string;
description: string;
format: {
header?: string;
chapter_format?: string;
caption_block: string;
timestamp_format?: string;
search_result_format?: string;
}
}Licencia
Instituto Tecnológico de Massachusetts (MIT)
Contribuyendo
Bifurcar el repositorio
Crea tu rama de funciones (
git checkout -b feature/amazing-feature)Confirme sus cambios (
git commit -m 'Add some amazing feature')Empujar a la rama (
git push origin feature/amazing-feature)Abrir una solicitud de extracción
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- AlicenseBqualityCmaintenanceEnables extraction of transcripts, keyword-based video search with metadata retrieval, and channel information discovery from YouTube videos through natural language interaction.34MIT
- AlicenseBqualityFmaintenanceEnables AI assistants to analyze and summarize YouTube videos by extracting captions, subtitles, and comprehensive metadata including title, description, and duration in multiple languages.14160MIT
- AlicenseNot gradedqualityDmaintenanceExtracts captions, metadata, and descriptions from YouTube videos to enable AI assistants to summarize their content.11MIT
- AlicenseAqualityDmaintenanceEnables fetching, searching, and summarizing YouTube video transcripts with multi-language support.4MIT
Related MCP Connectors
Fetch transcripts, subtitles, chapters, metadata and frames from YouTube and 10+ video platforms
YouTube transcripts, subtitles, and video metadata as structured JSON via an Apify Actor.
YouTube transcripts, search, channels, playlists and bulk transcript jobs for AI agents. 14 tools.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nattyraz/youtube-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server