Navigation
YouTube Music MCP Server: Stream/Control & Playlist Craft - MCP Implementation

YouTube Music MCP Server: Stream/Control & Playlist Craft

Stream and control YouTube Music directly from VS Code via Cline/MCP—craft playlists, request tracks, and boost workflow. Developer-approved, music made seamless.

Entertainment And Media
4.5(143 reviews)
214 saves
100 comments

Users create an average of 37 projects per month with this tool

About YouTube Music MCP Server

What is YouTube Music MCP Server: Stream/Control & Playlist Craft?

This server acts as a bridge between AI models and YouTube Music playback via Google Chrome, enabling seamless interaction through the Model Context Protocol (MCP). It empowers AI systems to search for tracks by name or artist, initiate playback, and manage playlists while handling errors gracefully. The server abstracts complex browser automation into standardized MCP-compliant endpoints, offering programmatic control over music streaming workflows.

How to Use YouTube Music MCP Server: Stream/Control & Playlist Craft?

Developers initiate the server via npm scripts for building and debugging, then configure it within AI platforms like Claude Desktop by specifying the server path in JSON config files. The MCP Inspector tool aids in troubleshooting stdio communication through browser-based debugging interfaces. Operational workflows involve crafting MCP-compliant requests to search for tracks, trigger playback actions, and monitor response payloads for error handling.

YouTube Music MCP Server Features

Key Features of YouTube Music MCP Server: Stream/Control & Playlist Craft?

  • Granular control over YouTube Music via standardized MCP API endpoints
  • Platform-optimized automation focused on macOS Chrome environments
  • Structured error handling with detailed logging capabilities
  • Bi-directional metadata handling for track searches and playback states
  • Extensible architecture supporting future tool enhancements

Use Cases of YouTube Music MCP Server: Stream/Control & Playlist Craft?

YouTube Music MCP Server FAQ

FAQ for YouTube Music MCP Server: Stream/Control & Playlist Craft?

Q: What browsers are supported?
A: Primarily designed for macOS Chrome, with cross-platform compatibility in development roadmap.

Q: How is authentication handled?
A: Leverages existing browser sessions, requiring no additional credentials beyond standard YouTube Music access.

Q: Can this be used in production environments?
A: Yes, but requires proper error handling implementations and rate limiting strategies to avoid API abuse.

Q: Where can I find detailed API specs?
A: Documentation is auto-generated from OpenAPI definitions available in the project repository.

Content

YouTube Music MCP Server

Overview

This project implements a Model Context Protocol (MCP) server that enables AI models to control YouTube Music playback through Google Chrome. It bridges the gap between AI assistants and music playback, allowing AI to search for and play songs based on song names and artist names.

What is MCP?

The Model Context Protocol (MCP) is a standardized way for AI models to interact with external tools and services. It provides a structured communication protocol that allows AI assistants to:

  • Discover available tools
  • Understand tool capabilities
  • Execute actions through these tools
  • Handle responses and errors consistently

Learn more about MCP:

Features

  • Search YouTube Music for songs
  • Play songs directly in Google Chrome
  • Support for song name and artist name search
  • Error handling and logging
  • Cross-platform support (focused on macOS for Chrome automation)

Architecture

High-Level Overview

youtube-music-server MCP Server

A Model Context Protocol server

This is a TypeScript-based MCP server that implements a simple notes system. It demonstrates core MCP concepts by providing:

  • Resources representing text notes with URIs and metadata
  • Tools for creating new notes
  • Prompts for generating summaries of notes

Features

Resources

  • List and access notes via note:// URIs
  • Each note has a title, content and metadata
  • Plain text mime type for simple content access

Tools

  • create_note - Create new text notes
    • Takes title and content as required parameters
    • Stores note in server state

Prompts

  • summarize_notes - Generate a summary of all stored notes
    • Includes all note contents as embedded resources
    • Returns structured prompt for LLM summarization

Development

Install dependencies:

npm install

Build the server:

npm run build

For development with auto-rebuild:

npm run watch

Installation

To use with Claude Desktop, add the server config:

On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json On Windows: %APPDATA%/Claude/claude_desktop_config.json

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

Debugging

Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:

npm run inspector

The Inspector will provide a URL to access debugging tools in your browser.

Related MCP Servers & Clients