InkRelay

io.github.GauravBR由 GitHub 账号 GauravBR 发布v0.1.1更新于 Nov 1, 2026

Print PDFs, ZPL labels and ESC/POS receipts on your printers and follow print jobs via InkRelay

已验证STDIO仅桌面效率与工作流文件与存储

概览

AI 生成的概览

InkRelay MCP 让助手列出你的打印机,打印 PDF、ZPL 标签和 ESC/POS 小票,并跟踪与重打打印任务。

可以做什么
  • 查看 API 密钥所属组织、套餐、模式与用量,并列出电脑和打印机及其状态与能力
  • 从网址、base64 或本地文件打印 PDF,以及打印 ZPL、ESC/POS 等打印机语言原始数据
  • 查看、等待、列出、取消和重打打印任务,包括完整事件记录
  • 查看计费周期内的用量并读取事件流
  • 管理签名 webhook 端点(管理员权限),并更新打印机名称、实时开关和默认选项
适用场景
适合希望助手在对话中直接驱动真实打印的场景:把发票或文档按双面、份数等选项发到指定打印机,生成测试标签和小票,或排查打印任务失败的原因。
运行要求
以 stdio 方式在本地运行,通常通过 npx 启动,因此需要 Node.js。需要在 INKRELAY_API_KEY 中提供 InkRelay API 密钥,登录 InkRelay 网页应用后创建;测试密钥只能到达虚拟打印机。打印本地文件时需设置 INKRELAY_FILE_ROOT,并需要访问 InkRelay API 的网络连接。
安装前请注意
实时密钥会在纸张上打印并计入套餐用量,建议保持客户端工具审批开启。API 密钥属于机密,通过 INKRELAY_API_KEY 传入。相关工具可修改打印机设置、取消任务和创建 webhook。本地文件读取仅限 INKRELAY_FILE_ROOT,且当该路径为磁盘根目录或主目录时会被禁用。

安装

在 SourceWeft 中

  1. 打开 控制台中的 InkRelay,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

@inkrelay/mcp

MCP server for the InkRelay printing API. It lets an AI assistant list your printers and print PDFs, ZPL labels and ESC/POS receipts on printers attached to Windows, macOS and Linux computers.

Works with Claude Code, Claude Desktop, Cursor, VS Code (GitHub Copilot), OpenAI Codex, Windsurf and any client that speaks the Model Context Protocol over stdio.

Get a key

Sign in at app.inkrelay.app, open API keys and create one. Start with a test key (ir_test_...): it only reaches four virtual printers (Test A4 Laser, Test Letter Color, Test Receipt 80mm, Test Label 4x6), finishes jobs in about 3 seconds and costs nothing. A live key (ir_live_...) prints on paper.

Add it to your client

Claude Code

bash
claude mcp add-json inkrelay '{"command":"npx","args":["-y","@inkrelay/mcp"],"env":{"INKRELAY_API_KEY":"ir_test_your_key"}}'

Claude Desktop (claude_desktop_config.json), Cursor (.cursor/mcp.json) and Windsurf (~/.codeium/windsurf/mcp_config.json)

json
{  "mcpServers": {    "inkrelay": {      "command": "npx",      "args": ["-y", "@inkrelay/mcp"],      "env": { "INKRELAY_API_KEY": "ir_test_your_key" }    }  }}

VS Code (.vscode/mcp.json)

json
{  "inputs": [{ "type": "promptString", "id": "inkrelay-key", "description": "InkRelay API key", "password": true }],  "servers": {    "inkrelay": {      "type": "stdio",      "command": "npx",      "args": ["-y", "@inkrelay/mcp"],      "env": { "INKRELAY_API_KEY": "${input:inkrelay-key}" }    }  }}

OpenAI Codex (~/.codex/config.toml)

toml
[mcp_servers.inkrelay]command = "npx"args = ["-y", "@inkrelay/mcp"]env = { INKRELAY_API_KEY = "ir_test_your_key" }

Docs search is a separate hosted server at https://docs.inkrelay.app/mcp (streamable HTTP), for example:

bash
claude mcp add-json inkrelay-docs '{"type":"http","url":"https://docs.inkrelay.app/mcp"}'

Tools

ToolWhat it does
whoamiOrganization, plan, mode (test or live) and usage of the key
list_computersComputers running the agent and their state
list_printersPrinters with id, computer, online state, live switch and defaults
get_printerCapabilities: papers, trays, dpis, duplex, color, n-up
update_printerDisplay name, live switch, default options, custom paper sizes (admin scope)
print_pdfPrint a PDF from a URL, base64 or a local file; waits for the final state by default
print_rawPrint ZPL, ESC/POS or other printer language bytes from text, base64, a URL or a local file
get_print_jobA job with its state, message and full event history
wait_for_print_jobWait until a job is done, error, cancelled or expired
list_print_jobsRecent jobs, filtered by printer, computer or state
cancel_print_jobCancel a job that is still queued or sent
reprint_print_jobPrint an earlier job's stored file again
get_usageLive prints used and included this billing period
list_eventsThe event feed (the same events webhooks deliver)
list_webhooks, create_webhook, ping_webhookManage signed webhook endpoints (admin scope)

Things to try: "Which printers do I have?", "Print this invoice PDF on the A4 laser, two copies, duplex", "Print a 4x6 ZPL test label that says Order 1042", "Why did my last job fail?".

Configuration

VariableDefaultMeaning
INKRELAY_API_KEYnoneYour ir_test_ or ir_live_ key. The server starts without it and tells the model how to get one
INKRELAY_BASE_URLhttps://api.inkrelay.appOverride for a proxy
INKRELAY_FILE_ROOTthe working directoryFolder that filePath arguments must stay inside. File reads are off when this resolves to /, a drive root or the home folder (common for desktop clients), so set it there. Hidden files and folders are never read, and print_raw reads only printer files (.zpl, .epl, .prn, .pcl, .ps, .escpos, .raw, .bin, .txt)

print_pdf, print_raw and reprint_print_job send an Idempotency-Key on every job (pass your own with idempotencyKey), so a retried call never prints twice. Jobs carry source: "inkrelay-mcp". With a live key, jobs print on paper and count toward your plan, so keep tool approval on in your client.

Building printing into your own code

The MCP server is for operating printers from an assistant. To add printing to an application, use the SDKs, @inkrelay/sdk and inkrelay, and give your coding agent the inkrelay-printing skill.

Docs: https://docs.inkrelay.app/ai

Development

bash
pnpm installpnpm lint && pnpm typecheck && pnpm test && pnpm build

License

MIT

来源:mcp/README.md,提交 94633e6

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.1最新Oct 18, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分