@bestimmaa/posprint-mcp
MCP server for POS printer receipts using @bestimmaa/posprint.
The tool is intentionally named print so clients can map natural user phrasing such as "print receipt", "hard copy", or "print this out" to the same operation.
Requirements
- Node.js 20+
- A printer reachable via a CUPS URI supported by
@bestimmaa/posprint
MCP Client Configuration
Add this to your MCP client config. No separate installation step is required โ npx fetches the package on first run.
{
"mcpServers": {
"posprint": {
"command": "npx",
"args": ["-y", "@bestimmaa/posprint-mcp"]
}
}
}
Global Install (optional)
npm install -g @bestimmaa/posprint-mcp
After global installation, you can use the shorter form in your MCP client config:
{
"mcpServers": {
"posprint": {
"command": "posprint-mcp"
}
}
}
Development
npm install
npm run build
npm test
Run the local server from source:
npm run dev
Run the built server:
npm start
Tool: print
Input:
printerUri: stringmarkdown: stringmode: "preview" | "confirm"confirmationToken?: string(required whenmode="confirm")options?: { copies?: number; timeoutMs?: number }
Two-step confirmation flow
- Call
printwithmode: "preview". - Show the returned snippet to the user and ask for confirmation.
- Call
printagain withmode: "confirm"and the returnedconfirmationToken.
Preview response includes:
requiresConfirmation: trueconfirmationTokenpreview.lineCountpreview.snippetpreview.excessiveLengthWarning(present when markdown is more than 80 lines)
Confirm response shape:
{ "ok": true, "meta": { "printerUri": "...", "durationMs": 20, "printedAt": "...", "jobId": "optional" } }
Error codes:
VALIDATION_ERRORPRINTER_ERRORTIMEOUT