从您的 AI 助手渲染 ZPL
OpenZPL 支持模型上下文协议。连接 Claude、Cursor 或任何 MCP 客户端,它可以将 ZPL 标签转换为 PNG 或 PDF——直接在聊天中。无需密钥,无需账户。
https://api.openzpl.com/mcp
将其添加到您的助手
该服务器是远程和无状态的,通过 HTTP 访问。以您的客户端添加远程 MCP 服务器的方式添加它:
claude mcp add --transport http openzpl https://api.openzpl.com/mcp
然后询问:“渲染这个 ZPL 并给我看标签”。
{
"mcpServers": {
"openzpl": { "url": "https://api.openzpl.com/mcp" }
}
}
将此添加到您客户的 MCP 配置中,例如 Cursor 的 ~/.cursor/mcp.json。
npx -y mcp-remote https://api.openzpl.com/mcp
对于仅运行本地(标准输入/输出)服务器的客户端,此桥接将其连接到远程端点。
它能做什么
三个仅用于渲染的工具,使用与 API 和查看器相同的引擎。它渲染您提供的 ZPL;它不会为您设计标签。
| 工具 | 它的功能 |
|---|---|
render_zpl | 将标签渲染为 PNG 图像并显示出来。 |
zpl_to_pdf | 将 ZPL 渲染为 PDF,每个标签一页。 |
preview_url | 生成一个可共享的链接,打开后在浏览器中渲染标签。 |
每个工具接受 zpl,可选 dpmm(6、8、12 或 24)、以英寸为单位的 width_in / height_in 和 rotation。
与 curl 一起尝试
该端点是普通的 JSON-RPC 2.0,因此您也可以在没有助手的情况下调用它:
curl -s https://api.openzpl.com/mcp -H 'content-type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call",
"params":{"name":"render_zpl",
"arguments":{"zpl":"^XA^FO50,50^ADN,36,20^FDHi^FS^XZ"}}}'
免费,带水印
通过 MCP 渲染是匿名和免费的,因此每个渲染在角落里都有一个小 openzpl.com · free plan 框,并计入与 API 相同的每日配额,每个 IP 地址。有关干净渲染和更高限制,请参见 pricing;MCP 上的付费计划即将推出。
问题
Do I need an API key or an account?
No. The MCP server is free and needs no account. Renders use the free plan, so they carry a small openzpl.com mark and count against the same daily allowance as the API, per IP address.
Which assistants can use it?
Any client that speaks the Model Context Protocol over HTTP, such as Claude or Cursor. Point it at https://api.openzpl.com/mcp; for a client that only runs local servers, bridge it with npx mcp-remote https://api.openzpl.com/mcp.
What can it do?
Three tools: render a label to a PNG image, render it to a PDF, or build a shareable preview link. It renders the ZPL you give it; it doesn't design the label for you.
我的 ZPL 被存储了吗?
No. The label is rendered and returned; the server doesn't keep the ZPL.