Skip to main content

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

musicxml_abc_mcp-0.1.2.tar.gz (138.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

musicxml_abc_mcp-0.1.2-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

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

Hashes for musicxml_abc_mcp-0.1.2.tar.gz
Algorithm Hash digest
SHA256 e0463b17e49dc2024567ff6876c16c08aaeeb73426664aea88e7fe26b8c04910
MD5 079544c527ac22983277be464248cb31
BLAKE2b-256 2033c76dd588521fb7430b8b3a0a57673973ee7a2655946286039d9a4c2d8902

See more details on using hashes here.

Provenance

The following attestation bundles were made for musicxml_abc_mcp-0.1.2.tar.gz:

Publisher: publish.yml on raulkivi/music-assistant

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file musicxml_abc_mcp-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for musicxml_abc_mcp-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2a5fd863649ed66609d1afce6dc3f011ba0c5467edaaad3d235af429baf0b2f7
MD5 73e3204dceb94a1a6c966fa5be03e2d3
BLAKE2b-256 d491719415887d5fd323e89f3d7fb8544ace4b4901201f40a647fb2c20b454f8

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page