BM

brightlikethelight/music21-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

28 stars 9 forks 质量 72 趋势 15MIT

🎵 用于音乐分析与生成的生产准备MCP服务器 |FastMCP • music21 • OAuth2 • Docker |首个与企业级功能的music21 MCP集成

概览

- MCP 服务器、HTTP API、CLI 工具和 Python 库。基于强大的 music21 库,采用协议无关架构,实现最大可靠性。 根据2025年的研究,该项目提供了同样强大的music21分析功能: - 📡 - 用于 Claude Desktop 集成(当它有效时)- 🌐 - 用于 Web 应用(可靠备份)- 💻 - 用于自动化(始终有效)- 🐍 - 用于直接编程访问 - : MusicXML、MIDI、ABC、Lilypond、music21语料库 - : 多重算法(Krumhansl、Aarden、Bellman-Budge) - : 罗马数字、和弦进行、终止式检测 - : 平行运动检测、声部交叉分析 - : 旋律、节奏和谐波模式 - :巴赫合唱与爵士风格和声 - :物种对位生成(1-5) - 学习并生成作曲家风格的音乐 - :移调、时间拉伸、配器 - : Music21 分析,独立于协议问题- : 即使 MCP 失败(30-40% 的概率)仍能正常工作 -...

概述(AI 翻译)

专业音乐分析,支持4种不同接口——MCP服务器、HTTP API、CLI工具和Python库。基于强大的music21库,采用协议无关架构,实现最大可靠性。

🎯 为什么要多接口?

基于2025年研究显示,MCP的生产成功率达到40-50%,本项目提供了多条路径以实现同样强大的music21分析功能:

  • 📡 MCP 服务器 - 用于 Claude 桌面集成(当它正常工作时)
  • 🌐 HTTP API - 用于网页应用(可靠备份)
  • 💻 CLI 工具 - 用于自动化(始终有效)
  • 🐍 Python 库 - 用于直接编程访问

🎵 核心音乐分析功能

分析工具(13个可用)

  • 导入与导出:MusicXML、MIDI、ABC、Lilypond、music21语料库
  • 密钥分析:多重算法(Krumhansl、Aarden、Bellman-Budge)
  • 和声分析:罗马数字、和弦进行、终止式检测
  • 语音引导:平行运动检测,语音交叉分析
  • 模式识别:旋律、节奏和和声模式

高级能力

  • 和声:巴赫合唱与爵士风格和声

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Music21 Analysis - Multi-Interface Music Server

Professional music analysis with 4 different interfaces - MCP server, HTTP API, CLI tools, and Python library. Built on the powerful music21 library with protocol-independent architecture for maximum reliability.

🎯 Why Multiple Interfaces?

Based on 2025 research showing MCP has 40-50% production success rate, this project provides multiple pathways to the same powerful music21 analysis functionality:

  • 📡 MCP Server - For Claude Desktop integration (when it works)
  • 🌐 HTTP API - For web applications (reliable backup)
  • 💻 CLI Tools - For automation (always works)
  • 🐍 Python Library - For direct programming access

🎵 Core Music Analysis Features

Analysis Tools (13 Available)

  • Import & Export: MusicXML, MIDI, ABC, Lilypond, music21 corpus
  • Key Analysis: Multiple algorithms (Krumhansl, Aarden, Bellman-Budge)
  • Harmony Analysis: Roman numerals, chord progressions, cadence detection
  • Voice Leading: Parallel motion detection, voice crossing analysis
  • Pattern Recognition: Melodic, rhythmic, and harmonic patterns

Advanced Capabilities

  • Harmonization: Bach chorale and jazz style harmonization
  • Counterpoint: Species counterpoint generation (1-5)
  • Style Imitation: Learn and generate music in composer styles
  • Score Manipulation: Transposition, time stretching, orchestration

🚀 Quick Start

Installation

# Install the package
pip install music21-mcp-server

# Start the server
music21-mcp          # MCP server for Claude Desktop
music21-http         # REST API at localhost:8000
music21-cli          # Interactive CLI
music21-analysis mcp          # Unified launcher (positional arg)

Install from Source

# Clone repository
git clone https://github.com/brightlikethelight/music21-mcp-server.git
cd music21-mcp-server

# Install with UV (recommended)
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

# Start MCP server python -m music21_mcp.launcher mcp # Configure Claude Desktop with: # ~/.config/claude-desktop/config.json { "mcpServers": { "music21-analysis": { "command": "python", "args": ["-m", "music21_mcp.server_minimal"], "env": { "PYTHONPATH": "/path/to/music21-mcp-server/src" } } } }