YtMCP MCP Server

$pip install -e .
README.md

Comprehensive read-only access to YouTube data for LLM applications

YtMCP - YouTube Model Context Protocol Server

YtMCP is a production-grade Model Context Protocol (MCP) server providing comprehensive, read-only access to YouTube data through 16 specialized tools. Designed for both local development (STDIO) and cloud deployment (HTTPS on Render), it combines multiple battle-tested libraries to deliver robust YouTube intelligence for LLM applications.


šŸ“‹ Table of Contents


✨ Features

šŸ” **Category A: Core Discovery (5 Tools)**

  • search_videos - Basic keyword search with customizable limits
  • search_filtered - Advanced search with filters (upload date, duration, sort)
  • get_trending_videos - Fetch current trending videos
  • find_channels - Search for channels by name or topic
  • find_playlists - Discover playlists by keyword

šŸŽ„ **Category B: Video Intelligence (5 Tools)**

  • get_transcript - Extract time-synced transcripts/subtitles (CRITICAL for content analysis)
  • get_video_metadata - Comprehensive video data (views, tags, description, likes, duration)
  • get_video_chapters - Extract video chapters/key moments
  • get_thumbnail - High-resolution thumbnail URLs (all qualities)
  • get_comments - Fetch top comments (rate-limited for safety)

šŸ“Š **Category C: Channel & Playlist Forensics (5 Tools)**

  • get_channel_videos - List channel videos with sorting (newest, oldest, popular)
  • get_channel_shorts - List YouTube Shorts from a channel
  • get_channel_streams - List live streams (past and present)
  • get_playlist_items - Flatten playlist contents
  • get_channel_about - Channel description and statistics

šŸ› ļø **Category D: Utilities (1 Tool)**

  • get_audio_stream_url - Get direct audio stream URLs

šŸš€ Quick Start

Local Development (STDIO)

Prerequisites:

Installation:

# Clone the repository
git clone https://github.com/utkarshchaudhary009/ytmcp.git
cd ytmcp

# Install with UV (recommended)
uv sync

# OR install with pip
pip install -e .

Run the server:

# Using UV
uv run ytmcp

# OR using pip
ytmcp

The server will start in STDIO mode, ready to accept MCP client connections.


Production Deployment (Render)

One-Click Deploy:

Manual Deployment:

  1. Fork this repository

  2. Create a new Web Service on Render:

    • Go to Render Dashboard
    • Click "New +" → "Web Service"
    • Connect your GitHub repository
  3. Configure the service:

    Name: ytmcp
    Environment: Python 3
    Build Command: pip install -e .
    Start Command: ytmcp --transport streamable-http --host 0.0.0.0 --port $PORT
    
  4. Set environment variables (optional):

    FASTMCP_LOG_LEVEL=INFO
    
  5. Deploy - Render will automatically deploy your MCP server with HTTPS

Your server will be available at: https://ytmcp-<random>.onrender.com


šŸ—ļø Architecture

ytmcp/
ā”œā”€ā”€ src/
│   └── ytmcp/
│       ā”œā”€ā”€ __init__.py
│       ā”œā”€ā”€ server.py              # Main FastMCP server with health check
│       ā”œā”€ā”€ middleware/
│       │   ā”œā”€ā”€ __init__.py
│       │   └── rate_limiter.py    # Global rate limiting (0.75s delay)
│       └── tools/
│           ā”œā”€ā”€ __init__.py
│           ā”œā”€ā”€ search.py          # Category A: Search tools
│           ā”œā”€ā”€ video.py           # Category B: Video intelligence
│           ā”œā”€ā”€ channel.py         # Category C: Channel forensics
│           └── utils.py           # Category D: Utilities
ā”œā”€ā”€ examples/                      # MCP client configurations
ā”œā”€ā”€ research/                      # Library research & feasibility docs
ā”œā”€ā”€ render.yaml                    # Render deployment config
ā”œā”€ā”€ Procfile

Tools (7)

search_videosBasic keyword search with customizable limits
search_filteredAdvanced search with filters like upload date, duration, and sort order
get_transcriptExtract time-synced transcripts and subtitles for content analysis
get_video_metadataComprehensive video data including views, tags, description, and likes
get_video_chaptersExtract video chapters and key moments
get_channel_videosList channel videos with sorting options (newest, oldest, popular)
get_audio_stream_urlGet direct audio stream URLs

Environment Variables

FASTMCP_LOG_LEVELLogging level for the server (e.g., INFO, DEBUG)

Configuration

claude_desktop_config.json
{"mcpServers": {"ytmcp": {"command": "uv", "args": ["--directory", "/path/to/ytmcp", "run", "ytmcp"]}}}

Try it

→Search for the latest trending videos on YouTube about artificial intelligence.
→Get the full transcript for the video with ID 'dQw4w9WgXcQ' so I can summarize it.
→Find the most popular videos from the 'MKBHD' channel and list their view counts.
→Extract the chapters and key moments from this YouTube video to create a table of contents.
→Get the direct audio stream URL for this video to process the sound.

Frequently Asked Questions

What are the key features of YtMCP?

16 specialized tools for YouTube data retrieval and forensics. Time-synced transcript extraction for deep content analysis. Support for both local STDIO and cloud HTTPS (Render) deployments. Advanced filtering for video searches including duration and upload date. Global rate limiting (0.75s delay) for stable API interaction.

What can I use YtMCP for?

Summarizing long-form YouTube videos using extracted transcripts. Performing competitive channel analysis by fetching video metadata and stats. Automating the creation of video chapters and key moment summaries. Building research datasets from YouTube search results and comments. Extracting audio streams for external voice-to-text or processing pipelines.

How do I install YtMCP?

Install YtMCP by running: pip install -e .

What MCP clients work with YtMCP?

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

Use YtMCP with Conare

Manage MCP servers visually, upload persistent context, and never start from zero with Claude Code & Codex.

Try Free