yt-analysis-mcp
Leverages Google's Gemini API to perform AI-powered analysis, summarization, and question-answering for YouTube video content.
Provides tools for analyzing YouTube videos directly via their URLs, enabling users to generate summaries at various detail levels and ask specific questions about the video's content.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@yt-analysis-mcpCan you give me a detailed summary of https://www.youtube.com/watch?v=dQw4w9WgXcQ?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
yt-analysis-mcp
An MCP server that analyzes YouTube videos using Google's Gemini API. Pass in a YouTube URL to get summaries or ask questions about the video content.
Features
Summarize videos - Get brief, medium, or detailed summaries with timestamps
Ask questions - Ask specific questions about video content
Direct URL support - No video downloading required; Gemini analyzes YouTube URLs directly
Related MCP server: yt-mcp
Installation
git clone https://github.com/yourusername/yt-analysis-mcp.git
cd yt-analysis-mcp
pnpm install
pnpm buildConfiguration
Set your Gemini API key:
export GEMINI_API_KEY=your-api-keyGet an API key from Google AI Studio.
Usage
Claude Code
claude mcp add -s user -e GEMINI_API_KEY=your-key yt-analysis -- node /path/to/yt-analysis-mcp/dist/index.jsClaude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"yt-analysis": {
"command": "node",
"args": ["/path/to/yt-analysis-mcp/dist/index.js"],
"env": {
"GEMINI_API_KEY": "your-key"
}
}
}
}Tools
summarize_video
Summarize a YouTube video's content.
Parameter | Type | Required | Description |
| string | Yes | Full YouTube URL |
| string | No |
|
ask_about_video
Ask a specific question about a YouTube video's content.
Parameter | Type | Required | Description |
| string | Yes | Full YouTube URL |
| string | Yes | Your question about the video |
Supported URL Formats
https://www.youtube.com/watch?v=VIDEO_IDhttps://youtu.be/VIDEO_IDhttps://youtube.com/shorts/VIDEO_ID
Development
# Run in development mode
pnpm dev
# Run tests
pnpm test
# Build
pnpm buildLicense
MIT
Available Tools
5 toolsask_about_videoB
Ask a specific question about a YouTube video's content. Returns an answer based on the video.
| Name | Required | Description | Default |
|---|---|---|---|
| youtube_url | Yes | Full YouTube URL (youtube.com/watch?v=ID, youtu.be/ID, or youtube.com/shorts/ID) | |
| question | Yes | Your question about the video content |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden but only states it 'Returns an answer based on the video'. It does not disclose any behavioral traits such as rate limits, authentication needs, or what type of questions are supported. The statement is minimal but not misleading.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that conveys the core purpose efficiently. No wasted words, though it could include more detail without becoming verbose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 2 parameters and no output schema, the description provides a minimal but functional explanation. It lacks details about the format of the answer or limitations, which might be needed for effective use. However, it is not incomplete to the point of being unusable.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents both parameters adequately. The description adds no new meaning beyond the schema, so a baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Describes the tool as asking a specific question about a YouTube video and returning an answer. The verb 'ask' and resource 'video content' are clear. However, it does not explicitly differentiate from sibling tools like 'summarize_video', which also deals with video content, though the 'specific question' aspect provides some distinction.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Implies usage when needing to ask a question about video content, but does not provide explicit guidance on when to use this tool versus alternatives like 'summarize_video' or when not to use it. No exclusions or prerequisites are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
extract_framesA
Extract frames from a YouTube video at specific timestamps you provide. Use this when you already know the exact timestamps you want (e.g., from get_video_timestamps or video summary).
| Name | Required | Description | Default |
|---|---|---|---|
| youtube_url | Yes | Full YouTube URL (youtube.com/watch?v=ID, youtu.be/ID, or youtube.com/shorts/ID) | |
| timestamps | Yes | Array of timestamps in seconds to extract frames from (e.g., [5, 30, 60, 120]) | |
| output_dir | No | Optional directory to save screenshots. If not provided, uses SCREENSHOT_OUTPUT_DIR env var or temp directory. | |
| resolution | No | Output resolution: thumbnail (160p), small (360p), medium (720p), large (1080p), full (original). Default: large | large |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the burden of behavioral disclosure. It focuses on the extraction function but doesn't detail behavior like file output format, naming conventions, or error handling. The description adds some context beyond schema but is not comprehensive.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences long, directly stating the purpose and usage context with no fluff. It is concise and front-loaded with the key action and resource.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (4 parameters with 2 required) and no output schema, the description is adequate but not exhaustive. It covers the primary use case but lacks details on output behavior, which is acceptable since there is no output schema to complement.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description adds value by clarifying the usage context (timestamps from other tools) but does not provide additional semantic meaning beyond what the schema already offers for each parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool extracts frames from a YouTube video at specific timestamps. It specifies the resource (YouTube video) and the action (extract frames at timestamps), and distinguishes it from siblings like extract_screenshots by focusing on user-provided timestamps.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly says when to use this tool: when you already know exact timestamps. It suggests examples like using timestamps from get_video_timestamps or video summary, implying when not to use it (if you don't have timestamps) and providing context for alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
extract_screenshotsA
Extract key screenshots from a YouTube video at important moments. Uses AI to identify visually significant timestamps, then extracts frames. Returns both base64 images and optionally saves to disk.
| Name | Required | Description | Default |
|---|---|---|---|
| youtube_url | Yes | Full YouTube URL (youtube.com/watch?v=ID, youtu.be/ID, or youtube.com/shorts/ID) | |
| count | No | Number of screenshots to extract (1-20, default: 5) | |
| output_dir | No | Optional directory to save screenshots. If not provided, uses SCREENSHOT_OUTPUT_DIR env var or temp directory. | |
| focus | No | Optional focus for timestamp selection (e.g., 'product demos', 'code examples', 'diagrams'). Default analyzes for general key moments. | |
| resolution | No | Output resolution: thumbnail (160p), small (360p), medium (720p), large (1080p), full (original). Default: large | large |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Discloses that it uses AI for timestamp selection, returns base64 images, and optionally saves to disk. With no annotations provided, this description carries the burden well. However, more details about performance or API calls could enhance transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences, each providing distinct value: purpose, method, and output. Could be more concise by removing 'Optionally saves to disk' since it's covered in output_dir parameter.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers main aspects: video input, AI selection, number of screenshots, output format, and save behavior. However, no output schema means description could mention return format (array of base64 strings). Overall adequate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. Description adds context for 'focus' parameter but doesn't elaborate on 'resolution' enum meaning beyond schema. The 'output_dir' description adds context about fallback behavior, which adds value.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states it extracts screenshots from YouTube videos at important moments using AI. Distinguishes from siblings like 'extract_frames' by mentioning AI to find visually significant timestamps, but could be more specific about difference from 'extract_frames'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Implies use for extracting key screenshots, but no explicit guidance on when to use vs siblings like 'extract_frames' or 'get_video_timestamps'. No mention of prerequisites (e.g., need ffmpeg).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_video_timestampsA
Preview mode: Use AI to identify important moments in a YouTube video and return their timestamps WITHOUT extracting frames. Use this to preview what timestamps would be selected before committing to extraction.
| Name | Required | Description | Default |
|---|---|---|---|
| youtube_url | Yes | Full YouTube URL (youtube.com/watch?v=ID, youtu.be/ID, or youtube.com/shorts/ID) | |
| count | No | Number of timestamps to identify (1-20, default: 5) | |
| focus | No | Optional focus for timestamp selection (e.g., 'product demos', 'code examples', 'diagrams'). Default analyzes for general key moments. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It clearly states that it uses AI to identify timestamps and does not extract frames. However, it does not disclose other behavioral traits such as API rate limits, how the AI works, or constraints on video length/format.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise, consisting of two sentences. The first sentence clearly defines the tool's function, and the second sentence explains its purpose relative to other tools. No unnecessary information is present.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (3 parameters, no output schema, no annotations), the description is fairly complete. It explains the tool's purpose and its relationship to extraction tools. However, it does not mention return format or behavior for invalid URLs, but the schema provides validation hints.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already provides descriptions for all parameters (100% coverage), so the description adds minimal value beyond the schema. However, the description does give context for the 'focus' parameter by providing examples like 'product demos' and 'code examples', which adds nuance beyond the schema's generic description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: to use AI to identify important moments in a YouTube video and return their timestamps without extracting frames. It distinguishes itself from sibling tools by emphasizing that it is a preview mode that does not extract frames, which sets it apart from extract_frames and extract_screenshots.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for when to use this tool: 'to preview what timestamps would be selected before committing to extraction.' However, it does not explicitly mention when not to use it or suggest alternatives, but the sibling list makes it clear that extraction tools exist for different purposes.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
summarize_videoA
Summarize a YouTube video's content. Returns a text summary based on the specified detail level.
| Name | Required | Description | Default |
|---|---|---|---|
| youtube_url | Yes | Full YouTube URL (youtube.com/watch?v=ID, youtu.be/ID, or youtube.com/shorts/ID) | |
| detail_level | No | Level of detail: brief (2-3 sentences), medium (key points with timestamps), detailed (comprehensive breakdown) | medium |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must cover behavioral aspects. It mentions it returns a text summary based on detail level, but does not disclose processing time, input validation, or error handling. The behavior is straightforward but minimally described.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences: first states the core function, second explains output based on parameter. It is concise but could be more front-loaded about what the user gets. No fluff, but slightly vague on output format.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, the description should explain return format. It says 'returns a text summary' but not whether it's plain text, structured, or includes timestamps. With siblings like ask_about_video, more detail on output would help. Scores 3 as it covers basic purpose but lacks output specificity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so baseline is 3. The description adds value by explaining the detail_level enum values (brief, medium, detailed) with concrete expectations like 'key points with timestamps', which is not in the schema. This extra context earns a 4.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it summarizes a YouTube video's content and returns a text summary based on a detail level. It distinguishes from siblings like ask_about_video (querying) and extract_frames (visual extraction), but could be more explicit about the summary format.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit when-to-use or alternatives are provided. The description implies usage when a text summary is needed, but does not clarify when to choose this over ask_about_video or other tools. However, the enum options for detail_level give some usage guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
5 tool updates
v0.1.0- First observed
ask_about_video - First observed
extract_frames - First observed
extract_screenshots - First observed
get_video_timestamps - First observed
summarize_video
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose with no ambiguity: ask_about_video answers questions about content, extract_frames extracts frames at user-provided timestamps, extract_screenshots uses AI to find and extract key frames, get_video_timestamps previews AI-identified timestamps, and summarize_video provides text summaries. The descriptions explicitly differentiate their use cases, such as distinguishing between extract_frames (manual timestamps) and extract_screenshots (AI-selected timestamps).
All tool names follow a consistent verb_noun pattern with underscores, using clear action verbs like ask_about, extract, get, and summarize paired with descriptive nouns like video, frames, screenshots, and timestamps. There are no deviations in style or convention, making the set predictable and easy to understand at a glance.
With 5 tools, the count is well-scoped for the YouTube analysis domain, covering core workflows like content querying, frame extraction (both manual and AI-driven), timestamp previewing, and summarization. Each tool earns its place without redundancy, and the number is manageable for agents to navigate effectively.
The tool set provides strong coverage for video analysis, including content understanding, visual extraction, and summarization, with no dead ends. A minor gap exists in lacking direct video metadata retrieval (e.g., title, duration, uploader), but agents can work around this by using existing tools like ask_about_video or summarize_video for such information.
Maintenance
Related MCP Connectors
Summarize YouTube videos or fetch transcripts. Pay-per-call via x402 (USDC on Base), no account.
Analyze images and videos with Gemini to get fast, reliable visual insights. Handle content from U…
Transcribe YouTube via Whisper. Summaries, chapters, semantic-search across your corpus.
Provide token-optimized, structured YouTube data to enhance your LLM applications. Access efficien…
Related MCP Servers
- FlicenseBqualityDmaintenanceEnables AI-powered YouTube video analysis including transcript management, video summaries, chapter generation, keyword extraction, and playback control. Supports searching videos, retrieving channel/playlist information, and translating transcripts using Google Gemini AI.14-
- AlicenseAqualityCmaintenanceAnalyzes YouTube videos using Google's Gemini API, allowing users to get summaries or ask questions about video content via direct URL input.5192MIT
- AlicenseBqualityDmaintenanceEnables conversational analysis of YouTube videos using Gemini 2.5 Pro, supporting multi-turn sessions, direct URL processing, and local video uploads.101MIT
- FlicenseNot gradedqualityDmaintenanceEnables LLMs to interact with YouTube videos by fetching transcripts, summarizing content, and answering questions based on video context.-