MusicXML Renderer

io.github.raulkivi由 GitHub 帳號 raulkivi 發布v0.2.2更新於 Oct 24, 2026

Renders MusicXML scores to PDF, PNG or SVG

發布方自己的服務:render.ai Presentations

已驗證STDIO僅桌面檔案與儲存媒體與設計

概覽

AI 產生的概覽

本機 MCP 伺服器,使用 Verovio 將 MusicXML 樂譜算繪成可列印的 PDF 或頁面圖片(PNG/SVG),不需外部排版工具。

可以做什麼
  • 將完整 MusicXML 樂譜算繪為多頁 PDF 檔案
  • 將單一頁面算繪為指定 DPI 的 PNG 或 SVG
  • 只算繪指定範圍的小節
  • 在不進行算繪的情況下檢視樂譜的聲部、調號、拍號、速度與長度
  • 回傳後端版本、支援格式與執行環境就緒狀態
適用情境
適合需要把 MusicXML 或壓縮的 .mxl 樂譜轉成 PDF 或圖片,用於列印、預覽、分享,或只匯出部分小節的情況。適用於樂譜存放在本機資料夾的桌面環境。
執行需求
以 stdio 方式在本機執行,通常透過 uvx 從 PyPI 套件 render-mcp 啟動。需要 Python 3.11+,輸出 PNG/PDF 另需 libcairo2 共用函式庫。不需環境變數或帳號,但可選的 SHEET_MUSIC_OUTPUT_ROOT 與 SHEET_MUSIC_INPUT_ROOTS 可限定可讀寫的資料夾。僅支援桌面端。
安裝前請注意
它會寫入檔案:output_path 必須位於設定的輸出根目錄內,輸入路徑也受允許資料夾限制。建議把這些根目錄指向專門的樂譜資料夾,而非範圍過大的目錄,以免助理讀取或覆寫無關檔案。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 MusicXML Renderer,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

render-mcp

MCP server that renders MusicXML scores to PDF or PNG images.

What it does

Takes a MusicXML document and produces print-ready PDFs or screen-ready PNG images. Uses Verovio for layout and engraving — no external tools or GUI required.

Tools

ToolDescription
render_to_pdfRender the full score to a multi-page PDF file
render_to_imageRender a single page to PNG or SVG
list_capabilitiesReturn server metadata: backend version, supported formats, available renderers
health_checkCheck whether all runtime dependencies are available and the server is ready to render scores

Installation

Quick install: run ./install.sh for one-command setup, or see SETUP.md for a non-technical walkthrough. Ready-made client configs (Claude Desktop, Cursor, Windsurf, Continue, Zed) are in examples/. If something isn't working, check TROUBLESHOOTING.md.

Manual setup:

bash
cd render-mcpuv sync

libcairo is required for PNG output:

bash
# Ubuntu / Debian (usually pre-installed on desktop systems)sudo apt install libcairo2

Running

bash
uv run render-mcp

No environment variables required.

Usage examples

json
// Render full score to PDF{  "tool": "render_to_pdf",  "arguments": {    "musicxml_path": "/path/to/score.mxl",    "output_path": "/tmp/score.pdf"  }}
// Render page 1 to PNG at 150 DPI{  "tool": "render_to_image",  "arguments": {    "musicxml_path": "/path/to/score.mxl",    "output_path": "/tmp/page1.png",    "page": 1,    "dpi": 150  }}
// Render only bars 17–24 (printed measure numbers, inclusive) to PDF{  "tool": "render_to_pdf",  "arguments": {    "musicxml_path": "/path/to/score.mxl",    "measures": [17, 24]  }}

DPI range: 72–600. Default: 150. Page numbers are 1-indexed.

measures: [start, end] (optional, both tools) renders only those printed bars; a pickup bar is 0. The cut score keeps the key, time and clef in force at start. A reversed or out-of-range measures is an INVALID_PARAMETER error whose hint names the score's first and last bars.

Give the score as musicxml_path (.musicxml, .xml or .mxl) or inline as musicxml, not both. A path must lie inside SHEET_MUSIC_OUTPUT_ROOT (default: the working directory), one of the client's roots, or a folder listed in SHEET_MUSIC_INPUT_ROOTS; output_path must lie inside SHEET_MUSIC_OUTPUT_ROOT. describe_score returns a score's parts (IDs P1 …), key, time, tempo and length without rendering it.

Testing

bash
# All tests including integration (Verovio runs in-process, no external tool needed)VIRTUAL_ENV= .venv/bin/pytest tests/ -v

Dependencies

  • verovio — MusicXML engraving to SVG (pure Python, in-process)
  • cairosvg — SVG to PNG/PDF conversion
  • pypdf — multi-page PDF assembly
  • Pillow — image utilities
  • mcp — MCP protocol

System requirements

  • Python 3.11+
  • libcairo2 shared library (for PNG/PDF output via cairosvg)

來源:render-mcp/README.md,提交 5fcea5d

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

2
  1. v0.2.2最新Oct 17, 2026
  2. v0.2.1Sep 26, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Render 整合