YouTube MCP Server
YouTube MCP Server — Setup Guide
A Python MCP server that lets Claude search YouTube for artists and manage playlists on your account.
Prerequisites
Python 3.11 or newer
A Google account with YouTube
Step 1 — Get Google API credentials
Go to console.cloud.google.com
Create a new project (or select an existing one)
Navigate to APIs & Services → Library
Search for YouTube Data API v3 and click Enable
Go to APIs & Services → Credentials
Click + Create Credentials → OAuth client ID
Application type: Desktop app → give it a name → click Create
Click Download JSON — save the file as
client_secret.jsonin this folder
Step 2 — Install dependencies
Open a terminal in this folder and run:
pip install -r requirements.txtStep 3 — Configure Claude Desktop
Open your Claude Desktop config file:
Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Add the following entry inside the "mcpServers" object (create the object if it doesn't exist):
{
"mcpServers": {
"youtube-playlist-manager": {
"command": "python",
"args": ["/FULL/PATH/TO/THIS/FOLDER/server.py"]
}
}
}Replace /FULL/PATH/TO/THIS/FOLDER/ with the actual path where you saved these files.
Example on Mac:
{
"mcpServers": {
"youtube-playlist-manager": {
"command": "python3",
"args": ["/Users/yourname/youtube_mcp/server.py"]
}
}
}Step 4 — First run (OAuth flow)
Restart Claude Desktop after saving the config
The first time you use a YouTube tool, a browser window will open asking you to sign in with Google and grant access
After approval, a
token.jsonfile is saved locally — you won't need to log in again
Available Tools
Tool | Description |
| Search for artist/musician channels by name + optional genre |
| Search for music videos, optionally within a specific channel |
| Create a new playlist on your YouTube account |
| Add videos (by ID) to an existing playlist |
| List all your YouTube playlists |
Example prompts to try in Claude
"Search for jazz guitar artists on YouTube and create a playlist of their top videos"
"Find lo-fi hip hop channels and make a private playlist called 'Focus Music'"
"Search for videos by artist name 'Khruangbin' and add them to my existing playlist"
"List all my YouTube playlists"
Files in this folder
youtube_mcp/
├── server.py ← The MCP server (main file)
├── requirements.txt ← Python dependencies
├── client_secret.json ← YOU ADD THIS (downloaded from Google Cloud)
├── token.json ← Auto-created after first login
└── README.md ← This fileTroubleshooting
"client_secret.json not found" → Make sure you downloaded and renamed the file correctly and placed it in the same folder as server.py.
"Access blocked" in browser → Your OAuth app may be in "testing" mode. Go to Google Cloud Console → OAuth consent screen → Add your Google account as a test user.
Tool not appearing in Claude → Double-check the path in claude_desktop_config.json and restart Claude Desktop fully.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/arturochent/youtube-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server