@konanx/youtube-mcp
v0.1.0
Published
MCP server for exploring YouTube channels with API key access.
Maintainers
Readme
@konanx/youtube-mcp
MCP server for working with YouTube channels through YOUTUBE_API_KEY.
Features
- Get all videos published on a channel.
- Return views, likes, and comment counts for videos.
- Return the public transcript for a video when captions are available.
- Build an overview summary for a channel.
- Show top videos by views, likes, or comments.
- Search videos inside a channel by title, description, or tags.
Limitations
- Channel and video data are fetched through YouTube Data API v3.
- Transcripts are not available from YouTube Data API when using only an API key. This server uses a public captions flow, so transcripts are available only for videos with accessible public subtitles.
- Free-text channel lookup uses
search.list, which is significantly more expensive in quota than passing a directchannelIdor@handle.
Environment Variables
YOUTUBE_API_KEY=your_youtube_data_api_keyInstallation
npm install
npm run buildPublishing To npm
The package is already prepared for scoped public publishing.
npm login
npm run pack:check
npm publish --access publicAlready configured:
binpoints todist/index.jsfilespublishes onlydistandREADME.mdprepublishOnlyrebuilds the project before publishingpublishConfig.accessis fixed topublic
Before publishing, make sure the @konanx scope belongs to your npm account.
Running Locally
YOUTUBE_API_KEY=your_key npm startMCP Client Setup
A ready-to-use example config is available in mcp.json.
{
"mcpServers": {
"youtube": {
"command": "npx",
"args": ["-y", "@konanx/youtube-mcp"],
"env": {
"YOUTUBE_API_KEY": "YOUR_YOUTUBE_API_KEY"
}
}
}
}If you prefer installing the package globally first:
npm install -g @konanx/youtube-mcpThen configure your MCP client like this:
{
"mcpServers": {
"youtube": {
"command": "youtube-mcp",
"args": [],
"env": {
"YOUTUBE_API_KEY": "YOUR_YOUTUBE_API_KEY"
}
}
}
}For local development before publishing, you can still run the built entrypoint directly:
{
"mcpServers": {
"youtube": {
"command": "node",
"args": [
"/Projects/KonanX/mcp/youtube/dist/index.js"
],
"env": {
"YOUTUBE_API_KEY": "YOUR_YOUTUBE_API_KEY"
}
}
}
}MCP Tools
youtube_list_channel_videos
Input:
{
"channel": "@GoogleDevelopers",
"limit": 100
}youtube_get_video_stats
Input:
{
"videoIds": ["dQw4w9WgXcQ"]
}youtube_get_video_transcript
Input:
{
"videoId": "dQw4w9WgXcQ"
}youtube_get_channel_overview
Input:
{
"channel": "https://www.youtube.com/@GoogleDevelopers"
}youtube_find_top_videos
Input:
{
"channel": "@GoogleDevelopers",
"sortBy": "views",
"limit": 10
}youtube_search_channel_videos
Input:
{
"channel": "@GoogleDevelopers",
"query": "gemini",
"limit": 20
}