Provides tools for interacting with the YouTube Data API to resolve channel information, list channel videos and playlists, search within channels, and retrieve video metadata, transcripts, and comments.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@YouTube MCPSummarize the transcript for https://www.youtube.com/watch?v=dQw4w9WgXcQ"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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_mcpPython package / import name:
youtube_mcpMCP 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)
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
Quick checks (Windows):
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):
Notes:
After
pipx ensurepath, restart your terminal/IDE sopipxis available onPATH.Verify with:
pipx --version
✨ Available on PyPI
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) -> strAccepts 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, ...) -> dictPaginated.
Returns
nextPageTokenandnext_page_token(alias).
list_youtube_channel_playlists(channel_ref, ...) -> dictPaginated.
Returns
nextPageTokenandnext_page_token(alias).
list_youtube_playlist_videos(playlist_id, ...) -> dictPaginated.
Returns
nextPageTokenandnext_page_token(alias).
search_youtube_channel_videos(channel_ref, query, ...) -> dictKeyword search within a channel (quota-expensive, uses Search API).
Paginated.
list_youtube_video_comments(video_id, ...) -> dictPublic 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).
Option 2: pip into a dedicated venv (no repo clone)
MCP host JSON example (simple):
If your MCP host can't find youtube_mcp on PATH (Windows error like: executable file not found in %PATH%), use an absolute path.
MCP host JSON example (absolute path to venv Python + module):
Option 3: local clone (development)
MCP host JSON example (local clone):
Getting Your YouTube API Key
While not required, you can optionally set up a YouTube Data API key for enhanced functionality. Here's how to get one:
Step 1: Create a Google Cloud Project
Go to the Google Cloud Console
Click "Select a project" at the top of the page
Click "New Project" and give it a name (e.g., "MCP YouTube Extract")
Click "Create"
Step 2: Enable the YouTube Data API
In your new project, go to the API Library
Search for "YouTube Data API v3"
Click on it and then click "Enable"
Step 3: Create API Credentials
Go to the Credentials page
Click "Create Credentials" and select "API Key"
Your new API key will be displayed - copy it immediately
Click "Restrict Key" to secure it (recommended)
Step 4: Restrict Your API Key (Recommended)
In the API key settings, click "Restrict Key"
Under "API restrictions", select "Restrict key"
Choose "YouTube Data API v3" from the dropdown
Click "Save"
Step 5: Set Up Billing (May be required)
Go to the Billing page
Link a billing account to your project
Note: YouTube Data API has a free tier of ~10,000 units per day, which is typically sufficient for most use cases
API Key Usage Limits
Free Tier: ~10,000 units per day (commonly)
Cost: depends on your Google Cloud / billing configuration
Security Best Practices
Never commit your API key to version control
Use environment variables as shown in the MCP configuration section
Restrict your API key to only the YouTube Data API
Monitor usage in the Google Cloud Console
Example MCP calls (JSON payloads)
Exact envelope depends on your MCP client; these show
tool+arguments.
Resolve a channel
List channel videos (safe default)
Quota reference (best-effort)
This section is a best-effort summary and may change over time. Always verify with official documentation.
Last verified: 2026-02-18
Official references:
YouTube Data API quota calculator / costs: https://developers.google.com/youtube/v3/determine_quota_cost
Usage limits: https://developers.google.com/youtube/v3/getting-started#quota
Approximate quota usage by tool
Note: get_yt_video_info returns text (not structured JSON) and is not included in the quota table because its behavior depends on optional extractors.
Tool | Primary endpoints | Typical cost (rough) | Notes |
|
| ~1 | strict mode mostly |
|
| ~ (1 + 1 + 1) per page | uploads-playlist strategy |
|
| ~ (100 + 1) per page | expensive; capped behavior |
|
| ~1 per page | public playlists only |
|
| ~ (1 + 1) per page | public playlist |
|
| ~ (100 + 1) per page | keyword search within a channel |
|
| ~1 per page | comments may be disabled (403) |
Daily quota:
Common free quota: 10,000 units/day
Reset: daily (Google-defined; see official docs/console)
Testing
Use the venv interpreter to avoid accidentally running global pytest.
Troubleshooting
Only get_yt_video_info is visible (other tools missing)
Your MCP host is running an old installed copy from site-packages.
Fix:
Then restart the MCP host.
YOUTUBE_API_KEY placeholder is not expanded in some MCP hosts
Some MCP hosts do not interpolate placeholders like ${YOUTUBE_API_KEY} inside mcp.json.
❌ Not recommended (may be taken literally):
✅ Recommended (explicit value in config):
✅ Also works (set it in the host process environment, then reference nothing in JSON):
set
YOUTUBE_API_KEYin the MCP host environment (OS/IDE)then keep
mcp.jsonwithout placeholders
License
MIT — see LICENSE
Acknowledgements
This project was originally derived from / inspired by https://github.com/sinjab/mcp_youtube_extract. The codebase has since been heavily rewritten and extended.