receipt-mcp is a server application that exposes a tool for printing text to a receipt printer via the Model Context Protocol (MCP). It is designed to be used as an MCP server, allowing other systems (such as Claude or other MCP clients) to send print commands to a networked receipt printer.
- Receives print commands over MCP.
- Prints word-wrapped text to a receipt printer (48 characters wide).
- Automatically cuts the receipt after printing.
- Supports printing text with QR codes.
Configure your MCP client (such as Claude) to connect to the receipt-mcp server. Below is an example MCP configuration for Claude:
{
"mcpServers": {
"print": {
"command": "/path/to/receipt-mcp",
"env": {
"PRINTER_ADDR": "10.0.0.1:9100"
}
}
}
}- Replace
/path/to/receipt-mcpwith the path to thereceipt-mcpexecutable. - Set
PRINTER_ADDRto the address of your networked receipt printer.
You can also run receipt-mcp using Docker. Here's an example configuration:
{
"mcpServers": {
"print": {
"command": "docker",
"args": ["run", "--rm", "receipt-mcp"],
"env": {
"PRINTER_ADDR": "10.0.0.1:9100"
}
}
}
}Once configured, you can use the following tools from your MCP client:
print: Print text to the receipt printerprint_with_header: Print text with a bolded headerprint_with_qr: Print text with a QR code
Example usage of print_with_qr:
{
"text": "Scan this QR code to visit our website",
"qr": "https://example.com"
}The QR code will be printed below the text, and the receipt will be automatically cut after printing.