
MusicXML to ABC
io.github.raulkivi由 GitHub 帳號 raulkivi 發布v0.2.2更新於 Oct 24, 2026
Converts between MusicXML and ABC notation, so LLMs can read and edit scores
概覽
本機 MCP 伺服器,在 MusicXML 與 ABC 記譜法之間互轉,讓助理能讀取、摘要並編輯樂譜。
- 可以做什麼
- 把 MusicXML 文字或檔案路徑轉成 ABC 記譜,可依單一聲部與小節範圍篩選
- 把 ABC 記譜轉回 MusicXML,小樂譜直接回傳,大樂譜寫入檔案
- 驗證 ABC 字串並回報解析錯誤或警告
- 以低成本摘要樂譜:聲部、調號、拍號、速度、音域與小節
- 回傳伺服器中繼資料並執行往返轉換健康檢查
- 適用情境
- 適合讓助理編輯合唱等樂譜:先把 MusicXML 轉成精簡的 ABC,由模型編輯文字,再轉回 MusicXML。也適合在動手前檢視樂譜的聲部與結構。
- 執行需求
- 以 PyPI 套件 musicxml-abc-mcp 透過 uvx 在本機以 stdio 執行,需要 Python 3.11 以上版本。不需環境變數,選用變數可設定輸出目錄、額外輸入資料夾與內嵌大小上限。僅支援桌面用戶端。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 MusicXML to ABC,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
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
Installation
Note: use --extra dev (not --group dev) to install pytest.
For a guided setup (installs uv if needed, 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
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.
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
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
來源:musicxml-abc-mcp/README.md,提交 5fcea5d
工具
0版本歷史
2- v0.2.2最新Oct 12, 2026
- v0.2.1Sep 26, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分