Get the FREE Ultimate OpenClaw Setup Guide →

youtube-music

YouTube Music MCP Server - Search, curate, and manage YouTube Music playlists through Claude AI

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio caullenomdahl-youtube-music-mcp-server node path/to/youtube-music-mcp-server/dist/index.js \
  --env GOOGLE_OAUTH_CLIENT_ID="your-client-id" \
  --env GOOGLE_OAUTH_CLIENT_SECRET="your-client-secret"

How to use

This MCP server provides programmatic access to YouTube Music data and actions, including searching for songs, albums, and artists, managing user playlists, and creating smart playlists through AI-assisted recommendations. It exposes a set of tools for discovery (search_songs, search_albums, search_artists, get_song_info, get_album_info, get_artist_info, get_library_songs), playlist management (get_playlists, get_playlist_details, create_playlist, edit_playlist, delete_playlist, add_songs_to_playlist, remove_songs_from_playlist), and smart playlist workflows (start_smart_playlist, add_seed_artist, add_seed_track, refine_recommendations, get_recommendations, preview_playlist, create_smart_playlist, get_user_taste_profile). You can authenticate via OAuth 2.1 with PKCE, and responses include rich metadata such as artist, album, year, and duration. To use, install dependencies, configure OAuth credentials in the environment, build, and run the MCP server; then call the provided tools through your MCP client or integration layer according to the MCP protocol. Typical usage flows include starting a smart playlist session with seed artists or tracks, refining recommendations, previewing results, and finally creating a smart playlist on YouTube Music.

How to install

Prerequisites:\n- Node.js (recommended LTS) and npm\n- Git (optional, for cloning)\n- Access to YouTube Music API endpoints via the MCP server code (as provided in the repository)\n\nStep-by-step:\n1) Install dependencies:\nbash\nnpm install\n\n2) Create a local environment file or set environment variables for OAuth credentials:\nbash\ncp .env.example .env\n# or manually set (example)\nexport GOOGLE_OAUTH_CLIENT_ID=your-client-id\nexport GOOGLE_OAUTH_CLIENT_SECRET=your-client-secret\n\n3) Build the server (if using TypeScript project structure):\nbash\nnpm run build\n\n4) Run the MCP server:\nbash\nnpm start\n\n5) Configure MCP as described in the repository README to expose the server under an mcpServers entry, using the Node command and the built index file. Ensure the environment variables (OAuth credentials) are available to the process.\n\nNotes:\n- If you modify code, re-run the build step before starting.\n- For local testing without OAuth, refer to BYPASS options in development scripts if provided.\n

Additional notes

Tips and common issues:\n- Ensure GOOGLE_OAUTH_CLIENT_ID and GOOGLE_OAUTH_CLIENT_SECRET are kept secure and not checked into version control.\n- When using Docker deployment (if applicable), mount environment variables securely and map ports (default 8081 from the readme example).\n- The MCP client should reference the exact path to the built index.js in dist. Adjust the path if your build output differs.\n- If API rate limits are an issue, adjust the server's rate limiting configuration as needed and ensure proper OAuth token handling.\n- For production, consider securing tokens at rest and enabling PKCE verification as described in the authentication module.\n

Related MCP Servers

Sponsor this space

Reach thousands of developers