MCPOSprint MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add mcposprint -- uvx mcposprint
README.md

MCP server for ESC/POS printing over USB

MCPOSprint - MCP Server for ESC/POS Printing over USB

Hi! This escalated quickly and became a whole thing. Full disclosure, AI helped me write a lot of this code, but I've tested it pretty throughly on a mac to confirm it works.

This is a uv based MCP that lets you connect an MCP client to a usb connected ESC/POS printer. It has baked in tools for printing your tasks from notion with QR codes, and a template to print out markdown tasklists, as well as a generic print image tool you can use to print arbitrary images. I've only tested it with an EPSON_TM_T20III-17, so YMMV with other ESC/POS printers.

🚀 Installation

MCPOSprint runs directly via uvx.

Prerequisites - Install these first

  • Python 3.10+
  • UV package manager: Install from astral.sh/uv
  • Thermal printer : ESC/POS compatible USB printer
  • Notion API Token (optional): If you want to print tasks from Notion. You can see how to generate a token in Notion's docs
  • libusb for USB printer access
    • macOS: brew install libusb
    • Ubuntu/Debian: sudo apt install libusb-1.0-0-dev

Getting Started

  1. Install UV (if not already installed):

    curl -LsSf https://astral.sh/uv/install.sh | sh
    
  2. Configure Your MCP Client with MCPOSprint (see configuration section below)

🎯 MCP Client Setup

Minimal Configuration (Recommended)

You can add this to the mcp config file of whatever client you use

For most users, just configure your Notion credentials if you want them:

{
  "mcpServers": {
    "mcposprint": {
      "command": "uvx",
      "args": ["mcposprint"],
      "env": {
        "PATH": "/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin",
        "NOTION_API_KEY": "your_notion_api_key_here",
        "TASKS_DATABASE_ID": "your_database_id_here"
      }
    }
  }
}

Default settings used:

  • OUTPUT_DIR: ./images (saved relative to Claude Desktop's working directory)
  • PRINTER_NAME: EPSON_TM_T20III-17
  • CARD_WIDTH/HEIGHT: 580 pixels (optimized for 58mm thermal printers)
Full Configuration (Advanced)

If you need to override defaults:

{
  "mcpServers": {
    "mcposprint": {
      "command": "uvx", 
      "args": ["mcposprint"],
      "env": {
        "PATH": "/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin",
        "OUTPUT_DIR": "./my-custom-images",
        "PRINTER_NAME": "YOUR_PRINTER_NAME",
        "CARD_WIDTH": "580",
        "CARD_HEIGHT": "580", 
        "NOTION_API_KEY": "your_notion_api_key_here",
        "TASKS_DATABASE_ID": "your_database_id_here",
        "DEBUG": "false"
      }
    }
  }
}

Configuration Notes:

  • PATH: Adjust for your system (macOS Homebrew path shown)
  • OUTPUT_DIR: Where images are saved (relative to Claude Desktop's working directory)
  • PRINTER_NAME: Use your actual thermal printer name
  • Notion credentials: Optional - only needed for Notion integration

Available Environment Variables

Variable Default Description
OUTPUT_DIR ./images Where generated card images are saved
PRINTER_NAME EPSON_TM_T20III-17 Your thermal printer name
CARD_WIDTH 580 Card width in pixels
CARD_HEIGHT 580 Card height in pixels
NOTION_API_KEY (none) Your Notion integration API key
TASKS_DATABASE_ID (none) Your Notion tasks database ID
DEBUG false Enable debug logging

Output Directory

Generated card images are saved to the OUTPUT_DIR (default: ./images) relative to Claude Desktop's working directory. The directory is created automatically if it doesn't exist.

Notion Setup

  1. Create a Notion integration at https://www.notion.so/my-integrations
  2. Copy the API key to your .env file
  3. Share your tasks database with the integration
  4. Copy the database ID to your .env file

Database should have these properties:

  • Name or Task (title)
  • Due Date (date)
  • Priority (select: High, Medium, Low)
  • Status (status: Not Started, In Progress, Done)
  • Description (rich text, optional)

Usage with MCP Clients

Once connected, you can use these tools in your MCP client:

  • Generate cards from markdown: Use process_static_cards tool
  • Fetch Notion tasks: Use process_notion_tasks tool (with progress tracking)
  • Print existing images: Use print_only tool
  • Test printer: Use test_printer_connection tool
  • Run diagnostics: Use run_diagnostics tool
  • Get printer specs: Access image://thermal-card-size resource

Markdown Format

## Morning Routine
- *Get dressed
- Brush teeth
- Make coffee
- Check calendar

## Work Tasks
- *Review emails
- Update project status
- *Prepare for 2pm meeting
- Submit timesheet
  • Use ## Title for card headers
  • Use - Task for regular tasks
  • U

Tools (5)

process_static_cardsGenerate and print cards from markdown input
process_notion_tasksFetch tasks from Notion and print them with QR codes
print_onlyPrint existing images to the thermal printer
test_printer_connectionVerify the connection to the thermal printer
run_diagnosticsRun diagnostic checks on the printer setup

Environment Variables

OUTPUT_DIRWhere generated card images are saved
PRINTER_NAMEYour thermal printer name
CARD_WIDTHCard width in pixels
CARD_HEIGHTCard height in pixels
NOTION_API_KEYYour Notion integration API key
TASKS_DATABASE_IDYour Notion tasks database ID
DEBUGEnable debug logging

Configuration

claude_desktop_config.json
{
  "mcpServers": {
    "mcposprint": {
      "command": "uvx",
      "args": ["mcposprint"],
      "env": {
        "PATH": "/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin",
        "NOTION_API_KEY": "your_notion_api_key_here",
        "TASKS_DATABASE_ID": "your_database_id_here"
      }
    }
  }
}

Try it

Print my tasks from Notion as physical cards with QR codes.
Generate a physical task list from this markdown: ## Morning Routine - Brush teeth - Make coffee.
Run a diagnostic check on my thermal printer to ensure it is connected.
Print the image located at ./images/my-card.png to my thermal printer.

Frequently Asked Questions

What are the key features of MCPOSprint?

Direct printing to ESC/POS compatible USB thermal printers. Automated generation of physical cards from markdown task lists. Integration with Notion to fetch and print tasks with QR codes. Built-in printer diagnostics and connection testing. Customizable card dimensions optimized for 58mm thermal paper.

What can I use MCPOSprint for?

Printing daily task lists from Notion for physical tracking. Creating physical reminders or checklists from markdown notes. Generating QR-coded task cards for offline reference. Automating physical printouts of arbitrary images via AI.

How do I install MCPOSprint?

Install MCPOSprint by running: uvx mcposprint

What MCP clients work with MCPOSprint?

MCPOSprint works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep MCPOSprint docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare