lilypond-mcp
lilypond-mcp
MCP 服务器,将 GNU Lilypond 源码排版为可直接放置的资源:裁剪后的、自包含的 EPS、PDF、SVG 与 PNG,尺寸以音乐本身为准,而不是编辑整页——可直接放入 InDesign 等页面排版软件中。
工具
engrave_file—— 排版一个.ly文件。默认输出build/中裁剪后的 EPS,同时生成一张预览 PNG 供 agent 查看,以验证结果。engrave_code—— 排版内联传入的 LilyPond 代码,用于在不动磁盘的情况下迭代音乐创意。默认输出 PNG。lilypond_version—— 服务器所用排版引擎的 LilyPond 版本,用于挑选正确的\version头部。
两个排版工具均接受 formats(eps/pdf/svg/png)、crop、include_dirs(用于共享的 \include 库)以及 output_dir。路径按服务器启动时所在工作目录解析——对于 Claude Code 的 .mcp.json 条目而言,该目录即项目根目录。
失败时,返回的结果会携带 LilyPond 的诊断信息(包括行号),因此 agent 可以修复源码并重试。
本服务器吸收的 LilyPond 2.26 怪癖
EPS 仅作为
ps后端的裁剪输出存在(-dbackend=eps已移除);未请求crop的 EPS 会一开始就提前拒绝。SVG 有独立的后端并作为第二次 passed 布而行贴;字形以轮廓(outlines)形式输出,因此查看或导入时无需安装任何字体。
裁剪后的输出(
NAME.cropped.EXT)会被重命名并覆盖普通文件名,多余的中间产物会被清理。lilypond -o会改变当前工作目录,因此 include 路径会在调用前先转为绝对路径。
运行
服务器要求在 PATH 中提供 node(≥20)和 lilypond。借助根自带的 Nix flake 同时提供这两者时,使用方项目的 .mcp.json 如下:
{
"mcpServers": {
"lilypond": {
"command": "nix",
"args": [
"develop", "../lilypond-mcp",
"--command", "node", "../lilypond-mcp/dist/index.js"
]
}
}
}开发
direnv allow # or: nix develop
npm install
npm run build # tsc → dist/
npm test # vitest; engraves real snippets, needs lilypond on PATH许可
MIT。服务器将采用 GPL 许可的排版引擎(LilyPond、Ghostscript)作为独立程程序进行编排——关于该安排的分析以及保持边界清晰的设计规则,请参阅 LICENSING.md。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Render HTML, Markdown, or URLs to images, PDF, or branded artifacts; extract and watch pages.
Markdown in, any format out. PDFs merged, split, watermarked. Runs on our own doc engines.
Turn HTML or Markdown into a clean, styled PDF and get a download link.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/wspringer/lilypond-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server