mcp-youtube-extract

mcp-youtube-extract

An MCP server for YouTube operations delivering video metadata and transcripts with robust tooling and logging.

16
Stars
1
Forks
0
Releases

Overview

An MCP server for YouTube operations that demonstrates core MCP concepts, including a tools framework and robust logging. It exposes a single main tool get_yt_video_info that, given a YouTube video ID, returns metadata via yt-info-extract (title, description, channel, publish date, view count) and retrieves a transcript via yt-ts-extract, with intelligent fallback logic to handle different transcript types and both manually created and auto-generated transcripts. The server works out of the box without an API key for basic functionality, using yt-info-extract and yt-ts-extract. Optional YouTube API key can be configured for enhanced metadata retrieval and as a fallback. The project emphasizes comprehensive error handling with graceful extraction failures, multiple fallback strategies, standardized error responses, and extensive logging for debugging. It includes development support with uv, tests, and a clear project structure. The MCP server can be run via mcp_youtube_extract or uv, and is designed to be easily integrated by clients via a simple configuration describing the MCP server and environment variables.

Details

Owner
sinjab
Language
Python
License
MIT License
Updated
2025-12-07

Features

MCP Server Core

A fully functional MCP server framework with tools, logging, and error handling to demonstrate MCP concepts.

YouTube Data Tool (get_yt_video_info)

Retrieves video metadata via yt-info-extract (title, description, channel, publish date, view count) and provides transcript data.

Transcript Retrieval with Intelligent Fallback

Uses yt-ts-extract to fetch transcripts with fallback logic for manual and auto-generated transcripts.

No API Key Required for Basic Usage

Core functionality works out-of-the-box without a YouTube Data API key; an API key is optional for enhanced metadata retrieval.

Comprehensive Logging and Error Handling

Extensive logs and standardized error responses with graceful failure modes and multiple fallbacks.

Audience

DevelopersBuild MCP clients/servers to fetch YouTube metadata and transcripts for integration.
QA EngineersTest and validate MCP YouTube integration through automated tests and inspections.

Tags

MCPYouTubevideo metadatatranscriptsfallbackloggingerror-handlingyt-info-extractyt-ts-extractno-api-key