youtube-music — Claude Code skill: search and setup
Search YouTube Music by track or artist, then open a result in the default browser. It needs an API key and MCP configuration.
MIT ★ 138 updated 2026-09-03
npx skills add happycapy-ai/Happycapy-skills --skill youtube-music -a claude-codeWhat youtube-music does
This skill connects Claude Code with YouTube Music through MCP. searchTrack looks up music by title or artist, while playTrack searches for a match and opens it in the user’s default browser.
A valid Google YouTube API Key is required. The MCP server runs through npx, so the package does not need a separate local install. The setup places the server configuration in .cursor/mcp.json or Claude Desktop settings, with the key supplied as YOUTUBE_API_KEY. Without that key, searches cannot run.
The skill can suggest revised terms or another artist when a track is missing. Playback is handed off to the browser rather than embedded in Claude Code.
What it helps with
- find a song by title or artist
- open a YouTube Music result in the browser
- start music from a genre-based request
- refine a search when a track is missing
Example prompts for the agent
- Search YouTube Music for
Bohemian Rhapsodyby Queen. - Open some jazz music in the default browser.
- Find tracks by
Radioheadand play a suitable result.
How to install youtube-music
1Skills CLI (Vercel)
npx skills add happycapy-ai/Happycapy-skills --skill youtube-music -a claude-code2Manually: put the files in place
~/.claude/skills/youtube-music/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/youtube-music/
1Skills CLI (Vercel)
npx skills add happycapy-ai/Happycapy-skills --skill youtube-music -a codex2Manually: put the files in place
.agents/skills/youtube-music/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add happycapy-ai/Happycapy-skills --skill youtube-music -a cursor2Manually: put the files in place
.cursor/skills/youtube-music/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install happycapy-ai/Happycapy-skills skills/youtube-music2Manually: put the files in place
.github/skills/youtube-music/SKILL.md1Skills CLI (Vercel)
npx skills add happycapy-ai/Happycapy-skills --skill youtube-music -a gemini-cli2Platform CLI
gemini skills install https://github.com/happycapy-ai/Happycapy-skills --path skills/youtube-musicManually: put the files in place
.devin/skills/youtube-music/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about youtube-music
How do I install youtube-music in Claude Code?
Run npx skills add happycapy-ai/Happycapy-skills --skill youtube-music -a claude-code, then check ~/.claude/skills/youtube-music/SKILL.md.
What does youtube-music do?
It searches YouTube Music by track title or artist and can open a matching result in the default browser through MCP.
What does youtube-music need to run?
You need a valid Google YouTube API Key and an MCP server configuration. Put the key in the YOUTUBE_API_KEY environment setting.
Source text
SKILL.md · MIT
---
name: youtube-music
description: Search and play music tracks on YouTube Music through MCP integration. Use when user wants to search for songs, play music, or discover tracks on YouTube Music platform.
---
# YouTube Music MCP
🎵 A Model Context Protocol (MCP) server that enables AI assistants to search for and play tracks on YouTube Music.
## Overview
This skill provides integration with YouTube Music through the MCP protocol, allowing you to search for songs by title or artist name and play them directly in the user's default web browser.
## Available Tools
- **searchTrack** - Search for music tracks on YouTube Music by title or artist name
- **playTrack** - Search and automatically open tracks in the default web browser
## Prerequisites
Before using this skill, ensure you have:
1. A valid **Google YouTube API Key** from the [Google Cloud Console](https://console.cloud.google.com/marketplace/product/google/youtube.googleapis.com)
2. Cursor or Claude Desktop properly configured
## Installation
Add the following configuration to your `.cursor/mcp.json` file (or Claude Desktop configuration):
```json
{
"mcpServers": {
"youtube-music-mcp": {
"command": "npx",
"args": ["-y", "@instructa/mcp-youtube-music"],
"env": {
"YOUTUBE_API_KEY": "<YOUR_API_KEY>"
}
}
}
}
```
Replace `<YOUR_API_KEY>` with your actual YouTube API key.
## Usage Examples
### Searching for Tracks
```
User: "Search for Bohemian Rhapsody by Queen"
Assistant: [Uses searchTrack tool to find the track on YouTube Music]
```
### Playing Tracks
```
User: "Play some jazz music"
Assistant: [Uses playTrack tool to search and open jazz music in browser]
```
## Guidelines
- Always verify that the YouTube API key is configured before attempting to use the tools
- Provide clear feedback to users about what tracks were found or played
- If a track cannot be found, suggest alternative search terms or artists
- The playTrack tool will open tracks in the user's default web browser
- Respect user preferences for music genres and artists
## Technical Details
- **Protocol**: Model Context Protocol (MCP)
- **Platform**: YouTube Music
- **Execution**: Runs via `npx` without requiring local installation
- **License**: MIT
## Author
Created by Kevin Kern / Instructa ([@kregenrek](https://x.com/kregenrek))
## Resources
- GitHub Repository: [instructa/mcp-youtube-music](https://github.com/instructa/mcp-youtube-music)
- Learn more: [instructa.ai](https://www.instructa.ai)
© happycapy-ai · MIT · happycapy-ai/Happycapy-skills