Integrates with Google Cloud Console for API key management, project creation, and YouTube Data API enablement, with awareness of API quota limitations and usage monitoring.
Provides comprehensive YouTube search functionality using the YouTube Data API v3, enabling search for videos, channels, and playlists with advanced filtering options like duration, quality, date range, region, and language filters.
YouTube Search MCP Server
A fast and comprehensive MCP (Model Context Protocol) server that provides YouTube search functionality using the YouTube Data API v3.
Features
- Comprehensive Search: Search videos, channels, and playlists
- Advanced Filtering: Duration, quality, date range, region, and language filters
- Pagination Support: Handle large result sets with pagination tokens
- Multiple Search Types: Specialized tools for different content types
- Error Handling: Robust error handling and validation
- Rate Limiting Aware: Optimized for YouTube API quota management
Installation
- Install dependencies:
- Set up your YouTube API key:
- Run the server:
API Setup
- Go to Google Cloud Console
- Create a new project or select an existing one
- Enable the YouTube Data API v3
- Create an API key in the credentials section
- Set the API key as an environment variable
Available Tools
Main Search Tool
search_youtube
- Full-featured search with all available filters
Specialized Search Tools
search_youtube_videos
- Video-specific search with video filterssearch_youtube_channels
- Channel-specific searchsearch_youtube_playlists
- Playlist-specific searchsearch_youtube_by_channel
- Search within a specific channel
Resource
youtube-search-help
- Comprehensive help documentation
Usage Examples
Basic Video Search
Advanced Video Search
Channel Search
Search Within Channel
Parameters
Common Parameters
query
: Search query stringmax_results
: Number of results (0-50, default: 25)order
: Sort order (relevance, date, rating, viewCount, title)region_code
: Geographic region (ISO 3166-1 alpha-2 country code)
Video-Specific Parameters
duration
: Video length (any, short, medium, long)definition
: Video quality (any, high, standard)published_after/before
: Date filtering (RFC 3339 format)
Response Format
All search results include:
- Search metadata (total results, pagination tokens)
- Processed items with titles, descriptions, URLs
- Channel information and publication dates
- Thumbnail URLs in multiple sizes
Rate Limiting
- Daily quota: 10,000 units (default)
- Search cost: 100 units per request
- Maximum searches: ~100 requests per day
- Best practices: Implement caching and use specific filters
Error Handling
The server handles various error conditions:
- Invalid API key
- Quota exceeded
- Invalid parameters
- Network errors
- Rate limiting
Best Practices
- Use specific filters to get relevant results
- Implement caching for frequently searched terms
- Monitor quota usage in Google Cloud Console
- Use pagination tokens for large result sets
- Handle errors gracefully with retry logic
Security
- Store API keys in environment variables
- Never expose API keys in client-side code
- Implement proper rate limiting
- Validate and sanitize search queries
License
This project is open source and available under the MIT License.
This server cannot be installed
A Model Context Protocol server that provides comprehensive YouTube search functionality, enabling users to search for videos, channels, and playlists with advanced filtering options using the YouTube Data API.
Related MCP Servers
- AsecurityAlicenseAqualityA Model Context Protocol server that enables access to YouTube video content through transcripts, translations, summaries, and subtitle generation in various languages.Last updated -51PythonMIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that enables retrieval of transcripts from YouTube videos. This server provides direct access to video transcripts and subtitles through a simple interface, making it ideal for content analysis and processing.Last updated -144422TypeScriptMIT License
- -securityAlicense-qualityA Model Context Protocol server that enables searching YouTube videos, retrieving and storing transcripts, and performing semantic search over video content without using the official YouTube API.Last updated -5PythonMIT License
- AsecurityFlicenseAqualityA server that enables interaction with YouTube data through the Model Context Protocol, allowing users to search videos, retrieve detailed information about videos/channels, and fetch comments.Last updated -1214JavaScript