
YouTube
STDIOMCP server for searching, analyzing, and retrieving YouTube videos, channels, comments, and transcripts.
MCP server for searching, analyzing, and retrieving YouTube videos, channels, comments, and transcripts.
A Model Context Protocol (MCP) server for interacting with YouTube data. This server provides resources and tools to query YouTube videos, channels, comments, and transcripts through a stdio interface.
To install YouTube MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @coyaSONG/youtube-mcp-server --client claude
Clone this repository:
git clone https://github.com/coyaSONG/youtube-mcp-server.git cd youtube-mcp-server
Install dependencies:
npm install
Create a .env
file in the root directory:
YOUTUBE_API_KEY=your_youtube_api_key_here
PORT=3000
Build the project:
npm run build
Run the server:
npm start
Run in development mode:
npm run dev
Clean build artifacts:
npm run clean
The project includes a Dockerfile for containerized deployment:
# Build the Docker image docker build -t youtube-mcp-server . # Run the container docker run -p 3000:3000 --env-file .env youtube-mcp-server
youtube://video/{videoId}
- Get detailed information about a specific videoyoutube://channel/{channelId}
- Get information about a specific channelyoutube://transcript/{videoId}
- Get transcript for a specific video
?language=LANGUAGE_CODE
(e.g., en
, ko
, ja
)search-videos
- Search for YouTube videos with advanced filtering optionsget-video-comments
- Get comments for a specific videoget-video-transcript
- Get transcript for a specific video with optional languageenhanced-transcript
- Advanced transcript extraction with filtering, search, and multi-video capabilitiesget-key-moments
- Extract key moments with timestamps from a video transcript for easier navigationget-segmented-transcript
- Divide a video transcript into segments for easier analysisget-video-stats
- Get statistical information for a specific videoget-channel-stats
- Get subscriber count, view count, and other channel statisticscompare-videos
- Compare statistics across multiple videosget-trending-videos
- Retrieve trending videos by region and categoryget-video-categories
- Get available video categories for a specific regionanalyze-channel-videos
- Analyze performance trends of videos from a specific channelvideo-analysis
- Generate an analysis of a YouTube videotranscript-summary
- Generate a summary of a video based on its transcript with customizable length and keywords extractionsegment-by-segment-analysis
- Provide detailed breakdown of content by analyzing each segment of the videoyoutube://transcript/dQw4w9WgXcQ
youtube://transcript/dQw4w9WgXcQ?language=en
// Get video statistics { "type": "tool", "name": "get-video-stats", "parameters": { "videoId": "dQw4w9WgXcQ" } } // Compare multiple videos { "type": "tool", "name": "compare-videos", "parameters": { "videoIds": ["dQw4w9WgXcQ", "9bZkp7q19f0"] } }
{ "type": "prompt", "name": "transcript-summary", "parameters": { "videoId": "dQw4w9WgXcQ", "language": "en" } }
// Basic multi-video transcript extraction { "type": "tool", "name": "enhanced-transcript", "parameters": { "videoIds": ["dQw4w9WgXcQ", "9bZkp7q19f0"], "format": "timestamped" } } // With search and time filtering { "type": "tool", "name": "enhanced-transcript", "parameters": { "videoIds": ["dQw4w9WgXcQ"], "filters": { "timeRange": { "start": 60, // Start at 60 seconds "end": 180 // End at 180 seconds }, "search": { "query": "never gonna", "contextLines": 2 } }, "format": "merged" } } // With smart segmentation for easier analysis { "type": "tool", "name": "enhanced-transcript", "parameters": { "videoIds": ["dQw4w9WgXcQ"], "filters": { "segment": { "count": 5, "method": "smart" // Breaks at natural pauses } }, "format": "timestamped", "language": "en" } }
// Get key moments from a video { "type": "tool", "name": "get-key-moments", "parameters": { "videoId": "dQw4w9WgXcQ", "maxMoments": "5" } } // Get a segmented transcript { "type": "tool", "name": "get-segmented-transcript", "parameters": { "videoId": "dQw4w9WgXcQ", "segmentCount": "4" } } // Get a segment-by-segment analysis { "type": "prompt", "name": "segment-by-segment-analysis", "parameters": { "videoId": "dQw4w9WgXcQ", "segmentCount": "4" } } // Get customized transcript summary { "type": "prompt", "name": "transcript-summary", "parameters": { "videoId": "dQw4w9WgXcQ", "language": "en", "summaryLength": "detailed", "includeKeywords": "true" } }
The server handles various error conditions, including:
MIT