Get the FREE Ultimate OpenClaw Setup Guide →

youtube-music

This is a MCP (Model Context Protocol) server that you can use with Cline through Visual Studio Code and ask songs to be played using Youtube Music

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio mondweep-youtube-music-mcp-server node build/index.js

How to use

This MCP server lets AI models control YouTube Music playback through Google Chrome by exposing tools that search for songs by name or artist and play them in the browser. The server follows the MCP pattern, enabling discovery of available tools, understanding their capabilities, and invoking actions to perform searches and playback. Use the MCP workflow to fetch results, handle errors, and receive structured responses that include relevant metadata for each song and any embedded resources needed for summarization or context generation.

When integrating, first discover the available tools exposed by the YouTube Music MCP server. You can then call the search capability with a song title and/or artist to retrieve matching tracks. Once you identify the desired track, you can issue a play command to start playback in Google Chrome. The server is designed to handle common edge cases such as missing results or playback permissions and will provide error messages that your client can propagate to the user. The setup is cross-platform with an emphasis on macOS Chrome automation, but the underlying MCP protocol supports other environments as well.

How to install

Prerequisites:

  • Node.js and npm installed on your machine
  • Git (optional for cloning the repository)

Installation steps:

  1. Clone the repository (or download the source): git clone https://github.com/your-org/youtube-music-mcp-server.git cd youtube-music-mcp-server

  2. Install dependencies: npm install

  3. Build the server (TypeScript to JavaScript): npm run build

  4. Run the server (for development): npm run start

  5. Optional development with auto-rebuild: npm run watch

  6. If you plan to integrate with Claude Desktop, configure the MCP server entry as shown in the README: On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json On Windows: %APPDATA%/Claude/claude_desktop_config.json

    Example config snippet: { "mcpServers": { "youtube-music-server": { "command": "/path/to/youtube-music-server/build/index.js" } } }

Additional notes

Tips and common issues:

  • Debugging MCP servers is easiest with the MCP Inspector tool. Run npm run inspector to launch the inspector and obtain a debugging URL.
  • The server communicates over stdio; ensure your hosting environment supports standard input/output streams.
  • If Chrome automation fails due to permission or automation settings, verify Chrome’s automation permissions and consider running the server with appropriate user privileges.
  • Environment variables can be added to configure discovery, logging, or Chrome automation behavior if your deployment requires them.
  • The npm_package field indicates the npm package name for this Node.js server (used for package-based deployments and discovery).

Related MCP Servers

Sponsor this space

Reach thousands of developers