
MusicXML Comparer
io.github.raulkiviPublished by GitHub account raulkiviv0.2.1Updated Nov 3, 2026
Music-aware, multi-level comparison of two MusicXML files
Overview
Compares two MusicXML scores with music-aware, multi-level diffs, from an overall similarity score down to individual notes.
- What you can do
- Compare two scores inline or by file path and get a structured diff result
- Get a quick similarity score and summary statistics without note-level detail
- List note-level changes filtered by part name and measure range
- Generate a human-readable comparison report covering parts, measures, key and time signature changes
- Export MusicXML with per-note color annotations marking the diff, inline or as files
- Describe a score's title, key, time, tempo, parts, measures and duration
- When to use it
- Useful when checking different editions or arrangements of the same piece, evaluating OMR or conversion output against a known-good reference, round-trip fidelity checks, regression testing after model or conversion changes, or confirming that edits only touched intended elements.
- Requirements
- Runs locally as a Python package (comparer-mcp) via uvx; needs Python 3.11+ and the music21 and mcp libraries, with no system libraries required. File paths must lie inside the output folder (SHEET_MUSIC_OUTPUT_ROOT, default the working directory), a client root, or a folder listed in SHEET_MUSIC_INPUT_ROOTS. Desktop client only.
Installation
In SourceWeft
- Open MusicXML Comparer in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
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
Source: comparer-mcp/README.md at commit 5fcea5d
Tools
0Version history
1- v0.2.1LatestSep 26, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts