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
| Tool | Description |
|---|---|
musicxml_to_abc |
Convert MusicXML (musicxml text or musicxml_path) to ABC notation; optionally filter to a single part and a range of printed bars (measures) |
abc_to_musicxml |
Convert ABC notation back to MusicXML; large scores are written to a file (return: auto / path / inline) |
apply_abc_edit |
Replace some bars of one part with edited ABC and keep everything else (other parts, dynamics, lyrics, layout) unchanged |
validate_abc |
Parse an ABC string and return errors or warnings |
list_capabilities |
Return server metadata: backend version, ABC standard |
health_check |
Run a MusicXML → ABC → MusicXML round-trip smoke test and report status |
describe_score |
Summarize a score cheaply: parts (IDs P1…), key, time, tempo, ranges, measures |
Installation
cd musicxml-abc-mcp
uv sync --extra dev
Note: use --extra dev (not --group dev) to install pytest.
For a guided setup (checks for uv, 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
uv run musicxml-abc-mcp
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.
// Convert full score to ABC
{
"tool": "musicxml_to_abc",
"arguments": {"musicxml": "<score-partwise>...</score-partwise>"}
}
// → {"abc": "X:1\nT:...\n...", "parts_included": ["P1", "P2", "P3", "P4"], "warnings": []}
// Extract just the Soprano part
{
"tool": "musicxml_to_abc",
"arguments": {"musicxml": "<score-partwise>...</score-partwise>", "part": "Soprano"}
}
// `part` takes a part ID ("P1"), name ("soprano", any case) or voice ("S"); an unknown part
// returns the valid choices. `part_id` is a deprecated alias for one minor release.
// Just bars 17–24 of the Alto part
{
"tool": "musicxml_to_abc",
"arguments": {"musicxml_path": "scores/anthem.musicxml", "part": "Alto", "measures": [17, 24]}
}
// `measures` are the printed bar numbers, inclusive (a pickup bar is 0). The ABC headers (K:, M:,
// Q:) are the key, time and tempo in force at bar 17. A range outside the score returns
// INVALID_PARAMETER with a hint such as "This score has measures 1–32."
// Convert edited ABC back to MusicXML
{
"tool": "abc_to_musicxml",
"arguments": {"abc": "X:1\nT:My Song\n..."}
}
// → {"musicxml": "<?xml version=\"1.0\"?>...", "warnings": []}
// Validate ABC before converting
{
"tool": "validate_abc",
"arguments": {"abc": "X:1\nT:My Song\n..."}
}
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
# All tests including integration (round-trip SATB conversion)
VIRTUAL_ENV= .venv/bin/pytest tests/ -v
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
Metadata
Release files for musicxml-abc-mcp 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| musicxml_abc_mcp-0.3.0.tar.gz | 322.6 kB | With provenance | Details for musicxml_abc_mcp-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| musicxml_abc_mcp-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for musicxml_abc_mcp-0.3.0-py3-none-any.whl |
Total release size: 486.2 kB
Release files / musicxml_abc_mcp-0.3.0.tar.gz
| Download URL | musicxml_abc_mcp-0.3.0.tar.gz |
|---|---|
| Size | 322.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fae48b6d485176b65b57b08cd58b460715e77584455b4b84e80540526eeee6be
|
|
BLAKE2b-256 checksum How to use checksums |
872e0574f81cf0a12172d5c00cc37d9e72a75a16cb880bc039eeb0e39ec35008
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logRelease files / musicxml_abc_mcp-0.3.0-py3-none-any.whl
| Download URL | musicxml_abc_mcp-0.3.0-py3-none-any.whl |
|---|---|
| Size | 163.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c483fad5975dc4b58f9bafabcfb305d02b90b7c32dc04217be56095d04421e98
|
|
BLAKE2b-256 checksum How to use checksums |
e1d246b8377f33884ee100f71bbb2409eb77394bbe0750697b135b2920f421ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logSecurity for musicxml-abc-mcp 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for musicxml_abc_mcp-0.3.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.