youtube-music-mcp
An MCP server for managing YouTube Music playlists via Claude. Add and remove songs, create playlists, and ask Claude to suggest music — all through conversation.
README
youtube-music-mcp
An MCP server for managing YouTube Music playlists via Claude. Add and remove songs, create playlists, 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.
What it does
Exposes 9 tools to Claude:
| Tool | Description |
|---|---|
list_playlists |
List all your YouTube Music playlists |
get_playlist_items |
Get all songs in a playlist |
create_playlist |
Create a new playlist |
update_playlist |
Rename or update a playlist's description |
delete_playlist |
Delete a playlist |
search_songs |
Search YouTube for songs — returns up to 5 results to confirm before adding |
add_song_to_playlist |
Add a confirmed song by video ID |
remove_song_from_playlist |
Remove a song from a playlist |
refresh_playlists |
Force a full sync from YouTube (useful after changes made on another device) |
All playlist operations accept "liked" as a shorthand for your Liked Music playlist.
Prerequisites
- Node.js 20+
- A Google Cloud project with the YouTube Data API v3 enabled
- OAuth 2.0 credentials (Desktop app type)
Setting up Google credentials
- Go to the Google Cloud Console
- Create a new project (or select an existing one)
- Enable the YouTube Data API v3 under APIs & Services > Library
- Go to APIs & Services > Credentials and click Create Credentials > OAuth client ID
- Choose Desktop app as the application type
- Note the Client ID and Client Secret
Setup
git clone https://github.com/dustinbarnes/youtube-music-mcp
cd youtube-music-mcp
npm install
npm run build
Claude Desktop
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"youtube-music": {
"command": "node",
"args": ["/path/to/youtube-music-mcp/dist/main.js"],
"env": {
"GOOGLE_CLIENT_ID": "your-client-id",
"GOOGLE_CLIENT_SECRET": "your-client-secret"
}
}
}
}
Claude Code
claude mcp add youtube-music \
--env GOOGLE_CLIENT_ID=your-client-id \
--env GOOGLE_CLIENT_SECRET=your-client-secret \
-- node /path/to/youtube-music-mcp/dist/main.js
First run
The first time the server starts, it will open your browser to complete Google sign-in. After you approve access, tokens are saved to ~/.config/youtube-music-mcp/credentials.json and reused automatically.
Never commit
credentials.jsonorcache.dbto version control. Both are in.gitignorebut worth knowing about.
Usage examples
Once connected, talk to Claude naturally:
- "What playlists do I have?"
- "Add something chill and acoustic to my Evening playlist"
- "Search for Phoebe Bridgers Garden Song"
- "Create a new playlist called Road Trip and make it private"
- "Remove the second song from my Workout playlist"
- "Sync my playlists — I added some songs on my phone"
Claude uses search_songs to find candidates and presents them to you before adding anything. You confirm the right version before it goes into the playlist.
Local data
The server keeps a SQLite cache at ~/.config/youtube-music-mcp/cache.db to reduce YouTube API quota usage (default: 10,000 units/day). 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
npm test # run unit tests
npm run typecheck # type check without building
npm run build # compile to dist/
Contributing
Pull requests welcome. All contributions require review. Please include tests for new behavior and clear commit messages.
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.