Skip to main content
Glama

download_from_youtube

Download audio files from YouTube URLs for analysis with the mcp-audio-analysis server. Extract content directly from video links to process locally.

Instructions

Downloads a file from a given youtube URL and returns the path to the downloaded file. Be careful, you will never know the name of the song.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
youtube_urlYes

Implementation Reference

  • The main handler function implementing the 'download_from_youtube' tool. It uses pytubefix to download the audio-only stream from a YouTube URL and saves it as an MP4 file in the temp directory, returning the path.
    @mcp.tool() def download_from_youtube(youtube_url: str) -> str: """ Downloads a file from a given youtube URL and returns the path to the downloaded file. Be careful, you will never know the name of the song. """ yt = YouTube(youtube_url) ys = yt.streams.get_audio_only() path = ys.download(filename=yt.video_id + ".mp4", output_path=tempfile.gettempdir()) return path

Latest Blog Posts

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/hugohow/mcp-music-analysis'

If you have feedback or need assistance with the MCP directory API, please join our Discord server