
Music Analysis
MCP to analyse local audio file.
hugohow
Tools
load
Loads an audio file and returns the path to the audio time series Offset and duration are optional, in seconds. Be careful, you will never know the name of the song.
get_duration
Returns the total duration (in seconds) of the given audio time series.
tempo
Estimates the tempo (in BPM) of the given audio time series using librosa. Offset and duration are optional, in seconds.
chroma_cqt
Computes the chroma CQT of the given audio time series using librosa. The chroma CQT is a representation of the audio signal in terms of its chromatic content, which is useful for music analysis. The chroma CQT is computed using the following parameters: - path_audio_time_series_y: The path to the audio time series (CSV file). It's sometimes better to take harmonics only - hop_length: The number of samples between frames. - fmin: The minimum frequency of the chroma feature. - n_chroma: The number of chroma bins (default is 12). - n_octaves: The number of octaves to include in the chroma feature. The chroma CQT is saved to a CSV file with the following columns: - note: The note name (C, C#, D, etc.). - time: The time position of the note in seconds. - amplitude: The amplitude of the note at that time. The path to the CSV file is returned.
mfcc
Computes the MFCC of the given audio time series using librosa. The MFCC is a representation of the audio signal in terms of its spectral content, which is useful for music analysis. The MFCC is computed using the following parameters: - path_audio_time_series_y: The path to the audio time series (CSV file). It's sometimes better to take harmonics only
beat_track
Computes the beat track of the given audio time series using librosa. The beat track is a representation of the audio signal in terms of its rhythmic content, which is useful for music analysis. The beat track is computed using the following parameters: - hop_length: The number of samples between frames. - start_bpm: The initial estimate of the tempo (in BPM). - tightness: The tightness of the beat tracking (default is 100). - units: The units of the beat track (default is "frames"). It can be frames, samples, time.
download_from_url
Downloads a file from a given URL and returns the path to the downloaded file. Be careful, you will never know the name of the song.
download_from_youtube
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.
README
MCP Music Analysis
This repository contains a Model Context Provider (MCP) that uses MCP and librosa for audio analysis on audio in local, youtube link, or audio link.
Usage with Claude Desktop
<div style="display: flex; gap: 1rem;"> <img src="public/screen.png" alt="alt text" width="40%"> <img src="public/screen1.png" alt="alt text" width="40%"> </div>
Installation
# Clone repository
git clone git@github.com:hugohow/mcp-music-analysis.git
cd mcp-music-analysis
# Create virtual environment and install
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
uv pip install -e .
Usage with Claude Desktop
Locate Configuration File
The configuration file location depends on your operating system:
-
macOS:
~/Library/Application\ Support/Claude/claude_desktop_config.json
-
Windows:
%APPDATA%\Claude\claude_desktop_config.json
-
Linux:
~/.config/Claude/claude_desktop_config.json
Add the following to your claude_desktop_config.json
:
{
"mcpServers": {
"music-analysis": {
"command": "uvx",
"args": ["-n", "mcp-music-analysis"]
}
}
}
Example Prompts
Here are some sample prompts you might use in a conversational or chat-based context once the server is running. The MCP will understand these requests and execute the relevant tools:
Can you analyze the beat of /Users/hugohow-choong/Desktop/sample-6s.mp3?
Could you give me the duration of https://download.samplelib.com/mp3/sample-15s.mp3 ?
Please compute the MFCC for this file: /path/to/another_audio.mp3
What are the spectral centroid values for /path/to/music.wav?
I'd like to know the onset times for https://www.youtube.com/watch?v=8HFiFd9vx1c
To-Do List
- [x] Add URL to audio file download
- [x] Add YouTube to audio file transformation
- [ ] Experiment with multiple Python environments (testing)
- [ ] Improve installation guide
- [ ] Integrate Whisper for lyrics
- [ ] Implement a Docker solution
Author
Hugo How-Choong
Recommended Servers

VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
AIO-MCP Server
🚀 All-in-one MCP server with AI search, RAG, and multi-service integrations (GitLab/Jira/Confluence/YouTube) for AI-enhanced development workflows. Folk from
Hyperbrowser MCP Server
Welcome to Hyperbrowser, the Internet for AI. Hyperbrowser is the next-generation platform empowering AI agents and enabling effortless, scalable browser automation. Built specifically for AI developers, it eliminates the headaches of local infrastructure and performance bottlenecks, allowing you to
BigQuery
This is a server that lets your LLMs (like Claude) talk directly to your BigQuery data! Think of it as a friendly translator that sits between your AI assistant and your database, making sure they can chat securely and efficiently.
Perplexity Chat MCP Server
MCP Server for the Perplexity API.
Web Research Server
A Model Context Protocol server that enables Claude to perform web research by integrating Google search, extracting webpage content, and capturing screenshots.
MySQL Server
Allows AI assistants to list tables, read data, and execute SQL queries through a controlled interface, making database exploration and analysis safer and more structured.
Aindreyway Codex Keeper
Serves as a guardian of development knowledge, providing AI assistants with curated access to latest documentation and best practices.
Etherscan Tools
Facilitates interaction with Ethereum blockchain data via Etherscan's API, providing real-time access to balances, transactions, token transfers, contract ABIs, gas prices, and ENS name resolutions.
Perplexity Deep Research
A server that allows AI assistants to perform web searches using Perplexity's sonar-deep-research model with citation support.