Skip to main content
Glama
youtube-mcp
by iamkw0n


⚠️ Important Notices

IMPORTANT

This projectdoes not use the official YouTube Data API v3. It parses public web pages (ytInitialData). If YouTube changes its page structure, some features may break. Personal, non-commercial use is recommended.

WARNING

Excessive requests may get blocked by YouTube. If that happens often, enable the Zyte proxy with theZYTE_API_KEY environment variable.


Related MCP server: mcp-apps

✨ Features

πŸ” Video search

Keyword search with sort, date, and duration filters

πŸ“Ί Video details

Views, likes, duration, and more by ID or URL

πŸ“‘ Channels

Look up channels by ID, @handle, or URL

πŸ“‹ Playlists

Playlist metadata and video lists

πŸ’¬ Comments

Top and recent comments on a video

πŸ”Œ stdio MCP

Works with Cursor, Claude, Codex, and other local clients

πŸ”‘ No API key

No Google Cloud API key required


πŸš€ Quick Start

git clone https://github.com/iamkw0n/youtube-mcp.git
cd youtube-mcp
npm install
npm run build
npm start

Or run directly with tsx:

npx tsx src/index.ts

πŸ›  Tools

Tool

Description

search_videos

Search videos by keyword

get_video

Get video details by ID or URL

get_videos

Batch-fetch multiple videos

search_channels

Search channels by keyword

get_channel

Get channel info by ID, @handle, or URL

get_channel_videos

List recent videos from a channel

get_playlist

Get playlist metadata

get_playlist_items

List videos in a playlist

get_video_comments

Fetch video comments

api_status

Check scraping and proxy status


πŸ’¬ One-Click Install Prompt

Paste this into Cursor, Claude Code, or Codex to ask the agent to install the MCP server:

Clone iamkw0n/youtube-mcp from GitHub and set up the MCP server for me.

πŸ”§ Client Setup

Client

Config file

stdio

Cursor

.cursor/mcp.json

βœ…

Claude Code

.mcp.json

βœ…

Claude Desktop

claude_desktop_config.json

βœ…

Codex

.codex/config.toml

βœ…

ChatGPT

Connector URL

❌

Cursor

Add to .cursor/mcp.json in your project root:

{
  "mcpServers": {
    "youtube-mcp": {
      "command": "node",
      "args": ["/absolute/path/to/youtube-mcp/dist/index.js"],
      "cwd": "/absolute/path/to/youtube-mcp"
    }
  }
}

With Zyte proxy (optional):

{
  "mcpServers": {
    "youtube-mcp": {
      "command": "node",
      "args": ["/absolute/path/to/youtube-mcp/dist/index.js"],
      "cwd": "/absolute/path/to/youtube-mcp",
      "env": {
        "ZYTE_API_KEY": "${env:ZYTE_API_KEY}"
      }
    }
  }
}

Claude Code

Add to .mcp.json in your project root:

{
  "mcpServers": {
    "youtube-mcp": {
      "type": "stdio",
      "command": "node",
      "args": ["/absolute/path/to/youtube-mcp/dist/index.js"]
    }
  }
}

CLI:

claude mcp add youtube-mcp -s project -- node /absolute/path/to/youtube-mcp/dist/index.js

Claude Desktop

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "youtube-mcp": {
      "command": "node",
      "args": ["/absolute/path/to/youtube-mcp/dist/index.js"],
      "cwd": "/absolute/path/to/youtube-mcp"
    }
  }
}
WARNING

Claude Desktop does not support${workspaceFolder}. Use absolute paths.

OpenAI Codex

In .codex/config.toml or ~/.codex/config.toml:

[mcp_servers.youtube-mcp]
command = "node"
args = ["/absolute/path/to/youtube-mcp/dist/index.js"]
cwd = "/absolute/path/to/youtube-mcp"
enabled = true

CLI:

codex mcp add youtube-mcp -- node /absolute/path/to/youtube-mcp/dist/index.js

Verify in a Codex session with /mcp.

ChatGPT

IMPORTANT

ChatGPT connectors only supportHTTPS MCP endpoints. This repo is a local stdio server and cannot be connected to ChatGPT directly.


πŸ’‘ Examples

