YouTube Music MCP Server
Integrates with MusicBrainz to provide enriched music metadata and identification for songs and albums.
Allows AI assistants to search songs, albums, artists, manage playlists (create, edit, delete, add/remove songs), and create smart AI-driven playlists using YouTube Music.
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 MCP Servercreate a chill playlist with Radiohead and Boards of Canada"
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 Server
Full-featured MCP server for YouTube Music — search, manage playlists, and create smart recommendations through AI assistants.
Highlights
Complete Playlist Control — Create, edit, delete playlists with batch operations
Smart Recommendations — AI-driven playlist creation using ListenBrainz (unbiased, no payola)
Rich Metadata — Every response includes artist, album, year, and duration
Secure Auth — OAuth 2.1 + PKCE with encrypted token storage
Rate Limited — Configurable limits to respect API quotas
Quick Start
npm install
cp .env.example .env
# Add your Google OAuth credentials to .env
npm run build
npm startMCP Configuration
{
"mcpServers": {
"youtube-music": {
"command": "node",
"args": ["path/to/youtube-music-mcp-server/dist/index.js"],
"env": {
"GOOGLE_OAUTH_CLIENT_ID": "your-client-id",
"GOOGLE_OAUTH_CLIENT_SECRET": "your-client-secret"
}
}
}
}Tools
Search & Discovery
Tool | Description |
| Search songs with configurable limits |
| Search albums |
| Search artists |
| Detailed song information |
| Album with all tracks |
| Artist with top songs |
| User's liked music (filters non-music) |
Playlist Management
Tool | Description |
| List user's playlists |
| Playlist with all tracks |
| Create new playlist |
| Update metadata |
| Delete playlist |
| Batch add songs |
| Batch remove songs |
Smart Playlists
Tool | Description |
| Begin creation session |
| Add artist influence |
| Add track as seed |
| Set preferences (exclude, tags, diversity) |
| Generate recommendations |
| Preview before creating |
| Create on YouTube Music |
| Analyze listening habits |
Response Format
All tools return structured JSON with metadata:
{
"songs": [{
"videoId": "abc123",
"title": "Song Title",
"artists": [{"id": "...", "name": "Artist"}],
"album": {"id": "...", "name": "Album", "year": 2023},
"duration": "3:45",
"durationSeconds": 225
}],
"metadata": {
"returned": 20,
"hasMore": true
}
}Example Workflows
"Make me a playlist based on Radiohead and Boards of Canada"
→ start_smart_playlist()
→ add_seed_artist("Radiohead")
→ add_seed_artist("Boards of Canada")
→ get_recommendations()
→ create_smart_playlist("Late Night Electronica")"Add these songs to my workout playlist"
→ search_songs("high energy workout")
→ add_songs_to_playlist(playlistId, [videoId1, videoId2, ...])Architecture
src/
├── index.ts # Entry point
├── server.ts # MCP server setup
├── youtube-music/ # Custom YTM client
│ ├── client.ts # API methods
│ └── parsers.ts # Response parsing
├── musicbrainz/ # MusicBrainz integration
├── listenbrainz/ # ListenBrainz recommendations
├── recommendations/ # Smart playlist engine
├── auth/ # OAuth 2.1 + PKCE
└── tools/ # MCP tool definitionsDocker
docker build -t youtube-music-mcp .
docker run -p 8081:8081 \
-e GOOGLE_OAUTH_CLIENT_ID="..." \
-e GOOGLE_OAUTH_CLIENT_SECRET="..." \
youtube-music-mcpDevelopment
npm run dev # Development mode
BYPASS_AUTH_FOR_TESTING=true npm run dev # Skip OAuth for testingLinks
ListenBrainz — Open music recommendations
MusicBrainz — Open music database
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
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/CaullenOmdahl/youtube-music-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server