A Model Context Protocol (MCP) server implementation utilizing the YouTube Data API. It allows AI language models to interact with YouTube content through a standardized interface.
The server provides the following MCP tools:
Tool Name | Description | Required Parameters |
---|---|---|
getVideoDetails |
Get detailed information about multiple YouTube videos including metadata, statistics, and content details | videoIds (array) |
searchVideos |
Search for videos based on a query string | query , maxResults (optional) |
getTranscripts |
Retrieve transcripts for multiple videos | videoIds (array), lang (optional) |
getRelatedVideos |
Get videos related to a specific video based on YouTube's recommendation algorithm | videoId , maxResults (optional) |
getChannelStatistics |
Retrieve detailed metrics for multiple channels including subscriber count, view count, and video count | channelIds (array) |
getChannelTopVideos |
Get the most viewed videos from a specific channel | channelId , maxResults (optional) |
getVideoEngagementRatio |
Calculate engagement metrics for multiple videos (views, likes, comments, and engagement ratio) | videoIds (array) |
getTrendingVideos |
Get currently popular videos by region and category | regionCode (optional), categoryId (optional), maxResults (optional) |
compareVideos |
Compare statistics across multiple videos | videoIds (array) |
Automatically install YouTube MCP Server for Claude Desktop via Smithery:
npx -y @smithery/cli install @icraft2170/youtube-data-mcp-server --client claude
# Install from npm
npm install youtube-data-mcp-server
# Or clone repository
git clone https://github.com/icraft2170/youtube-data-mcp-server.git
cd youtube-data-mcp-server
npm install
Set the following environment variables:
- YOUTUBE_API_KEY
: YouTube Data API key (required)
- YOUTUBE_TRANSCRIPT_LANG
: Default caption language (optional, default: 'ko')
Add the following to your Claude Desktop configuration file:
{
"mcpServers": {
"youtube": {
"command": "npx",
"args": ["-y", "youtube-data-mcp-server"],
"env": {
"YOUTUBE_API_KEY": "YOUR_API_KEY_HERE",
"YOUTUBE_TRANSCRIPT_LANG": "ko"
}
}
}
}
# Install dependencies
npm install
# Run in development mode
npm run dev
# Build
npm run build
The server exposes the following ports for communication:
- HTTP: 3000
- gRPC: 3001
This project is licensed under the MIT License. See the LICENSE file for details.