Search YouTube for TypeScript tutorial videos
Get details for this video: https://www.youtube.com/watch?v=dQw4w9WgXcQ
Show me the 5 most recent videos from @GoogleDevelopers
What videos are in this playlist? https://www.youtube.com/playlist?list=PL...

βš™οΈ How It Works

flowchart LR
    A[MCP Client] -->|stdio| B[youtube-mcp]
    B -->|fetch HTML| C[www.youtube.com]
    B -->|parse| D[ytInitialData]
    B -->|pagination| E[InnerTube continuation]

Step

Description

Page fetch

Download public YouTube HTML pages

Data extraction

Parse ytInitialData and ytInitialPlayerResponse JSON

Pagination

Load more results via InnerTube continuation tokens


πŸ“„ License

MIT Β© iamkw0n

Available Tools

10 tools
api_statusA

YouTube μŠ€ν¬λž˜ν•‘ μƒνƒœ, μš”μ²­ 횟수, Zyte ν”„λ‘μ‹œ μ‚¬μš© μ—¬λΆ€λ₯Ό ν™•μΈν•©λ‹ˆλ‹€.

Inputs: no named parameters.

get_channelA

채널 ID, @ν•Έλ“€, λ˜λŠ” URL둜 YouTube 채널 정보λ₯Ό μ‘°νšŒν•©λ‹ˆλ‹€.

Inputs: channelIdOrHandleOrUrl (required).

get_channel_videosC

μ±„λ„μ˜ 졜근 λ™μ˜μƒ λͺ©λ‘μ„ μ‘°νšŒν•©λ‹ˆλ‹€.

Inputs: channelIdOrHandleOrUrl (required), maxResults, order, pageToken.

get_playlistB

μž¬μƒλͺ©λ‘ ID λ˜λŠ” URL둜 YouTube μž¬μƒλͺ©λ‘ 정보λ₯Ό μ‘°νšŒν•©λ‹ˆλ‹€.

Inputs: playlistIdOrUrl (required).

get_playlist_itemsB

μž¬μƒλͺ©λ‘μ— ν¬ν•¨λœ λ™μ˜μƒ λͺ©λ‘μ„ μ‘°νšŒν•©λ‹ˆλ‹€.

Inputs: playlistIdOrUrl (required), maxResults, pageToken.

get_videoA

λ™μ˜μƒ ID λ˜λŠ” URL둜 YouTube λ™μ˜μƒ 상세λ₯Ό μ‘°νšŒν•©λ‹ˆλ‹€.

Inputs: videoIdOrUrl (required).

get_video_commentsB

λ™μ˜μƒμ˜ 인기 λŒ“κΈ€ λ˜λŠ” μ΅œμ‹  λŒ“κΈ€μ„ μ‘°νšŒν•©λ‹ˆλ‹€.

Inputs: videoIdOrUrl (required), maxResults, order, pageToken.

get_videosA

μ—¬λŸ¬ λ™μ˜μƒ ID λ˜λŠ” URL둜 YouTube λ™μ˜μƒμ„ 일괄 μ‘°νšŒν•©λ‹ˆλ‹€.

Inputs: videoIdsOrUrls (required).

search_channelsC

ν‚€μ›Œλ“œλ‘œ YouTube 채널을 κ²€μƒ‰ν•©λ‹ˆλ‹€.

Inputs: query (required), maxResults, order, regionCode, +1 more.

search_videosB

ν‚€μ›Œλ“œλ‘œ YouTube λ™μ˜μƒμ„ κ²€μƒ‰ν•©λ‹ˆλ‹€.

Inputs: query (required), maxResults, order, publishedAfter, +4 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 10 tools

    Disambiguation5/5

    Each tool targets a distinct resource or action (status, channel, channel videos, playlist, playlist items, video, video comments, batch videos, search channels, search videos) with no overlaps.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern (get_*, search_*) except api_status which is a single status check. Naming is predictable and uniform.

    Tool Count5/5

    10 tools is perfectly scoped for YouTube data retrieval: covering channels, videos, playlists, comments, search, and status. No unnecessary tools.

    Completeness5/5

    The surface covers all major read operations for YouTube: channel info, channel videos, playlist info, playlist items, video details (single and batch), comments, and search for both channels and videos.

    Related MCP Connectors

    Related MCP Servers