YouTube Insights MCP Server
# YouTube Insights MCP Server
An MCP (Model Context Protocol) server that extracts valuable insights from YouTube videos including transcripts, metadata, and summaries.
## Features
- **Extract Transcripts**: Get full video transcripts in multiple languages
- **Video Metadata**: Retrieve title, author, thumbnail, and other metadata
- **Comprehensive Insights**: Combined transcript, metadata, and auto-generated summaries
- **Multiple URL Formats**: Supports youtube.com, youtu.be, shorts, and direct video IDs
## Installation
```bash
# Install dependencies
uv sync
```
## Usage
### Running the Server
```bash
python main.py
```
### Available Tools
#### 1. `get_youtube_transcript`
Extracts the full transcript from a YouTube video.
**Parameters:**
- `url` (required): YouTube video URL or video ID
- `languages` (optional): Array of preferred language codes (default: ["en"])
**Example:**
```json
{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"languages": ["en", "es"]
}
```
#### 2. `get_youtube_metadata`
Gets metadata for a YouTube video.
**Parameters:**
- `url` (required): YouTube video URL or video ID
**Example:**
```json
{
"url": "https://youtu.be/dQw4w9WgXcQ"
}
```
#### 3. `get_youtube_insights`
Gets comprehensive insights including transcript, metadata, and summary.
**Parameters:**
- `url` (required): YouTube video URL or video ID
- `languages` (optional): Array of preferred language codes (default: ["en"])
- `summary_sentences` (optional): Number of sentences for summary (default: 5)
**Example:**
```json
{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"languages": ["en"],
"summary_sentences": 5
}
```
## Supported URL Formats
- `https://www.youtube.com/watch?v=VIDEO_ID`
- `https://youtu.be/VIDEO_ID`
- `https://www.youtube.com/embed/VIDEO_ID`
- `https://www.youtube.com/shorts/VIDEO_ID`
- Direct video ID: `VIDEO_ID`
## Configuration for Claude Desktop
Add to your Claude Desktop config file:
**MacOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
**Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
```json
{
"mcpServers": {
"youtube-insights": {
"command": "uv",
"args": [
"--directory",
"C:\\Users\\TejasBorate\\Desktop\\Youtube-Video-Insights\\youtube_insights_mcp",
"run",
"python",
"main.py"
]
}
}
}
```
## Requirements
- Python 3.10+
- mcp
- youtube-transcript-api
- requests
## Error Handling
The server handles various error cases:
- Transcripts disabled for video
- No transcript available
- Video unavailable
- Invalid URL format
- Network errors
All errors are returned in a structured JSON format with descriptive messages.
TDQS
Scored across 3 tools
The tools have overlapping purposes, as get_youtube_insights includes metadata and transcript, making it ambiguous when to choose get_youtube_metadata or get_youtube_transcript instead. This overlap can lead to misselection, as agents might use the comprehensive tool unnecessarily or struggle to pick the right specialized one.
All tool names follow a consistent verb_noun pattern with 'get_youtube_' prefix, using snake_case uniformly. This predictability makes it easy for agents to understand and navigate the tool set without confusion.
With only 3 tools, the set feels thin for a 'YouTube Insights' server, as it lacks operations like search, list, or update capabilities that might be expected for broader video analysis. However, it covers basic retrieval functions, making it borderline appropriate but limited in scope.
There are significant gaps in the tool surface for a YouTube insights domain, such as no search tools for finding videos, no playlist or channel operations, and no update or deletion capabilities. The tools only provide read-only access to individual videos, which is insufficient for comprehensive insights workflows.