
MusicXML to ABC
io.github.raulkivi由 GitHub 账号 raulkivi 发布v0.2.2更新于 Oct 24, 2026
Converts between MusicXML and ABC notation, so LLMs can read and edit scores
概览
本地 MCP 服务器,在 MusicXML 与 ABC 记谱法之间互转,让助手能读取、概括并编辑乐谱。
- 可以做什么
- 把 MusicXML 文本或文件路径转换为 ABC 记谱,可按单个声部和小节范围筛选
- 把 ABC 记谱转回 MusicXML,小乐谱内联返回,大乐谱写入文件
- 校验 ABC 字符串并报告解析错误或警告
- 低成本概括乐谱:声部、调号、拍号、速度、音域与小节
- 返回服务器元数据并执行往返转换健康检查
- 适用场景
- 适合让助手编辑合唱等乐谱:先把 MusicXML 转成紧凑的 ABC,由模型编辑文本,再转回 MusicXML。也适合在动手前查看乐谱的声部与结构。
- 运行要求
- 以 PyPI 包 musicxml-abc-mcp 通过 uvx 在本地以 stdio 运行,需要 Python 3.11 或更高版本。无需环境变量,可选变量用于设置输出目录、额外输入文件夹和内联大小上限。仅支持桌面客户端。
安装
在 SourceWeft 中
- 打开 控制台中的 MusicXML to ABC,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
musicxml-abc-mcp
MCP server that converts between MusicXML and ABC notation.
What it does
Bridges MusicXML (the standard but verbose XML format) and ABC notation (a compact, human-readable text format). The primary use case is enabling LLM-assisted score editing: MusicXML → ABC → Claude edits → ABC → MusicXML.
ABC is ideal for LLM editing because it is concise enough to fit in a context window and expressive enough to represent most choral music.
Tools
Installation
Note: use --extra dev (not --group dev) to install pytest.
For a guided setup (installs uv if needed, then syncs dependencies), run ./install.sh —
see SETUP.md for step-by-step instructions. Ready-made client configs (Claude
Desktop, Cursor, Windsurf, Continue, Zed) are in examples/. If something doesn't
work, check TROUBLESHOOTING.md.
Running
No environment variables required. Optional: SHEET_MUSIC_OUTPUT_ROOT (where large scores are
written and paths are read; default the working directory), SHEET_MUSIC_INPUT_ROOTS (extra
folders to read scores from) and SHEET_MUSIC_INLINE_MAX_BYTES (default 8192). See
Score References.
Usage examples
Scores can be passed as text (musicxml) or as a file path (musicxml_path: .musicxml, .xml
or .mxl inside the allowed folders). abc_to_musicxml returns small scores as text and writes
large ones to <output root>/scores/, returning musicxml_path plus a short score_summary;
pass "return": "inline" to always get the text.
ABC notation basics
This server uses ABC standard v2.1:
C(uppercase) = C4 (middle C)c(lowercase) = C5 (one octave above middle C)- Apostrophe raises an octave:
c'= C6 - Comma lowers an octave:
C,= C3
Round-trips preserve notes within ±2%. Dynamics and complex articulations are not preserved.
Testing
Dependencies
- music21 — score parsing; ABC output uses a custom serializer (music21 9.x has no ABC writer)
- mcp — MCP protocol
System requirements
- Python 3.11+
- No system libraries required
来源:musicxml-abc-mcp/README.md,提交 5fcea5d
工具
0版本历史
2- v0.2.2最新Oct 12, 2026
- v0.2.1Sep 26, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分