musescore-mcp
musescore-mcp
这是一个将 MuseScore CLI 封装为模型上下文协议 (MCP) 服务器的工具,使 Claude AI 能够直接转换、编辑和分析乐谱文件。
目的
让 Claude AI(Claude Desktop、Claude Code 等)能够通过自然语言命令处理 MuseScore 乐谱文件(.mscz, .musicxml, MIDI 等)。
提供功能:
分类 | 功能 |
转换与导出 | 转换为 PDF、PNG、MusicXML、MIDI、MP3 等多种格式;提取分谱;导出多页 PNG |
编辑 | 调性移调、音程移调、乐器移调;修改拍号;修改速度 |
分析 | 乐谱基本信息(标题、作曲家、拍号、调性、小节数);调号变化列表;乐器编制及音域分析;和声分析(罗马数字分析法) |
高级 | 应用 MuseScore 样式文件 (.mss);运行 QML 插件;通过 MusicXML 字符串创建乐谱;MIDI 转乐谱;文件夹监控及自动转换 |
要求
Python 3.10 或更高版本
安装 MuseScore 4(或 MuseScore 3)
Windows: musescore.org 或 Microsoft Store
如果安装路径非默认路径,请在环境变量
MSCORE_PATH中指定可执行文件路径
安装
1. 克隆仓库
git clone https://github.com/strongbeen04/musescore-mcp.git
cd musescore-mcp2. 创建虚拟环境并安装包
python -m venv .venv
# Windows
.venv\Scripts\activate
# macOS / Linux
source .venv/bin/activate
# 기본 설치
pip install -e .
# 화성 분석 기능(music21) 포함 설치
pip install -e ".[harmony]"3. 注册 MCP 服务器
Claude Desktop (Windows Store 版本)
添加到 %LOCALAPPDATA%\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\claude_desktop_config.json 文件中:
{
"mcpServers": {
"musescore": {
"command": "C:\\path\\to\\musescore-mcp\\.venv\\Scripts\\musescore-mcp.exe"
}
}
}Claude Desktop (常规安装)
添加到 %APPDATA%\Claude\claude_desktop_config.json 文件中:
{
"mcpServers": {
"musescore": {
"command": "C:\\path\\to\\musescore-mcp\\.venv\\Scripts\\musescore-mcp.exe"
}
}
}Claude Code (CLI)
添加到 ~/.claude.json 文件中:
{
"mcpServers": {
"musescore": {
"type": "stdio",
"command": "C:\\path\\to\\musescore-mcp\\.venv\\Scripts\\musescore-mcp.exe"
}
}
}对于 macOS / Linux,请将 command 修改为 .venv/bin/musescore-mcp。
保存设置后重启 Claude,即可连接 musescore 服务器。
使用方法
在与 Claude 对话时,上传乐谱文件或告知其路径即可。Claude 会在内部调用 MCP 工具。
使用示例:
"이 mscz 파일을 PDF로 변환해줘."
"악보를 Bb 클라리넷 기준으로 이조해줘."
"이 악보의 조성과 마디 수를 알려줘."
"MusicXML을 mscz 파일로 만들어줘."可用的 MCP 工具列表
工具 | 说明 |
| 确认 MuseScore 可执行文件路径 |
| 单个文件格式转换 |
| 多个文件批量转换 |
| 提取各分谱 |
| 导出多页 PNG |
| 按调性移调 |
| 按音程移调 |
| 乐器移调 |
| 修改速度 (BPM) |
| 修改拍号 |
| 返回乐谱基本信息 |
| 调号变化列表 |
| 乐器编制及音域 |
| 修改标题、作曲家等元数据 |
| 和声进行分析 (需要 music21) |
| 应用 MuseScore 样式 (.mss) |
| 运行 QML 插件 |
| MusicXML 字符串转 mscz |
| MIDI 转 mscz |
| 监控文件夹并自动转换 |
Purpose
musescore-mcp is an MCP (Model Context Protocol) server that wraps the MuseScore CLI, enabling Claude AI (Claude Desktop, Claude Code, etc.) to convert, edit, and analyze music score files through natural language commands.
Features:
Category | Capabilities |
Conversion & Export | Convert to PDF, PNG, MusicXML, MIDI, MP3, and more; extract individual parts; export multi-page PNGs |
Editing | Transpose by key or interval; instrument-specific transposition; change tempo and time signature |
Analysis | Score metadata (title, composer, key, time signature, measure count); key signature changes; instrument ranges; harmony analysis with Roman numerals |
Advanced | Apply MuseScore style files (.mss); run QML plugins; create scores from MusicXML strings; convert MIDI to score; auto-convert files in a watched folder |
Requirements
Python 3.10 or higher
MuseScore 4 (or MuseScore 3) installed
Windows: musescore.org or Microsoft Store
If installed to a non-standard path, set the
MSCORE_PATHenvironment variable to the executable path
Installation
1. Clone the repository
git clone https://github.com/strongbeen04/musescore-mcp.git
cd musescore-mcp2. Create a virtual environment and install
python -m venv .venv
# Windows
.venv\Scripts\activate
# macOS / Linux
source .venv/bin/activate
# Base install
pip install -e .
# With harmony analysis support (music21)
pip install -e ".[harmony]"3. Register the MCP server
Claude Desktop (Windows Store)
Edit %LOCALAPPDATA%\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\claude_desktop_config.json:
{
"mcpServers": {
"musescore": {
"command": "C:\\path\\to\\musescore-mcp\\.venv\\Scripts\\musescore-mcp.exe"
}
}
}Claude Desktop (Standard install)
Edit %APPDATA%\Claude\claude_desktop_config.json:
{
"mcpServers": {
"musescore": {
"command": "C:\\path\\to\\musescore-mcp\\.venv\\Scripts\\musescore-mcp.exe"
}
}
}Claude Code (CLI)
Edit ~/.claude.json:
{
"mcpServers": {
"musescore": {
"type": "stdio",
"command": "C:\\path\\to\\musescore-mcp\\.venv\\Scripts\\musescore-mcp.exe"
}
}
}On macOS / Linux, change command to .venv/bin/musescore-mcp.
Restart Claude after saving the config to connect the server.
Usage
Attach a score file in your Claude conversation or describe its path, and ask in natural language. Claude will call the appropriate MCP tools automatically.
Examples:
"Convert this mscz file to PDF."
"Transpose this score for Bb clarinet."
"What is the key and measure count of this score?"
"Create an mscz from this MusicXML."Available MCP Tools
Tool | Description |
| Return the detected MuseScore executable path |
| Convert a single score to another format |
| Convert multiple files in one call |
| Export each instrument part as a separate file |
| Export all pages as individual PNG images |
| Transpose to a target key |
| Transpose by a specific interval |
| Rewrite transposition for a given instrument |
| Set a new tempo (BPM) |
| Change the time signature |
| Return title, composer, key, time sig, tempo, parts, measure count |
| List all key signature changes with measure numbers |
| Return instrument names, transpositions, and pitch ranges |
| Edit title, composer, lyricist, and copyright fields |
| Analyze chord progressions (requires music21) |
| Apply a MuseScore style file (.mss) |
| Execute an installed MuseScore QML plugin |
| Create an mscz from a MusicXML string |
| Convert a MIDI file to mscz |
| Monitor a folder and auto-convert new .mscz files |
License
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables Claude AI to generate professional, production-ready MIDI files (chord progressions, drum patterns, bass lines, melodies, and full arrangements) compatible with any DAW including Logic Pro, Ableton Live, FL Studio, and more.7MIT
- AlicenseNot gradedqualityDmaintenanceEnables natural language control over Ableton Live for generating musical patterns, melodies, and full song arrangements. It also provides tools for sample searching and mixing assistance through an OSC-based connection with Claude Desktop.1MIT
- FlicenseNot gradedqualityCmaintenanceEnables natural language control of Ableton Live through Claude, including session management, track and clip creation, device parameter adjustment, and browser browsing.1
- AlicenseNot gradedqualityDmaintenanceEnables semantic search of local audio samples by describing sounds, MIDI generation, stem separation, and other music production tools from Claude Desktop.1MIT
Related MCP Connectors
Generate AI music via the Lacuna Music API from MCP clients like Claude Desktop & Code.
Garmin data in Claude: 135 tools — activities, sleep, HRV, training, workouts. Free, open source.
Connect Claude to Fathom meeting recordings, transcripts, and summaries
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/strongbeen04/MUSESCORE-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server