LABEL & RECEIPT PRINTERS / HM-PR-140
HM-PR-140 · datasheet

thermal-mcp

MCP server that turns a 58mm ESC/POS thermal receipt printer into an output device for agents: Markdown or HTML is rendered in headless Chromium, dithered to 1-bit and sent over USB, Bluetooth serial or CUPS

01 · What it does

  • Print Markdown (GFM, highlighted code, mermaid diagrams, KaTeX math, tables) as a styled ticket
  • Print custom HTML with full Chromium layout, bundled fonts and server-side QR codes
  • Return the exact 1-bit preview image before printing, so no paper is wasted
  • Report the transport and printer state
  • Serve a design guide to the agent over MCP

02 · Install

$ git clone https://github.com/EthanPany/thermal-mcp && cd thermal-mcp
$ npm install
$ npx puppeteer browsers install chrome
$ npm run smoke
$ claude mcp add --scope user thermal --env THERMAL_TRANSPORT=auto -- "$(which node)" /absolute/path/to/thermal-mcp/node_modules/tsx/dist/cli.mjs /absolute/path/to/thermal-mcp/src/index.ts
  1. 6 tools. THERMAL_TRANSPORT=auto tries USB, then Bluetooth SPP serial, then a dry run that writes PNG and ESC/POS bytes to out/
  2. Tested by the author on a Sunydog 58mm printer (USB and Bluetooth MPT-II) on macOS; any printer speaking GS v 0 raster should work
  3. Heat and density commands are opt-in because some clone firmwares misparse ESC 7. Latest release v1.0.7 (Jul 22)

Install steps taken from the project README (its recommended path first). Placeholders are the maintainer's. Not bench-tested by HardwareMCP yet.

Weekly bulletin

New hardware MCP servers, notable releases and setup notes. One email, Mondays.