
ghchen99/mcp-musescore 是一个从 https://github.com/ghchen99/mcp-musescore. 导入的 MCP 服务器候选。
概览
ghchen99/mcp-musescore 是一个从 https://github.com/ghchen99/mcp-musescore. 导入的 MCP 服务器候选。
概述(AI 翻译)
一个模型上下文协议(MCP)服务器,通过基于WebSocket的插件系统对MuseScore进行程序化控制。这使得像Claude这样的AI助手能够作曲、添加歌词、浏览乐谱,并直接控制MuseScore。
先修条件
- MuseScore 3.x 或 4.x
- Python 3.13+
- Claude 桌面或兼容 MCP 客户端
布置
1.安装MuseScore插件
首先,将QML插件代码保存到你的MuseScore插件目录中:
macOS: ~/Documents/MuseScore4/Plugins/musescore-mcp-websocket.qml
Windows: %USERPROFILE%\Documents\MuseScore4\Plugins\musescore-mcp-websocket.qml
Linux:~/Documents/MuseScore4/Plugins/musescore-mcp-websocket.qml
2.在 MuseScore 中启用该插件
- 开放MuseScore(开放MuseScore)
- 前往 插件 → 插件管理器
- 找到“MuseScore API Server”并勾选启用该选项
- 点击 OK
3.配置Claude桌面(使用uv)
安装 uv。它在第一次启动时创建并缓存 Python 环境,所以不需要管理 venv,配置也不需要 .venv 路径。
最快的方法是让FastMCP帮你写Claude Desktop配置:
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
MuseScore MCP Server
A Model Context Protocol (MCP) server that provides programmatic control over MuseScore, via a WebSocket-based plugin system. This allows AI assistants like Claude to compose music, add lyrics, navigate and analyse scores, restructure them with repeats, and mark them up with colors and highlights, directly in MuseScore.
What you can do
Ask Claude in plain language; it picks the tools. For example:
- Compose and edit: “Write a C major arpeggio in bar 3”, “Add the lyrics ‘Twin-kle twin-kle’ from bar 1”, “Set the tempo to 90 at bar 17”.
- Read large scores: the score is read 16 bars at a time as compact LilyPond, optionally only some staves, so even a 20-staff score fits.
- Compress a score with repeats: “Find the repeated passages and put them between repeat barlines”. The server finds bars and passages that repeat, adds repeat barlines, 1st/2nd endings and play counts, and removes the duplicate bars.
- Build drum charts: “Map the sections of the drum part” gives a road map (groove bar, exact and near copies, fills, and where the crashes fall). “Turn the copies into repeat signs” writes 1-, 2- or 4-bar measure-repeat signs automatically. “Make a drums-only chart with the groove written once and a 7x count” copies the score, keeps only the drums and collapses each run of identical bars. With the drum-chart skill, “make a drum chart from the open score” runs the whole workflow (see the example use case).
- Keep the song’s bar numbers: “Number the bars as played” makes the displayed numbers count repeated bars, so a compact chart still matches the original song.
- Highlight and color: “Highlight the crash hits”, “Box the dynamics”, “Highlight the repeat signs and time signatures in light blue”, “Color the fill on beats 3-4 of bar 13 green”, “Label bar 6 ‘Groove x7’”, “Add these cues in small grey italics at the start of each section: …”.
- Finish the page: “Tidy the title and call it a drum chart” cleans up the title frame; “Print what changed at the end” adds a summary of the differences from the original after the last bar, so it ends up in the PDF.
- Iterate: everything the tools add can be removed again (“remove the ** marks”, “clear the crash highlights”, “reset the bar numbers”), so you can refine the result step by step.
Requirements
- MuseScore 4.7 or newer. See Version requirements.
- uv, which installs Python 3.13 or newer for you. Without uv you need Python 3.13+ and pip; see Setup and running.
- An MCP client, such as Claude Desktop or Claude Code.
Quick start
-
Get the code and its dependencies (uv also installs a matching Python if needed):
git clone https://github.com/ghchen99/mcp-musescore.git cd mcp-musescore uv sync
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →