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 to ABC notation; optionally filter to a single part |
abc_to_musicxml |
Convert ABC notation back to MusicXML |
validate_abc |
Parse an ABC string and return errors or warnings |
list_capabilities |
Return server metadata: backend version, ABC standard |
Installation
cd musicxml-abc-mcp
uv sync --extra dev
Note: use --extra dev (not --group dev) to install pytest.
Running
uv run musicxml-abc-mcp
No environment variables required.
Usage examples
// Convert full score to ABC
{
"tool": "musicxml_to_abc",
"arguments": {"musicxml_path": "/path/to/score.mxl"}
}
// Extract just the Soprano part
{
"tool": "musicxml_to_abc",
"arguments": {"musicxml_path": "/path/to/score.mxl", "part_name": "Soprano"}
}
// Convert edited ABC back to MusicXML
{
"tool": "abc_to_musicxml",
"arguments": {"abc_text": "X:1\nT:My Song\n...", "output_path": "/tmp/edited.mxl"}
}
// Validate ABC before converting
{
"tool": "validate_abc",
"arguments": {"abc_text": "X:1\nT:My Song\n..."}
}
ABC notation basics
This server uses ABC standard v2.1:
c(lowercase) = C4 (middle C)C(uppercase) = C3 (one octave below middle C)- Apostrophe raises an octave:
c'= C5 - Comma lowers an octave:
C,= C2
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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file musicxml_abc_mcp-0.1.2.tar.gz.
File metadata
- Download URL: musicxml_abc_mcp-0.1.2.tar.gz
- Upload date:
- Size: 138.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0463b17e49dc2024567ff6876c16c08aaeeb73426664aea88e7fe26b8c04910
|
|
| MD5 |
079544c527ac22983277be464248cb31
|
|
| BLAKE2b-256 |
2033c76dd588521fb7430b8b3a0a57673973ee7a2655946286039d9a4c2d8902
|
Provenance
The following attestation bundles were made for musicxml_abc_mcp-0.1.2.tar.gz:
Publisher:
publish.yml on raulkivi/music-assistant
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
musicxml_abc_mcp-0.1.2.tar.gz -
Subject digest:
e0463b17e49dc2024567ff6876c16c08aaeeb73426664aea88e7fe26b8c04910 - Sigstore transparency entry: 2481865458
- Sigstore integration time:
-
Permalink:
raulkivi/music-assistant@7ff9527a4037d29c77405611f71c19f607945c70 -
Branch / Tag:
refs/tags/musicxml-abc-mcp/v0.1.2 - Owner: https://github.com/raulkivi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7ff9527a4037d29c77405611f71c19f607945c70 -
Trigger Event:
push
-
Statement type:
File details
Details for the file musicxml_abc_mcp-0.1.2-py3-none-any.whl.
File metadata
- Download URL: musicxml_abc_mcp-0.1.2-py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a5fd863649ed66609d1afce6dc3f011ba0c5467edaaad3d235af429baf0b2f7
|
|
| MD5 |
73e3204dceb94a1a6c966fa5be03e2d3
|
|
| BLAKE2b-256 |
d491719415887d5fd323e89f3d7fb8544ace4b4901201f40a647fb2c20b454f8
|
Provenance
The following attestation bundles were made for musicxml_abc_mcp-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on raulkivi/music-assistant
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
musicxml_abc_mcp-0.1.2-py3-none-any.whl -
Subject digest:
2a5fd863649ed66609d1afce6dc3f011ba0c5467edaaad3d235af429baf0b2f7 - Sigstore transparency entry: 2481865527
- Sigstore integration time:
-
Permalink:
raulkivi/music-assistant@7ff9527a4037d29c77405611f71c19f607945c70 -
Branch / Tag:
refs/tags/musicxml-abc-mcp/v0.1.2 - Owner: https://github.com/raulkivi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7ff9527a4037d29c77405611f71c19f607945c70 -
Trigger Event:
push
-
Statement type: