MCPSERV.CLUB
MCP-Mirror

YouTube Music MCP Server

MCP Server

Control YouTube Music via AI with Model Context Protocol

Stale(50)
14stars
1views
Updated 24 days ago

About

This TypeScript-based MCP server lets AI assistants search and play songs on YouTube Music through Google Chrome. It offers song and artist queries, playback control, error handling, and cross‑platform support.

Capabilities

Resources
Access data sources
Tools
Execute functions
Prompts
Pre-built templates
Sampling
AI model interactions

YouTube Music MCP Server in Action

The YouTube Music MCP Server bridges the gap between conversational AI assistants and music playback on YouTube Music. By exposing a set of well‑defined tools over the Model Context Protocol, it allows an AI model to search for tracks by song or artist name and control playback directly within Google Chrome. This capability turns a passive music streaming service into an interactive, AI‑driven experience that can be seamlessly integrated into larger workflows.

At its core, the server implements a small but powerful toolkit: a search tool that queries YouTube Music’s web interface, and a play tool that instructs Chrome to navigate to the resulting track page. When an AI assistant receives a request such as “Play Bohemian Rhapsody by Queen,” it can invoke these tools in sequence—first searching for the song, then commanding Chrome to start playback. The server handles all error conditions (e.g., no results found, network failures) and logs actions for debugging purposes. This structured interaction eliminates the need for custom scripting or manual browser manipulation, providing a repeatable, auditable interface.

Developers benefit from the server’s cross‑platform design and its focus on macOS for Chrome automation, which is a common environment for AI tools. The MCP server’s resources are lightweight: each search result can be represented as a URI that the AI can reference later, enabling chaining of actions or building higher‑level workflows (e.g., “Create a playlist from the top five search results”). The clear separation between tools, resources, and prompts follows MCP best practices, making it straightforward to extend or replace components without breaking existing integrations.

Real‑world use cases include building a smart home assistant that can play requested music on demand, creating automated podcast or radio stations that curate playlists based on user preferences, or integrating music playback into a larger content‑creation pipeline where an AI drafts scripts and simultaneously plays reference tracks. Because the server operates over standard input/output, it can be launched by any MCP‑compliant client—Claude Desktop, other LLM interfaces, or custom orchestration scripts—providing maximum flexibility.

Unique advantages of this MCP server lie in its simplicity and focus. By leveraging Chrome’s existing UI, it avoids the complexities of YouTube’s official APIs while still delivering reliable playback control. The server’s robust error handling and logging make it suitable for production deployments, while its TypeScript implementation ensures type safety and ease of contribution. In summary, the YouTube Music MCP Server turns a conventional web music service into an AI‑controlled toolset, enabling developers to craft rich, multimodal experiences that blend natural language interaction with real‑time media playback.