youtube-mcp
Scrapes YouTube video search results, video details, channel info, playlists, and comments.
Click on "Deploy 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-mcp search for latest music videos"
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.
β οΈ Important Notices
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.
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 startOr run directly with tsx:
npx tsx src/index.tsπ Tools
Tool | Description |
| Search videos by keyword |
| Get video details by ID or URL |
| Batch-fetch multiple videos |
| Search channels by keyword |
| Get channel info by ID, @handle, or URL |
| List recent videos from a channel |
| Get playlist metadata |
| List videos in a playlist |
| Fetch video comments |
| 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 |
| β |
Claude Code |
| β |
Claude Desktop |
| β |
Codex |
| β |
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.jsClaude 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"
}
}
}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 = trueCLI:
codex mcp add youtube-mcp -- node /absolute/path/to/youtube-mcp/dist/index.jsVerify in a Codex session with /mcp.
ChatGPT
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 videosGet details for this video: https://www.youtube.com/watch?v=dQw4w9WgXcQShow me the 5 most recent videos from @GoogleDevelopersWhat 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 |
Pagination | Load more results via InnerTube continuation tokens |
π License
MIT Β© iamkw0n
Available Tools
10 toolsapi_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
Scored across 10 tools
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.
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.
10 tools is perfectly scoped for YouTube data retrieval: covering channels, videos, playlists, comments, search, and status. No unnecessary tools.
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
YouTube transcripts, search, channel browsing, and playlists for AI agents via MCP.
YouTube MCP β wraps the YouTube Data API v3 (BYO API key)
Real-time YouTube transcripts, comments, channels & video search MCP. Local npx or hosted OAuth.
YouTube transcripts, comments, video details, heatmaps, search, channels and playlists.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables YouTube content browsing, video searching, and metadata retrieval via the YouTube Data API v3. It also facilitates fetching video transcripts for summarization and analysis within MCP-compatible AI clients.726 npm1MIT
- AlicenseNot gradedqualityDmaintenanceEnables interacting with YouTube Data API v3 through MCP tools (get-video, get-channel, get-latest-video) and bundled UI apps for video and channel profiles.7 npm4MIT
- AlicenseAqualityDmaintenanceEnables YouTube video search and audio download via web scraping, requiring no API key.1MIT
- FlicenseAqualityDmaintenanceEnables interaction with YouTube's Data API through MCP, providing tools for channel info, videos, playlists, captions, subscriptions, and more.14-