New:Microsoft Teams Notifications Are Now Available in Socket.Learn more →
Get Started

@htekdev/youtube-mcp-server

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@htekdev/youtube-mcp-server

MCP server providing full YouTube Data API v3 search and retrieval capabilities for AI agents

latest
Source
npmnpm
Version
1.1.2
Version published
Weekly downloads
9
-62.5%
Maintainers
1
Weekly downloads
 
Created
Source

YouTube MCP Server

A Model Context Protocol (MCP) server providing full YouTube Data API v3 search and retrieval capabilities for AI agents.

Installation

npm install @htekdev/youtube-mcp-server

Or run directly with npx:

npx @htekdev/youtube-mcp-server

Configuration

For Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "youtube": {
      "command": "npx",
      "args": ["@htekdev/youtube-mcp-server"],
      "env": {
        "YOUTUBE_API_KEY": "your_api_key_here"
      }
    }
  }
}

For Other MCP Clients

Run the server directly:

YOUTUBE_API_KEY=your_api_key npx @htekdev/youtube-mcp-server

Getting an API Key

  • Go to Google Cloud Console
  • Create a new project or select existing
  • Enable the YouTube Data API v3
  • Create an API key credential

You can also configure the API key at runtime using the setup_youtube tool.

Available Tools

Setup & Status

ToolDescription
setup_youtubeConfigure API key and defaults
youtube_statusCheck configuration status
ToolDescription
youtube_searchFull-featured search with all filters
youtube_search_videosSimplified video search
youtube_search_relatedFind videos related to a specific video

Videos

ToolDescription
youtube_video_detailsGet comprehensive video information
youtube_video_listBatch retrieve multiple videos
youtube_trendingGet trending/popular videos

Channels

ToolDescription
youtube_channel_detailsGet channel info (by ID, handle, or username)
youtube_channel_videosList videos from a channel
youtube_channel_searchSearch within a specific channel

Playlists

ToolDescription
youtube_playlist_detailsGet playlist information
youtube_playlist_itemsList all videos in a playlist
youtube_playlists_by_channelGet all playlists from a channel

Comments

ToolDescription
youtube_comment_threadsGet top-level comments on a video
youtube_comment_repliesGet replies to a specific comment

Other

ToolDescription
youtube_captions_listList available captions/subtitles
youtube_live_broadcastsSearch for live streams

Usage Examples

Search for Videos

{
  "tool": "youtube_search",
  "args": {
    "q": "machine learning tutorial",
    "type": "video",
    "maxResults": 10,
    "order": "viewCount",
    "videoDuration": "medium"
  }
}

Get Video Details

{
  "tool": "youtube_video_details",
  "args": {
    "videoId": "dQw4w9WgXcQ",
    "parts": ["snippet", "statistics", "contentDetails"]
  }
}

Get Channel by Handle

{
  "tool": "youtube_channel_details",
  "args": {
    "handle": "@MrBeast"
  }
}

Search Live Streams

{
  "tool": "youtube_live_broadcasts",
  "args": {
    "q": "gaming",
    "eventType": "live",
    "maxResults": 10
  }
}

Development

Prerequisites

  • Node.js >= 18.0.0
  • npm

Setup

npm install

Running Tests

npm test              # Run tests once
npm run test:watch    # Watch mode
npm run test:coverage # With coverage report

Type Checking

npm run typecheck

Building

npm run bundle

API Quota Notes

YouTube Data API has quota limits (default 10,000 units/day). Tool quota costs:

OperationCost
Search100 units
Videos list1 unit
Channels list1 unit
Playlists list1 unit
PlaylistItems list1 unit
CommentThreads list1 unit
Comments list1 unit
Captions list50 units

License

MIT

Author

htekdev

Keywords

youtube

FAQs

Package last updated on 05 Mar 2026

Related posts