Used for converting YouTube videos to MP3 format with support for handling conversion errors and ensuring high-quality audio output.
Allows searching YouTube for music videos and extracting detailed metadata including title, uploader, duration, view count, upload date, and description from videos.
Enables searching for music content and downloading YouTube music videos as high-quality MP3 files, with artist, song title, and album information.
LLM Jukebox MCP Server
A Model Context Protocol (MCP) server that enables LLMs to search, download, and extract information from YouTube music videos.
Features
- YouTube Music Search: Find music videos by artist, song title, album, or any search query
- Audio Download: Download and convert YouTube videos to high-quality MP3 files
- Video Information: Extract detailed metadata from YouTube videos
- Async Operations: Non-blocking downloads and searches with progress tracking
- Logging: Debug-level logging to file and stderr
Environment Variables
DOWNLOAD_PATH
: Directory for downloaded files (defaults to current directory)
Example:
MCP Server Configuration
Add this configuration to your MCP settings file (typically mcp_servers.json
or similar):
Available Tools
test_ytdlp()
Tests if yt-dlp is properly installed and accessible.
Returns: Version information or error message
search_youtube_music(query: str)
Searches YouTube for music content and returns the URL of the first result.
Parameters:
query
: Search terms (artist, song, album, etc.)
Returns: YouTube watch URL or "No results found" message
Example:
download_youtube_music(query: str)
Searches for and downloads music, converting to MP3 format.
Parameters:
query
: Search terms for the desired music
Returns: Success message with file paths or error details
Example:
get_youtube_info(url: str)
Extracts detailed information about a YouTube video without downloading.
Parameters:
url
: YouTube URL or video ID
Returns: JSON-formatted video metadata including title, uploader, duration, view count, upload date, and description
Usage Examples
Once configured with your MCP-compatible client:
- Search for music: "Find me the YouTube URL for 'Bohemian Rhapsody' by Queen"
- Download music: "Download 'Hotel California' by Eagles as MP3"
- Get video information: "Get details about this YouTube video: https://www.youtube.com/watch?v=dQw4w9WgXcQ"
- Test the setup: "Test if yt-dlp is working"
File Naming
Downloaded files use the format: {video_title}.mp3
and are saved to the configured download directory.
Logging
The server creates detailed logs in llm_jukebox_mcp_debug.log
including:
- Search and download operations
- Performance timing
- Error details
- File paths of successful downloads
Error Handling
The server gracefully handles:
- Network connectivity issues
- Invalid YouTube URLs
- Missing or corrupted videos
- FFmpeg conversion errors
- File system permissions
Legal Considerations
This tool is intended for personal use with content you have the right to download. Users are responsible for complying with:
- YouTube's Terms of Service
- Local copyright laws
- Content creators' rights
Always respect intellectual property and consider supporting artists through official channels.
This server cannot be installed
Enables LLMs to search, download, and extract information from YouTube music videos, converting them to high-quality MP3 files.
Related MCP Servers
- -securityAlicense-qualityProvides functionality to search YouTube videos and automatically save the results to Google Sheets.Last updated -19JavaScriptMIT License
- -securityFlicense-qualityA server for downloading, processing, and managing YouTube content with features like video quality selection, format conversion, and metadata extraction.Last updated -JavaScript
- -securityFlicense-qualityEnables extraction of transcript text from YouTube videos by providing the video URL, supporting standard, shortened, and embed URL formats.Last updated -1JavaScript
- -securityFlicense-qualityEnables AI language models to interact with YouTube content through a standardized interface, providing tools for retrieving video information, transcripts, channel analytics, and trend analysis.Last updated -8521JavaScript