youtube-music-mcp
Allows managing YouTube Music playlists, including listing, creating, updating, deleting playlists, searching songs, and adding/removing songs from playlists.
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-music-mcpWhat playlists do I have?"
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.
youtube-music-mcp
A Python MCP server for managing YouTube Music playlists via Claude. Add and remove songs, create playlists, browse by mood, and ask Claude to suggest music — all through conversation. Changes sync to YouTube Music and show up on your phone, CarPlay, or wherever you listen.
Uses ytmusicapi as its backend, which talks directly to the YouTube Music internal API. This gives music-specific search (no music videos or compilations), mood/genre browsing, related song discovery, and direct access to your Liked Music.
What it does
Exposes 13 tools to Claude:
Tool | Description |
| List all your YouTube Music playlists |
| Get all songs in a playlist |
| Create a new playlist |
| Rename or update a playlist's description |
| Delete a playlist |
| Search for songs — music tracks only, no videos or compilations |
| Add a confirmed song by video ID |
| Remove a song from a playlist |
| Force a full sync from YouTube Music |
| Get your Liked Music directly |
| Browse available mood/genre categories |
| Get curated playlists for a mood category |
| Find songs related to a given track |
All playlist tools accept "liked" as a shorthand for your Liked Music playlist.
Related MCP server: Spotify MCP Server
Prerequisites
Python 3.10+
A Google account with YouTube Music
Setup
git clone https://github.com/dustinbarnes/youtube-music-mcp
cd youtube-music-mcp
pip install -e .Authenticate
Run the one-time OAuth setup:
youtube-music-mcp --setupThis opens your browser to a Google sign-in page. After approving access, a token is saved to ~/.config/youtube-music-mcp/oauth.json and reused automatically. You won't need to do this again unless you revoke access or delete the file.
Never commit
oauth.jsonorcache.dbto version control. Both are in.gitignore.
Claude Desktop
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"youtube-music": {
"command": "/path/to/youtube-music-mcp/.venv/bin/youtube-music-mcp"
}
}
}Or if you installed globally with pip install -e .:
{
"mcpServers": {
"youtube-music": {
"command": "youtube-music-mcp"
}
}
}Claude Code
claude mcp add youtube-music -- youtube-music-mcpOr with a venv:
claude mcp add youtube-music -- /path/to/youtube-music-mcp/.venv/bin/youtube-music-mcpUsage examples
Once connected, talk to Claude naturally:
"What playlists do I have?"
"Search for Phoebe Bridgers Garden Song"
"Add something upbeat and driving to my CarPlay playlist"
"What are the mood categories available?"
"Show me chill playlists"
"What songs are related to Fleetwood Mac - The Chain?"
"Create a new playlist called Road Trip"
"Remove the second song from my Workout playlist"
"Sync my playlists — I made changes on my phone"
Claude uses search_songs to find music-specific results (no music videos or hour-long compilations) and presents them to you before adding anything.
Local data
The server keeps a SQLite cache at ~/.config/youtube-music-mcp/cache.db to reduce API calls. Playlist contents update automatically when you make changes through Claude. Search results are cached for one hour. Use refresh_playlists to pull in changes made from other devices or apps.
Development
pip install -e ".[dev]"
pytest # run tests
pytest -v # verboseContributing
Pull requests welcome. All contributions require review. Please include tests for new behavior and clear commit messages.
License
MIT
This server cannot be installed
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/dustinbarnes/youtube-music-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server