youtube-mcp
Provides tools for extracting video transcripts, metadata, comments, and channel statistics from YouTube.
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., "@youtube-mcpsummarize transcript of 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.
YouTube MCP Server
A Model Context Protocol (MCP) server for extracting and processing YouTube video content. This server provides tools for LLMs to directly read video transcripts, analyze metadata, search within videos, fetch top comments, and get channel statistics.
Features
Transcript Extraction: Fetch video subtitles/transcripts with timestamps (No API Key Required).
Video Summarization: Intelligent transcript chunking for LLM summarization.
Transcript Search: Search for specific words or phrases and get exact YouTube timestamp links.
Video Metadata: Fetch views, likes, descriptions, duration, and tags (Requires API Key).
Top Comments: Fetch the most relevant comments of a video.
Channel Info: Get subscriber count, total video count, and channel creation date.
Related MCP server: YouTube Insights MCP Server
Prerequisites
Node.js 18 or higher (v22+ recommended)
A YouTube Data API v3 Key (Only required for metadata, comments, and channel info)
Installation
# 1. Clone or download the repository
# 2. Install dependencies
npm install
# 3. Build the project
npm run buildConfiguration
For tools requiring an API key (video info, comments, channel info), you need to get a free API key from Google Cloud Console.
Copy the example env file:
cp .env.example .envAdd your YouTube Data API v3 key to the
.envfile:YOUTUBE_API_KEY=YOUR_API_KEY_HERE
Development
# Run in development mode (auto-reload on save)
npm run devAdding to Cursor / Claude Desktop
Add the following to your mcp_config.json file:
{
"mcpServers": {
"youtube-mcp": {
"command": "node",
"args": ["/absolute/path/to/youtube-mcp/dist/index.js"],
"env": {
"YOUTUBE_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}Tools List
Tool Name | Description | Requires API Key |
| Fetches the full transcript with timestamps | ❌ No |
| Splits transcript into smaller timestamped chunks | ❌ No |
| Searches the video text and returns timestamp links | ❌ No |
| Fetches views, likes, duration, and description | ✅ Yes |
| Fetches top comments | ✅ Yes |
| Fetches subscriber count and channel statistics | ✅ Yes |
Available Tools
6 toolsget_channel_infoA
Fetches YouTube channel details: name, subscriber count, total videos, total views, etc. You can provide a channel ID or a video URL. Requires YouTube API key.
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | YouTube channel ID (starts with UC) or a video URL (channel will be auto-extracted from video) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses the API key requirement and the type of data returned, but omits details about error behavior, rate limits, or explicit read-only semantics. The word 'Fetches' implies non-mutating, which adds some clarity.
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 with no wasted words. It front-loads the primary purpose, then addresses input flexibility and the API key requirement, all in a clear, compact structure.
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 simple one-parameter fetch tool without an output schema, the description covers purpose, input formats, a prerequisite, and sample return fields. It is complete enough for basic usage, though it could mention error scenarios or sibling tool distinctions.
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 input schema already provides 100% coverage with a detailed description of the single parameter, including the UC prefix and auto-extraction from video URLs. The description mostly repeats this information without adding extra semantic meaning beyond the schema.
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 fetches YouTube channel details and lists specific fields like name, subscriber count, and total views. This specific verb+resource framing distinguishes it from sibling tools like get_video_info or get_transcript.
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 context on accepted inputs (channel ID or video URL) and the API key requirement, but it does not explicitly compare this tool to alternatives or state when not to use it. Usage is implied rather than directly guided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_commentsA
Fetches the most popular comments of a YouTube video. Requires YouTube API key.
| Name | Required | Description | Default |
|---|---|---|---|
| videoUrl | Yes | YouTube video URL or video ID | |
| maxResults | No | Maximum number of comments to fetch. Default: 20 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of behavioral disclosure. It mentions the requirement for a YouTube API key, but does not disclose read-only behavior, error handling, rate limits, or what happens when no comments exist. This is minimal disclosure beyond the basic operation.
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 extremely concise, consisting of just two short sentences. It is front-loaded with the core purpose and includes the key prerequisite, with no wasted words.
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 simplicity, the description covers the main purpose and the API key requirement, but with no output schema or annotations, it does not explain return format or error behavior. It is adequate but leaves some gaps for a tool with no structured output documentation.
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 input schema has 100% coverage with both parameters described. The description adds no extra meaning to the parameters, so the baseline of 3 is appropriate since the schema does the heavy lifting.
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 fetches the most popular comments of a YouTube video, using a specific verb and resource. It is distinct from sibling tools like get_transcript or get_video_info, which serve different purposes.
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 implies usage for retrieving comments but does not explicitly state when to use this tool over alternatives or provide any exclusions. The context is clear enough, but no alternatives or specific when/when-not guidance is given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_transcriptA
Fetches the transcript (subtitles) of a YouTube video with timestamps. No API key required.
| Name | Required | Description | Default |
|---|---|---|---|
| videoUrl | Yes | YouTube video URL or video ID (e.g. https://youtube.com/watch?v=xxx or dQw4w9WgXcQ) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses 'No API key required' but fails to mention potential failure conditions (e.g., videos without available subtitles), language limitations, or what exactly is returned regarding timestamps. The description is too thin for a tool with zero annotation support.
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?
Two concise sentences, front-loaded with the action and resource. Every word earns its place; the 'No API key required' is a valuable qualification. No redundancy.
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 simple one-parameter tool with no output schema, the description clearly states the core purpose and a key constraint. However, it omits details about return format or behavior when transcription is unavailable, which are relevant for an agent deciding on this tool. The presence of sibling tools makes it more important to clarify scope.
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% (videoUrl is fully described in the schema). The description adds no additional meaning about the parameter, so a baseline score 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?
The description uses a specific verb ('Fetches') and clearly identifies the resource ('transcript (subtitles) of a YouTube video') with a key feature ('with timestamps'). It distinguishes itself from siblings like search_in_transcript and summarize_transcript by focusing on raw transcript retrieval.
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 implies its use case (fetching a transcript) but does not explicitly state when to use it versus alternatives, nor does it mention any exclusions or prerequisites. There is no naming of sibling tools or guidance on when a different tool would be more appropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_video_infoA
Fetches metadata for a YouTube video: title, description, duration, views, likes, tags, etc. Requires YouTube API key.
| Name | Required | Description | Default |
|---|---|---|---|
| videoUrl | Yes | YouTube video URL or video ID |
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 mentions the API key requirement, which is useful, but it does not disclose error handling, rate limits, or whether the data is returned as raw JSON or a structured object. This is adequate but not rich.
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, front-loaded sentence that lists key metadata examples. It is concise and free of unnecessary words.
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?
The tool is simple (one parameter, no output schema, no annotations). The description explains what it fetches and the API key requirement, which covers the essentials. It could mention the output structure or potential errors, but given the simplicity, it is reasonably complete.
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 input schema already provides full description coverage for the single parameter (videoUrl) with 'YouTube video URL or video ID'. The description does not add significant parameter-level details beyond the schema, but it does mention the type of data returned.
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 uses the specific verb 'Fetches' with the resource 'metadata for a YouTube video' and enumerates example fields (title, description, duration, views, likes, tags). This clearly distinguishes it from sibling tools like get_transcript, get_comments, and get_channel_info.
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 clearly implies the tool is for retrieving video metadata, and the sibling names suggest distinct purposes. However, it does not explicitly state when to prefer this tool over alternatives or provide exclusions, so it falls short of full guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_in_transcriptA
Searches for a word or phrase within a YouTube video transcript. Returns matching segments with timestamps and YouTube URL links. No API key required.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Word or phrase to search for in the transcript | |
| videoUrl | Yes | YouTube video URL or video ID |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden. It adds useful disclosures: return format (matching segments with timestamps and YouTube URL links) and no API key requirement. However, it does not mention potential limitations, failure behavior, or whether the transcript is fetched internally. This is slightly above baseline but 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 concise sentences with no redundant words. It front-loads the action and immediately tells the user what to expect, earning a high score.
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 simple tool with only two fully described parameters, the description adequately covers the essential context. It mentions the return payload (segments with timestamps and links) and notes the lack of API key requirement. While an output schema is absent, this level of detail is sufficient for a search operation.
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 descriptions already cover 100% of the parameters, so the description adds little beyond providing the context of searching within a transcript. It does not add details about query syntax, case sensitivity, or URL formats beyond what the schema states.
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 uses the specific verb 'searches' and clearly identifies the resource (YouTube video transcript). It also states what is returned (matching segments with timestamps and URLs), distinguishing it from siblings like get_transcript and summarize_transcript.
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 guidance on when to use this tool versus alternatives. It does not mention that get_transcript should be used for full transcript access or that this is intended for targeted search within a transcript. The usage is only implied by the tool's name and description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
summarize_transcriptA
Splits the YouTube video transcript into chunks and creates timestamped chapters. No API key required.
| Name | Required | Description | Default |
|---|---|---|---|
| videoUrl | Yes | YouTube video URL or video ID | |
| chunkSeconds | No | Duration of each chapter/chunk in seconds. Default: 120 |
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 discloses the core behavior (splitting into chunks and creating timestamped chapters) and a key requirement (no API key). However, it does not detail the return format, error behavior, or any side effects, leaving some ambiguity.
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, front-loaded with the primary purpose, and includes the key operational note about API keys. Every sentence earns its place without unnecessary verbosity.
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 simplicity of the tool (2 params, no output schema, no annotations), the description is largely complete. It clearly communicates the main function and a distinguishing constraint. However, it could briefly mention the output structure (e.g., a list of chapters with timestamps) to fully close the loop, since no output schema is provided.
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 documents both parameters with 100% coverage (videoUrl and chunkSeconds). The description adds no additional parameter-specific information beyond the schema, so it meets the baseline but does not exceed it.
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 action and resource: 'Splits the YouTube video transcript into chunks and creates timestamped chapters.' This is specific and distinguishes it from siblings like get_transcript (which likely retrieves the whole transcript) and search_in_transcript (which searches within it).
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 implies usage for creating chapter summaries from a transcript but does not explicitly state when to use this tool over alternatives. It mentions 'No API key required,' which is a helpful operational note, but no direct comparison or exclusion criteria are provided.
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.
6 tool updates
v1.0.0- First observed
get_channel_info - First observed
get_comments - First observed
get_transcript - First observed
get_video_info - First observed
search_in_transcript - First observed
summarize_transcript
TDQS
Scored across 6 tools
Each tool targets a distinct resource or action: raw transcripts, video metadata, transcript summarization, transcript search, comments, and channel info. The three transcript tools are clearly differentiated by their verbs (get, summarize, search).
Most tools follow a get_* pattern (get_transcript, get_video_info, get_comments, get_channel_info), while summarize_transcript and search_in_transcript use action-specific verbs. This is a minor deviation but still follows a consistent verb_noun structure in snake_case.
Six tools is well-scoped for a YouTube MCP server, covering transcript handling (3 tools), video info, comments, and channel info without overloading the surface. Each tool serves a clear purpose.
The set covers core read-only video analysis workflows: metadata, transcript, comments, and channel details. Minor gaps exist, such as video search or listing videos by channel, but the apparent purpose is well-served.
Maintenance
Related MCP Connectors
Provide token-optimized, structured YouTube data to enhance your LLM applications. Access efficien…
Fetch transcripts, subtitles, chapters, metadata and frames from YouTube and 10+ video platforms
Clean YouTube transcripts for agents: single videos, channels, playlists, plus AI caption cleanup.
YouTube transcripts, search, channel/playlist listings and upload tracking for AI agents. No signup.
Related MCP Servers
- AlicenseBqualityCmaintenanceExtracts YouTube video metadata and transcripts without requiring API keys, enabling users to retrieve video information, captions, and timestamps through web scraping with built-in caching and error handling.1111MIT
- AlicenseBqualityCmaintenanceEnables extraction of transcripts, keyword-based video search with metadata retrieval, and channel information discovery from YouTube videos through natural language interaction.34MIT
- AlicenseCqualityDmaintenanceEnables AI assistants to research YouTube videos by collecting captions, comments, and channel information for analysis and comparison.109MIT
- AlicenseAqualityDmaintenanceEnables LLMs to extract YouTube video transcripts with timestamps, metadata, and file export.330MIT