youtube-mcp
Scrapes YouTube video search results, video details, channel info, playlists, 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-mcpsearch 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
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/iamkw0n/youtube-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server