M

MCP音乐分析工具

@hugohow/mcp-music-analysis
2 Stars 1.6k 次浏览 hugohow 更新于 2026-08-23

MCP将分析本地音频文件。

MCP 服务配置

复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用

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

服务介绍

MCP 音乐分析

此仓库包含一个模型上下文提供者 (MCP),它使用 MCP 和 librosa 对本地音频、YouTube 链接或音频链接中的音频进行分析。

与 Claude Desktop 一起使用

安装

# 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 .

与 Claude Desktop 一起使用

定位配置文件

配置文件的位置取决于您的操作系统:

  • macOS:

    ~/Library/Application\ Support/Claude/claude_desktop_config.json
    
  • Windows:

    %APPDATA%\Claude\claude_desktop_config.json
    
  • Linux:

    ~/.config/Claude/claude_desktop_config.json
    

claude_desktop_config.json 中添加以下内容:

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

示例提示

这里是一些示例提示,您可以在服务器运行后在对话或聊天环境中使用。MCP 将理解这些请求并执行相关工具:

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

待办事项列表

  • 添加音频文件下载的 URL
  • 添加 YouTube 转换为音频文件
  • 试验多个 Python 环境(测试中)
  • 改进安装指南
  • 集成 Whisper 用于歌词
  • 实现 Docker 解决方案

作者

Hugo How-Choong

相关 MCP 服务