YouTube Music MCP
Provides tools for managing YouTube Music playlists, including searching music, listing playlists, getting playlist items, creating, editing, and deleting playlists, and adding or removing songs.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
YouTube Music MCP — Cloudflare Worker (free)
A purpose-built remote MCP server that runs on a genuinely free Cloudflare
Worker (no card required) using Cloudflare's official OAuth-for-MCP pattern
(@cloudflare/workers-oauth-provider + agents' McpAgent, both backed by
a free-tier SQLite Durable Object + a free KV namespace).
It exposes 8 tools to Claude: search_youtube_music, list_playlists,
get_playlist_items, create_playlist, edit_playlist, delete_playlist,
add_song_to_playlist, remove_song_from_playlist.
This is a from-scratch, YouTube Data API v3-only implementation — it does not include the original repo's Spotify-based recommendations or Postgres- backed adaptive playlist history, since those need paid infrastructure.
Prerequisites
Node.js installed locally (or use
npxwithout a global install)A GitHub account (to hold this code)
Your Cloudflare account
Related MCP server: YouTube Music MCP Server
Setup
Get the code into your own GitHub repo. Done — this repo is it.
Install dependencies (from your machine, in the repo folder):
npm install ``` Then run `npm run type-check` before deploying. Also run `npx wrangler types` once — it regenerates the `Env` type from your actual `wrangler.jsonc` bindings/secrets, which is more reliable than the hand-written `src/env.d.ts` I included as a placeholder (safe to delete `src/env.d.ts` once you've done this). 3. **Create the KV namespace:** ``` npx wrangler kv namespace create OAUTH_KV ``` This prints an `id`. Paste it into `wrangler.jsonc` in place of the placeholder. 4. **Set secrets** (these prompt you interactively — nothing typed into chat): ``` npx wrangler secret put GOOGLE_CLIENT_ID npx wrangler secret put GOOGLE_CLIENT_SECRET npx wrangler secret put COOKIE_ENCRYPTION_KEY ``` For `COOKIE_ENCRYPTION_KEY`, generate a random value first, e.g. `openssl rand -hex 32`. 5. **Google Cloud Console — OAuth client:** - Application type: **Web application** - Authorized redirect URI: `https://<your-worker-name>.<your-subdomain>.workers.dev/callback` 6. **Deploy:** ``` npx wrangler deploy ``` This gives you your live URL, e.g. `https://youtube-music-mcp.<your-subdomain>.workers.dev`. 7. Go back to Google Cloud Console and add the exact redirect URI from step 6 (`.../callback`) to the OAuth client's Authorized redirect URIs. 8. **Connect it to Claude:** the MCP endpoint is `https://<your-worker>.<your-subdomain>.workers.dev/mcp`. ## Local development (optional) ``` npx wrangler dev ``` Runs at `http://localhost:8788`. ## Why no Spotify / Postgres requirement Those were hard requirements in the original repo purely due to how its startup validation was written, not because they're needed for core playlist management. This version only needs Google credentials.
This server cannot be deployed
Maintenance
Related MCP Connectors
YouTube discovery, transcripts, library search, and monitors with API keys or OAuth.
Real-time YouTube transcripts, comments, channels & video search MCP. Local npx or hosted OAuth.
YouTube transcripts, comments, video details, heatmaps, search, channels and playlists.
Search videos; read channels, playlists, comments and popular videos in YouTube.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables users to search the YouTube Music catalog and manage playlists using natural language. It provides tools for searching songs, albums, and artists, as well as performing playlist operations like creating, adding, and deleting tracks.-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to search for music and create/manage playlists on YouTube Music via OAuth 2.0 authentication.1MIT
- FlicenseNot gradedqualityCmaintenanceEnables searching YouTube Music and managing playlists: create/delete playlists, add/remove/reorder tracks, and more via natural language.-
- AlicenseBqualityBmaintenanceEnables AI assistants to search YouTube Music, manage playlists, and retrieve listening history using the ytmusicapi library.6MIT