
MusicXML Comparer
io.github.raulkivi由 GitHub 账号 raulkivi 发布v0.2.1更新于 Nov 3, 2026
Music-aware, multi-level comparison of two MusicXML files
概览
对两份 MusicXML 乐谱进行音乐感知的多层级比较,从整体相似度一直细化到单个音符的差异。
- 可以做什么
- 以内联文本或文件路径比较两份乐谱,返回结构化差异结果
- 快速给出相似度分数与汇总统计,不含逐音符细节
- 按声部名称和小节范围筛选列出音符级变更
- 生成可读的比较报告,涵盖声部、小节、调号与拍号变化
- 导出带逐音符颜色标注的 MusicXML,可内联返回或写入文件
- 描述乐谱的标题、调号、拍号、速度、声部、小节与时长
- 适用场景
- 适合比较同一作品的不同版本或改编、将 OMR 或转换结果与可靠参考谱对照、验证往返转换保真度、在模型或转换逻辑变更后做回归测试,以及确认编辑只改动了预期元素。
- 运行要求
- 以 Python 包 comparer-mcp 通过 uvx 在本地运行;需要 Python 3.11+ 以及 music21 和 mcp 库,无需系统库。文件路径必须位于输出目录(SHEET_MUSIC_OUTPUT_ROOT,默认为工作目录)、客户端根目录或 SHEET_MUSIC_INPUT_ROOTS 中列出的目录内。仅支持桌面客户端。
安装
在 SourceWeft 中
- 打开 控制台中的 MusicXML Comparer,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
comparer-mcp
MCP server for music-aware comparison of MusicXML files. Provides structured, multi-level diffs that report what changed between two scores — from global similarity down to individual notes.
What it does
- Version / arrangement comparison — Compare different editions, arrangements, or simplifications of the same piece
- OMR quality evaluation — Compare
omr-mcpoutput against a known-good reference - Round-trip fidelity — Verify MusicXML → ABC → MusicXML through
musicxml-abc-mcp - Regression testing — Detect regressions when OMR models or conversion logic change
- Score editing validation — Confirm LLM-driven edits only changed intended elements
Installation
See SETUP.md for client config snippets (Claude Desktop, Cursor, Windsurf, Continue, Zed) and TROUBLESHOOTING.md if something doesn't work.
MCP Tools
Each score can be passed inline (reference_xml, target_xml) or as a file path
(reference_path, target_path; .musicxml, .xml or .mxl), exactly one of each pair. Paths
save copying whole scores through the conversation. They must be inside the output folder
(SHEET_MUSIC_OUTPUT_ROOT, default the working directory), one of the client's roots, or a folder
listed in SHEET_MUSIC_INPUT_ROOTS.
compare_musicxml, compare_musicxml_files, generate_comparison_report, and
export_annotated_musicxml all accept an optional options object:
Using the engine directly
The comparison engine (src/comparer_mcp/engine.py) has no MCP dependency and is fully usable as
a plain Python library, independent of the MCP server:
Errors are raised as comparer_mcp.engine.ProcessingError (e.g. for a missing file or invalid
MusicXML), carrying a .error_code attribute (FILE_NOT_FOUND, INVALID_INPUT, etc.) matching
the format the MCP tools return.
Testing
Dependencies
- music21 — MusicXML parsing, score object model, stream alignment
- numpy — distance matrix for note alignment (transitive via music21)
- mcp — MCP protocol
System requirements
- Python 3.11+
- No system libraries required
Phase status
来源:comparer-mcp/README.md,提交 5fcea5d
工具
0版本历史
1- v0.2.1最新Sep 26, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分