YouTube Music MCP
This server allows you to interact with YouTube Music directly from your AI assistant. You can:
Search for tracks on YouTube Music by name
Play tracks by opening the top search result in your default browser
Enables searching for and playing tracks on YouTube Music directly through the AI assistant, with tools for searching tracks by name and automatically opening them in the default browser.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@YouTube Music MCPplay 'Blinding Lights' by The Weeknd"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
YouTube Music MCP 🎵
This is a simple MCP server that allows you to search for and play tracks on YouTube Music directly from your AI assistant like Cursor or Claude Desktop.
Built with:
Available Tools
searchTrack: Search for tracks on YouTube Music by name.playTrack: Play tracks directly by searching and opening them in your default browser.
Installation
Related MCP server: MCP Spotify Server
1. Get a key
To make this work you need a valid Google Youtube API Key
2. Add to cursor
Add the following MCP configuration to your Cursor .cursor/mcp.json settings:
{
"mcpServers": {
"youtube-music-mcp": {
"command": "npx",
"args": ["-y", "@instructa/mcp-youtube-music"],
"env": {
"YOUTUBE_API_KEY": "<INSERT_API_KEY_HERE>"
}
}
}
}Develop
This MCP is typically run directly using npx and doesn't require local installation or building unless you intend to modify the source code. If you want to develop it locally, you would typically clone the source repository (if available) and follow its specific contribution guidelines.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Links
X/Twitter: @kregenrek
Bluesky: @kevinkern.dev
Courses
Learn Cursor AI: Ultimate Cursor Course
Learn to build software with AI: instructa.ai
See my other projects:
AI Prompts - Curated AI Prompts for Cursor AI, Cline, Windsurf and Github Copilot
codefetch - Turn code into Markdown for LLMs with one simple terminal command
aidex A CLI tool that provides detailed information about AI language models, helping developers choose the right model for their needs.
codetie - XCode CLI
Available Tools
2 toolsplayTrackA
Search for a track on YouTube Music and open the top result in the default browser.
| Name | Required | Description | Default |
|---|---|---|---|
| trackName | Yes | The name of the track to search for and play |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It discloses that the tool opens the top result in the default browser, which is useful behavioral context, but does not mention potential side effects like browser pop-ups, authentication needs, or rate limits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that front-loads the core action without any wasted words, making it easy to understand quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (searching and opening in browser) with no annotations or output schema, the description is reasonably complete but lacks details on error handling, what happens if no results are found, or the format of any potential output.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents the 'trackName' parameter. The description adds no additional meaning beyond implying the parameter is used for searching, which aligns with the schema's description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('search for a track on YouTube Music and open the top result in the default browser') with the resource ('track'), distinguishing it from the sibling tool 'searchTrack' which presumably only searches without opening.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for playing tracks via YouTube Music, but does not explicitly state when to use this tool versus 'searchTrack' or other alternatives, nor does it provide exclusions or prerequisites.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
searchTrackC
Search for tracks on YouTube Music by name.
| Name | Required | Description | Default |
|---|---|---|---|
| trackName | Yes | The name of the track to search for |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It states the tool searches, implying a read-only operation, but does not disclose behavioral traits like rate limits, authentication needs, result format, pagination, or error handling. For a search tool with zero annotation coverage, this is a significant gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with zero waste. It is appropriately sized and front-loaded, directly stating the tool's purpose without unnecessary details.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of annotations and output schema, the description is incomplete. It does not explain what the search returns (e.g., list of tracks, metadata), how results are structured, or any limitations. For a search tool, this leaves critical context gaps for an AI agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100%, with the parameter 'trackName' fully documented in the schema. The description adds no additional meaning beyond what the schema provides, such as search syntax or examples. Baseline 3 is appropriate when the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Search for tracks on YouTube Music by name.' It specifies the verb ('search'), resource ('tracks'), and platform ('YouTube Music'), but does not explicitly differentiate from its sibling tool 'playTrack'. This makes it clear but not fully sibling-aware.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It does not mention the sibling tool 'playTrack' or any other search methods, nor does it specify prerequisites or exclusions. This leaves usage context entirely implicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
The two tools have overlapping purposes that could cause confusion. Both 'playTrack' and 'searchTrack' involve searching for tracks on YouTube Music, with 'playTrack' additionally opening the top result in a browser. An agent might misselect between them when the intent is ambiguous, such as wanting to search without playing or vice versa, as the descriptions don't clearly delineate distinct use cases.
The tool names follow a consistent pattern throughout. Both use camelCase with a verb-noun structure ('playTrack' and 'searchTrack'), making them predictable and readable. There are no deviations or mixed conventions, which aids in clarity and usability.
The tool count of 2 feels too thin for a YouTube Music server's apparent scope. With only search and play functionality, there are obvious gaps like managing playlists, controlling playback, or accessing user data. This limited set may hinder agents from performing common music-related tasks, indicating an incomplete surface for the domain.
The tool surface is severely incomplete for a YouTube Music domain. It only covers searching and playing tracks, missing essential operations such as pausing, skipping, volume control, playlist management, or user authentication. These gaps will likely cause agent failures when attempting broader music interactions, as the current tools don't support a full lifecycle or common workflows.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server for Producer/Riffusion AI music generation
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
MCP server for AI dialogue using various LLM models via AceDataCloud
An MCP server that gives your AI access to the source code and docs of all public github repos
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that allows AI models to control YouTube Music playback through Google Chrome by searching and playing songs using song and artist names.22MIT
- FlicenseAqualityDmaintenanceA lightweight MCP server that enables AI assistants like Cursor and Claude to control Spotify playback, playlists, and manage tokens via OAuth.152
- FlicenseNot gradedqualityBmaintenanceAn MCP server for managing YouTube Music playlists via Claude. Add and remove songs, create playlists, and ask Claude to suggest music — all through conversation.
- AlicenseAqualityBmaintenanceMCP server to control Spotify conversationally from Claude, Cursor, and other AI clients.11108MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/instructa/mcp-youtube-music'
If you have feedback or need assistance with the MCP directory API, please join our Discord server