home / mcp / music analysis mcp server
Integrate librosa, whisper with LLMs to analyze music audio.
Configuration
View docs{
"mcpServers": {
"hugohow-mcp-music-analysis": {
"command": "uvx",
"args": [
"-n",
"mcp-music-analysis"
]
}
}
}You set up a Model Context Provider (MCP) server that analyzes audio using librosa. It can process local files, YouTube links, or other audio URLs, returning insights like beat analysis, duration, MFCCs, spectral centroids, and onset times to help you understand audio content, build features, or enhance music-related projects.
Run the MCP server locally and connect your MCP client to request audio analyses. You can ask the server to analyze beats, compute MFCCs, retrieve spectral centroid values, determine onset times, or fetch the duration for a given audio file or URL.
Typical actions you can perform include analyzing the beat structure of a local file, calculating MFCC features from an audio clip, or listing onset times for a YouTube link. Use natural language prompts within your MCP client to request the specific analysis you need. The server understands these requests and executes the corresponding analysis tools.
Prerequisites: you need Python and a functional virtual environment tool. You also need a client capable of interfacing with the MCP server (an MCP-enabled chat or tooling client). Ensure you have Python 3.8+ and a working network connection for downloads.
Option A: Manual installation (from source) you can follow these steps in your terminal.
# Clone the repository
git clone [email protected]:hugohow/mcp-music-analysis.git
cd mcp-music-analysis
# Create and activate a virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install the package in editable mode
pip install -e .Option B: Automatic installation via Smithery (if you prefer an automated setup).
npx -y @smithery/cli install @hugohow/mcp-music-analysis --client claudeConfigure Claude Desktop to launch the MCP server using a local runtime. Add a server entry that runs the MCP in stdio mode, so the client can send analysis requests to the running process.
{
"mcpServers": {
"music_analysis": {
"type": "stdio",
"name": "music_analysis",
"command": "uvx",
"args": ["-n", "mcp-music-analysis"]
}
}
}Ask for beat analysis, duration, MFCCs, spectral centroids, or onset times for various audio inputs.
Examples include prompts like: analyze the beat of a local file, compute MFCCs for a given clip, or retrieve onset times for a YouTube URL.
Analyze the beat structure of a given audio input and return beat times, tempo estimates, and beat positions.
Return the total duration of the provided audio file or stream.
Compute MFCC features for the given audio, returning the coefficient vectors.
Calculate spectral centroid values across the audio, indicating brightness of the sound.
Identify onset times where new notes or percussive events begin in the audio.