thermal-mcp
1. Click on "Deploy Server".
2. Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
3. In the chat, type `@` followed by the MCP server name and your instructions, e.g., "\@thermal\-mcp print markdown\: \# Groceries
- Eggs - Milk"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a [step-by-step guide with screenshots](https://glama.ai/blog/2025-07-08-how-to-install-and-use-mcp-servers).thermal-mcp ๐งพ
Print beautiful HTML & Markdown on a $30 thermal receipt printer, straight from your AI agent.
thermal-mcp is an MCP server that turns any 58mm ESC/POS thermal printer into a typographic output device for LLM agents. The agent hands over Markdown or HTML; the server renders it in headless Chromium (2ร supersampled), converts it to 1-bit with quality dithering, encodes ESC/POS, and ships it to the printer over USB, Bluetooth serial, or CUPS โ wired preferred, automatically.
agent โโMCPโโโบ render (Chromium @2x) โโโบ 1-bit (Atkinson/Jarvis/Bayer + CLAHE)
โโโบ ESC/POS (heat-tuned, blank-line elision) โโโบ USB / BT / CUPSWhy it's nice
Markdown in, ticket out โ GFM plus syntax-highlighted code (monochrome scheme),
mermaiddiagrams, LaTeX math (KaTeX), task lists, tables, remote images. Three type-size tiers.Full custom HTML when the agent wants layout control: real Chromium, so flexbox/grid/SVG/emoji/web fonts all work.
Offline font library โ Geist Sans/Mono, Inter, JetBrains Mono, Space Grotesk, Lora, Playfair Display, Caveat, Noto Sans SC, plus Font Awesome icons, all bundled and loaded via
file://.Print quality obsessed โ supersampled rendering, CLAHE + unsharp photo pipeline, three dither algorithms, ESC/POS heat/density tuning (
ESC 7,DC2 #), blank-line elision, paced Bluetooth writes. Calibrated on real hardware.Exact previews โ
preview_*tools return the true 1-bit image that will print, so agents iterate without wasting paper.<img data-qr="...">becomes a scannable QR code, generated server-side.
Related MCP server: printbridge
Tools
tool | what it does |
| quick path: markdown โ house-styled ticket |
| exact 1-bit preview, no paper |
| full custom design |
| exact 1-bit preview |
| transport + printer state |
| returns the full design guide (fonts, layout, house style) โ client-agnostic, works in Claude Desktop |
mode: auto (detect photos, keep text sharp) / text / photo ยท algorithm: atkinson / jarvis / bayer ยท size: large 24px / medium 19px / small 14px.
Setup
git clone https://github.com/EthanPany/thermal-mcp && cd thermal-mcp
npm install
npx puppeteer browsers install chrome
npm run smoke # renders out/smoke.png without a printerRegister with Claude Code:
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.tsClaude Desktop (claude_desktop_config.json). Use absolute paths โ GUI
apps launch with a minimal PATH and won't find npx/tsx on their own:
"thermal": {
"command": "/absolute/path/to/node",
"args": [
"/absolute/path/to/thermal-mcp/node_modules/tsx/dist/cli.mjs",
"/absolute/path/to/thermal-mcp/src/index.ts"
],
"env": { "THERMAL_TRANSPORT": "auto" }
}Design guidance. In Claude Code, optionally install the skill so it auto-loads:
ln -s /absolute/path/to/thermal-mcp/skills/thermal-print ~/.claude/skills/thermal-printIn Claude Desktop (or any other MCP client) the skill mechanism isn't
available, but the same guidance is served over MCP by the design_guide
tool โ the agent calls it before designing. No extra setup.
Printer configuration
THERMAL_TRANSPORT=auto (default) probes in order: USB (any printer-class device) โ Bluetooth SPP serial (THERMAL_DEVICE, default /dev/cu.MPT-II) โ dry-run (writes PNG + ESC/POS bytes to out/). Or force usb / serial / lp-raw / lp-image / file.
Darkness: by default the server sends only ESC @ and uses the printer's
firmware-default darkness โ clean, no bleed. Hardware heat/density commands are
opt-in because some clone firmwares (incl. the MPT-II tested here) misparse
ESC 7 and leak a parameter byte as a stray glyph. Set these only if your
firmware honors them and you need to push darker:
env | meaning | default |
| ESC 7 n2 โ heat pulse ร10ยตs (darker); enables ESC 7 | unset |
| ESC 7 n1 โ dots per strobe = 8ร(n+1) | 3 (if ESC 7 on) |
| ESC 7 n3 โ recovery ร10ยตs (fixes fading) | 60 (if ESC 7 on) |
| DC2 # density 0โ31; enables DC2 # | unset |
| DC2 # per-line break time 0โ7 | 4 (if DC2 # on) |
| software stroke-thinning 0โ2 (0.3โ0.6 lightens fat Latin text; >0.7 breaks small/CJK text) | 0 (off) |
| max ticket height in px; taller content is truncated with a warning (roll-saver) | 12000 (~1.5m) |
| default photo algorithm | atkinson |
| Bluetooth pacing | 256 / 30 |
Tested on a Sunydog 58mm (USB 6868:0200, Bluetooth "MPT-II") on macOS. Any printer speaking GS v 0 raster should work.
License
MIT
Available Tools
6 toolsdesign_guideA
Read this FIRST before designing any thermal ticket. Returns the full design guide: the two paths (markdown vs custom HTML), type-size tiers, the bundled font/icon library, graphics helpers, house style, and layout best practices for 58mm 1-bit thermal paper. Client-agnostic (works in Claude Desktop, which does not load the Claude Code skill).
Inputs: no named parameters.
preview_htmlA
Render ticket HTML WITHOUT printing. Returns the EXACT 1-bit image that would be printed (after dithering/thresholding) โ always preview before print_html.
Inputs: html (required), mode, algorithm.
preview_markdownA
Render markdown WITHOUT printing. Returns the EXACT 1-bit image that would be printed โ preview before print_markdown.
Inputs: markdown (required), flow, size.
printer_statusB
Check printer/transport status and current configuration.
Inputs: no named parameters.
print_htmlA
Render ticket HTML and print it on the thermal printer. Preview with preview_html first.
Inputs: html (required), mode, algorithm, feed_lines.
print_markdownA
Render markdown with the built-in ticket style and print it on the thermal printer. Quick path for notes/lists/receipts; use print_html for custom design.
Inputs: markdown (required), flow, size, feed_lines.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
TDQS
Scored across 6 tools
Each tool has a distinct purpose: previewing vs printing, HTML vs Markdown, checking status, and reading the design guide. No two tools overlap in function, and the descriptions clarify the exact use case for each.
Most tools follow a clear verb_noun pattern: preview_html, print_html, preview_markdown, print_markdown. Two exceptions (printer_status, design_guide) are noun phrases, but they are still intuitive and don't create confusion.
With 6 tools, the set is well-scoped for thermal printing workflows. Each tool earns its place, covering preview, print, status, and guidance without unnecessary bloat.
The surface covers the full lifecycle: design (design_guide), validate (preview_*), execute (print_*), and monitor (printer_status). No obvious dead ends or missing essential operations for the domain.
Maintenance
Related MCP Connectors
Pay-per-use agent tools: screenshots, web to Markdown, PDF tables, OCR, UK company checks
Generate images, GIFs, videos, and PDFs from HTML, URLs, or templates โ from your AI agent.
Instant web publishing for AI agents. POST HTML, get a live URL. No account needed.
10 pay-per-call tools for AI agents: QR, screenshots, DNS, OCR, PDF, email & more. USDC on Base.
Related MCP Servers
- AlicenseAqualityDmaintenanceConnect AI agents to physical printers. Print receipts, shipping labels, and packing slips to your existing BizPrint-connected printers from Claude and other MCP clients.71MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to print documents directly on your own printer over a private network, without cloud services or open ports. Supports printing text, URLs, and files with per-person access keys, usage limits, and detailed job control.MIT
- AlicenseAqualityCmaintenanceEnables AI agents to print Markdown cards, checklists, and pictures on Phomemo M02 Pro thermal printers over Bluetooth, as well as check printer status and manage print jobs.82MIT
- AlicenseNot gradedqualityBmaintenanceA stdio MCP server that lets AI clients drive an unofficial Paperang P1 thermal printer service, exposing 13 tools for status, device scanning, connection, printing, configuration and job management. It enables text/image output and queue control through natural-language requests without touching the printer's protocol directly.1MIT