YouTube MCP (youtube_mcp)
A Model Context Protocol (MCP) server that provides production-grade YouTube inventory tools (channel resolution, channel videos, channel playlists, playlist videos) designed to be safe-by-default, quota-aware, and AI-friendly.
Repository: https://github.com/glonorce/youtube_mcp PyPI: https://pypi.org/project/glonorce-youtube-mcp/
Naming note:
- Repo name:
youtube_mcp- Python package / import name:
youtube_mcp- MCP entry module:
python -m youtube_mcp.server
Prerequisites (PATH)
Make sure these commands work in your terminal (they must be on PATH):
python --versionpython -m pip --versionpipx --version(only if you use the pipx-based MCP config)
✅ What is PATH?
PATH is the list of folders that your OS searches when you run a command like python or pipx.
- If a command is not on PATH, you'll see errors like:
- Windows:
executable file not found in %PATH% - PowerShell:
... is not recognized as the name of a cmdlet
- Windows:
Quick checks (Windows):
where python
where pipx
$env:Path
On Windows:
- install Python from https://www.python.org/downloads/
- during installation, check "Add Python to PATH"
Install pipx (only if you use the pipx-based MCP config):
python -m pip install --user pipx
python -m pipx ensurepath
Notes:
- After
pipx ensurepath, restart your terminal/IDE sopipxis available onPATH. - Verify with:
pipx --version
✨ Available on PyPI
pip install glonorce-youtube-mcp
# run
youtube_mcp
Screenshots
Features
- 7 MCP tools (1 text-output tool + 6 structured-output tools)
- Safe defaults (public data only; shorts/live excluded unless enabled)
- Quota-aware design (budgeting + expensive strategies as explicit opt-in)
- Tool discovery works in MCP hosts (tools registered with rich docstrings)
- Resilient YouTube Data API client (endpoint allowlist, retries, gzip handling)
Tools
This server exposes 7 tools:
get_yt_video_info(video_id_or_url) -> str- Accepts a raw video id or a full YouTube URL.
- Returns video metadata + transcript (when available).
resolve_youtube_channel(channel_ref, ...) -> dictlist_youtube_channel_videos(channel_ref, ...) -> dict- Paginated.
- Returns
nextPageTokenandnext_page_token(alias).
list_youtube_channel_playlists(channel_ref, ...) -> dict- Paginated.
- Returns
nextPageTokenandnext_page_token(alias).
list_youtube_playlist_videos(playlist_id, ...) -> dict- Paginated.
- Returns
nextPageTokenandnext_page_token(alias).
search_youtube_channel_videos(channel_ref, query, ...) -> dict- Keyword search within a channel (quota-expensive, uses Search API).
- Paginated.
list_youtube_video_comments(video_id, ...) -> dict- Public comment threads for a video (comments may be disabled).
- Paginated.
All tools except get_yt_video_info return structured JSON and are documented with AI-friendly docstrings.
Installation & MCP configuration
PyPI distribution name:
glonorce-youtube-mcpRepo name:
youtube_mcp· import name:youtube_mcp
API key
All inventory/search/comment tools require a YouTube Data API v3 key:
YOUTUBE_API_KEY
Option 1 (recommended for MCP hosts): pipx (no repo clone)
Use this when you want a "zero local project" setup (no clone, no venv management).
{
"mcpServers": {
"youtube_mcp": {
Tools 7
get_yt_video_infoRetrieves video metadata and transcript for a given video ID or URL.resolve_youtube_channelResolves a YouTube channel reference to its details.list_youtube_channel_videosLists videos from a specific YouTube channel with pagination support.list_youtube_channel_playlistsLists playlists belonging to a specific YouTube channel.list_youtube_playlist_videosLists all videos contained within a specific YouTube playlist.search_youtube_channel_videosPerforms a keyword search within a specific YouTube channel.list_youtube_video_commentsRetrieves public comment threads for a specific YouTube video.Environment Variables
YOUTUBE_API_KEYrequiredYouTube Data API v3 key required for inventory, search, and comment tools.