YouTube MCP Server

Production-grade YouTube inventory tools for AI-friendly data extraction.

README.md

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 --version
  • python -m pip --version
  • pipx --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

Quick checks (Windows):

where python
where pipx
$env:Path

On Windows:

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 so pipx is available on PATH.
  • 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:

  1. 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).
  2. resolve_youtube_channel(channel_ref, ...) -> dict

  3. list_youtube_channel_videos(channel_ref, ...) -> dict

    • Paginated.
    • Returns nextPageToken and next_page_token (alias).
  4. list_youtube_channel_playlists(channel_ref, ...) -> dict

    • Paginated.
    • Returns nextPageToken and next_page_token (alias).
  5. list_youtube_playlist_videos(playlist_id, ...) -> dict

    • Paginated.
    • Returns nextPageToken and next_page_token (alias).
  6. search_youtube_channel_videos(channel_ref, query, ...) -> dict

    • Keyword search within a channel (quota-expensive, uses Search API).
    • Paginated.
  7. 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-mcp

Repo 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.

Try it

Get the transcript and metadata for this video: [URL]
List the latest 10 videos from the channel [Channel Name/ID]
Search for videos about 'machine learning' in the [Channel Name] channel
Fetch the comments for the video [Video ID] to summarize user feedback
Get all videos from the playlist [Playlist ID]

Frequently Asked Questions

What are the key features of YouTube MCP?

7 specialized MCP tools for YouTube data retrieval. Quota-aware design with explicit opt-in for expensive operations. Structured JSON output for all inventory and search tools. Resilient API client with automatic retries and gzip handling. Safe-by-default configuration excluding shorts and live streams.

What can I use YouTube MCP for?

Automating the extraction of video transcripts for AI summarization. Building channel-specific search tools for research and content analysis. Managing and auditing video inventory across multiple YouTube channels. Analyzing viewer engagement by fetching and processing video comments.

How do I install YouTube MCP?

Install YouTube MCP by running: pip install glonorce-youtube-mcp

What MCP clients work with YouTube MCP?

YouTube MCP works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep YouTube MCP docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Open Conare