Music Analysis MCP server

Integrates librosa's audio processing capabilities to provide detailed music and audio analysis tools for extracting features like tempo, spectral characteristics, and onset detection directly within conversations.
Back to servers
Provider
Hugo How-Choong
Release date
Mar 17, 2025
Language
Python
Stats
10 stars

This MCP server enables audio analysis directly within Claude Desktop. It processes audio files from your local disk, YouTube links, or other web URLs, providing detailed information about musical characteristics using librosa's audio analysis capabilities.

Installation Options

Automated Installation via Smithery

The easiest way to install Music Analysis for Claude Desktop is through Smithery:

npx -y @smithery/cli install @hugohow/mcp-music-analysis --client claude

Manual Installation

If you prefer to install manually:

# Clone repository
git clone [email protected]: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 .

Configuration

After installation, you need to configure Claude Desktop to recognize the MCP server.

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
    

Update Configuration

Add the following to your claude_desktop_config.json:

{
  "mcpServers": {
    "music-analysis": {
      "command": "uvx",
      "args": ["-n", "mcp-music-analysis"]
    }
  }
}

Using the Music Analysis MCP

Once configured, you can use the MCP in Claude Desktop with natural language prompts. The server can analyze audio from:

  • Local files on your computer
  • Direct URLs to audio files
  • YouTube links

Example Prompts

Here are some example prompts to use with Claude Desktop:

Can you analyze the beat of /Users/username/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

Available Analysis Functions

The MCP can perform various types of audio analysis, including:

  • Beat detection and BPM calculation
  • Audio duration measurement
  • MFCC (Mel-frequency cepstral coefficients) computation
  • Spectral centroid analysis
  • Onset detection (identifying when notes begin)
  • And other librosa-based audio analyses

Simply ask Claude to perform the specific analysis you want on your audio file, and the MCP will handle the technical implementation.

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later