youtube-music-cli-mcp
Provides tools to search, play, and manage music from YouTube Music, including queue, favorites, shuffle, repeat, and downloads.
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-cli-mcpsearch for 'chill vibes' and play the top result"
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.
This is an unofficial fork ofinvolvex/youtube-music-cli that adds a local stdio MCP server. It is not affiliated with upstream, YouTube, or Google. The custom fork is built from source and is not the npm package advertised by upstream.
See mcp/README.md for MCP installation, tools, permissions, and client configuration.
π΅ youtube-music-cli
A powerful Terminal User Interface (TUI) music player for YouTube Music
Features β’ Installation β’ Usage β’ Plugins β’ Documentation
Features
π¨ Beautiful TUI - Rich terminal interface built with React and Ink
π Search - Find songs, albums, artists, and playlists
π Queue Management - Build and manage your playback queue
β€οΈ Favorites - Mark tracks as favorites with
fand view them withShift+Fπ Shuffle & Repeat - Multiple playback modes
ποΈ Volume Control - Fine-grained volume adjustment
π‘ Smart Suggestions - Discover related tracks
π¨ Themes - Dark, Light, Midnight, Matrix themes
π Plugin System - Extend functionality with plugins
β¨οΈ Keyboard-Driven - Efficient vim-style navigation
π₯οΈ Immersive Mode - Fullscreen Windows TUI with audio visualizer and disco effects
πΎ Downloads - Save tracks/playlists/artists with
Shift+Dπ·οΈ Metadata Tagging - Auto-tag title/artist/album with optional cover art
β‘οΈ Shell Completions -
ymc completions <bash|zsh|powershell|fish>emits scripts you can source or save so the CLI (also available asymc) tab-completes subcommands and flags
Support the Upstream Project
If you find youtube-music-cli useful, consider supporting the upstream project's development:
β Buy Me a Coffee
πͺ PayPal
β¨οΈ GitHub Sponsors
Your support helps keep this project alive and improving!
Roadmap
Visit SUGGESTIONS.md for the full backlog and use docs/roadmap.md to understand the current implementation focus (crossfade + gapless playback) and the next steps planned for equalizer/enhancements. The roadmap doc also explains how to pick up work so reviewers and contributors remain aligned.
Prerequisites
Required:
Installing Prerequisites
# With Scoop
scoop install mpv yt-dlp
# With Chocolatey
choco install mpv yt-dlpbrew install mpv yt-dlp# Ubuntu/Debian
sudo apt install mpv
pip install yt-dlp
# Arch Linux
sudo pacman -S mpv yt-dlp
# Fedora
sudo dnf install mpv yt-dlpInstallation
Node.js (Recommended)
Requires Node.js 18+ installed.
npm install -g @involvex/youtube-music-cliBun
bun install -g @involvex/youtube-music-cliHomebrew
brew tap involvex/youtube-music-cli https://github.com/involvex/youtube-music-cli.git
brew install youtube-music-cliGitHub Releases
https://github.com/involvex/youtube-music-cli/releasesInstall Script (bash)
curl -fssl https://raw.githubusercontent.com/involvex/youtube-music-cli/main/scripts/install.sh | bashInstall Script (PowerShell)
iwr https://raw.githubusercontent.com/involvex/youtube-music-cli/main/scripts/install.ps1 | iexFrom Source
git clone https://github.com/involvex/youtube-music-cli.git
cd youtube-music-cli
# With bun (recommended for development)
bun install
bun run build
bun link
# With npm
npm install
npm run build
npm linkUsage
Interactive Mode
Launch the TUI:
youtube-music-cliCLI Commands
# Play a specific track
youtube-music-cli play <video-id|youtube-url>
# Search for music
youtube-music-cli search "artist or song name"
# Play a playlist
youtube-music-cli playlist <playlist-id>
# Get suggestions based on current track
youtube-music-cli suggestions
# Playback control
youtube-music-cli pause
youtube-music-cli resume
youtube-music-cli skip
youtube-music-cli backImmersive Mode (Windows)
Launch a fullscreen visual player with real playback, queue controls, and audio visualization. Requires mpv and yt-dlp (same as normal playback).
# Standard immersive mode
youtube-music-cli --win32
# Search and play immediately
youtube-music-cli --win32 --search "artist song"
# With disco mode enabled
DISCO_MODE=true youtube-music-cli --win32
# Standalone Windows binary (Bun compile)
bun run build:win32
dist/ymc-win32.exeHotkeys in Immersive Mode:
Key | Action |
| Open search overlay |
| Cycle search type (query view) |
| Edit artist filter |
| Edit album filter |
| Volume up (+5%, player view) |
| Volume down (-5%, player view) |
| Increase search result limit (query view) |
| Decrease search result limit (query view) |
| Download selected search result |
| Play / Pause |
| Toggle favorite (current track or search) |
| Library menu (playlists, favorites) |
| Open saved playlist picker |
| Play all favorites |
| Toggle shuffle |
| Cycle repeat (off β all β one) |
| Open settings overlay (Ctrl+, on WT also) |
| Create mix from search result (results view) |
| Toggle disco mode |
| Navigate lists (overlays) |
| Previous / Next track |
| Select / play (overlays) |
| Back / close overlay |
| Quit immersive mode |
| Force quit |
The footer shows shuffle/repeat/disco status on one line and prioritized shortcuts on the next. Random favorite is available from the library menu (L). Right-click the system tray icon for Settings or Exit (uses assets/icon.ico).
Global media keys (Alt+Media keys) also work when the terminal is unfocused on Windows with Bun runtime.
Troubleshooting immersive playback
Track info shows but time does not move / no audio: Press
Spaceto resume. Immersive auto-starts the last session; if mpv was paused externally (screen share, focus loss), the UI now syncs toPAUSEDβ pressSpaceagain.Screen sharing (Discord, Teams, OBS): Remote viewers often do not hear your PC audio unless you enable βshare computer soundβ / system audio capture. That is a Windows capture limitation, not the player routing audio only to you.
Requires Bun for Win32 native features: Global hotkeys and native console title use
@bun-win32/*via Bun. Run withbun run dev:win32or the compiledymc-win32.exebinary.
Shell completions
Generate shell completion helpers through the lightweight ymc alias that ships with the CLI. Run ymc completions <bash|zsh|powershell|fish> to print the completion script for your shell, then source it or persist it in your profile:
# Bash
source <(ymc completions bash)
ymc completions bash >> ~/.bash_completion
# Zsh
source <(ymc completions zsh)
# PowerShell
ymc completions powershell | Out-File -Encoding utf8 $PROFILE
Invoke-Expression (ymc completions powershell)
# Fish
ymc completions fish > ~/.config/fish/completions/ymc.fishIf you installed the CLI globally with an alias or script name, make sure ymc points at the same binary before generating completions so that the script matches your install path.
Options
Flag | Short | Description |
|
| Theme: |
|
| Initial volume (0-100) |
|
| Enable shuffle mode |
|
| Repeat mode: |
| Run without TUI | |
| Immersive fullscreen mode (Windows only) | |
|
| Show help |
Examples
# Launch with matrix theme at 80% volume
youtube-music-cli --theme=matrix --volume=80
# Search and play in headless mode
youtube-music-cli search "lofi beats" --headless
# Play with shuffle enabled
youtube-music-cli play dQw4w9WgXcQ --shuffleKeyboard Shortcuts
Global
Key | Action |
| Show help |
| Search |
| Plugins manager |
| Favorites view |
| Suggestions |
| Settings |
| Go back |
| Quit |
Playback
Key | Action |
| Play / Pause |
| Next track |
| Previous track |
| Seek forward 10s |
| Seek backward 10s |
| Volume up |
| Volume down |
| Toggle favorite |
| Toggle shuffle |
| Cycle repeat mode |
Navigation
Key | Action |
| Move up |
| Move down |
| Select |
| Back |
Downloads
Key | Action |
| Download selected song/artist/playlist or playlist view |
Plugins
Extend youtube-music-cli with plugins!
Managing Plugins
TUI Mode: Press p to open the plugins manager.
CLI Mode:
# List installed plugins
youtube-music-cli plugins list
# Install from default repository
youtube-music-cli plugins install adblock
# Install from GitHub URL
youtube-music-cli plugins install https://github.com/user/my-plugin
# Enable/disable
youtube-music-cli plugins enable my-plugin
youtube-music-cli plugins disable my-plugin
# Update
youtube-music-cli plugins update my-plugin
# Remove
youtube-music-cli plugins remove my-pluginAvailable Plugins
Plugin | Description |
| Block ads and sponsored content |
| Display synchronized lyrics |
| Scrobble to Last.fm |
| Discord Rich Presence integration |
| Desktop notifications for track changes |
Developing Plugins
See Plugin Development Guide and Plugin API Reference.
# Start from a template
cp -r templates/plugin-basic my-plugin
cd my-plugin
# Edit plugin.json and index.ts
# Install for testing
youtube-music-cli plugins install /path/to/my-pluginConfiguration
Config is stored in ~/.youtube-music-cli/config.json:
{
"theme": "dark",
"volume": 70,
"shuffle": false,
"repeat": "off",
"streamQuality": "high",
"downloadsEnabled": false,
"downloadDirectory": "D:/Music/youtube-music-cli",
"downloadFormat": "mp3"
}Stream Quality
Quality | Description |
| 64kbps - Save bandwidth |
| 128kbps - Balanced |
| 256kbps+ - Best quality |
Download Settings
Enable/disable downloads in Settings (
,).Set your download directory in Settings β Download Folder.
Choose format in Settings β Download Format (
mp3orm4a).Downloads are saved as:
<downloadDirectory>/<artist>/<album>/<title>.mp3(or.m4a)
MP3/M4A files are tagged with metadata (
title,artist,album) and include cover art when available.
Troubleshooting
mpv not found
Ensure mpv is installed and in your PATH:
mpv --versionOn startup, the CLI now checks for mpv and yt-dlp. In interactive terminals it can prompt to run an install command automatically (with explicit confirmation first).
No audio
Check volume isn't muted (
=to increase)Verify yt-dlp is working:
yt-dlp --versionTry a different track
TUI rendering issues
If rendering looks wrong, try resizing your terminal window or restarting the app.
Plugin not loading
Check
plugin.jsonsyntax is validVerify the plugin is enabled:
youtube-music-cli plugins listCheck logs for errors
Contributing
Contributions are welcome!
Fork the repository
Create a feature branch:
git checkout -b feature/my-featureMake your changes
Run tests:
bun run testCommit:
git commit -m 'feat: add my feature'Push:
git push origin feature/my-featureOpen a Pull Request
Development
# Install dependencies
bun install
# Run in development mode
bun run dev
# Build
bun run build
# Lint and format
bun run lint:fix
bun run format
# Type check
bun run typecheckTech Stack
Runtime: Node.js 18+ / Bun
UI Framework: Ink (React for CLI)
Language: TypeScript
Audio: mpv + yt-dlp
API: YouTube Music Innertube API
License
MIT Β© Involvex
Documentation β’ Report Bug β’ Request Feature
Made with β€οΈ for music lovers
This server cannot be installed
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
YouTube MCP β wraps the YouTube Data API v3 (BYO API key)
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yoβ¦
MCP server for Clipkit β gives AI agents a video toolbox via the Clipkit schema.
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/Builderstar/youtube-music-cli-mcp-fork'
If you have feedback or need assistance with the MCP directory API, please join our Discord server