Provides direct USB printing support for Epson ESC/POS compatible thermal printers to output generated task cards, images, and diagnostic reports.
Allows generating and printing formatted task cards from markdown files, supporting headers for card titles and specific syntax for priority tasks.
Enables fetching tasks from Notion databases to generate and print task cards, supporting task properties like priority, status, and due dates, along with QR code generation.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCPOSprintPrint my Notion tasks for today with QR codes"
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.
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 libusbUbuntu/Debian:
sudo apt install libusb-1.0-0-dev
Getting Started
Install UV (if not already installed):
curl -LsSf https://astral.sh/uv/install.sh | shConfigure 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:
Default settings used:
OUTPUT_DIR:
./images(saved relative to Claude Desktop's working directory)PRINTER_NAME:
EPSON_TM_T20III-17CARD_WIDTH/HEIGHT:
580pixels (optimized for 58mm thermal printers)
Full Configuration (Advanced)
If you need to override defaults:
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 |
|
| Where generated card images are saved |
|
| Your thermal printer name |
|
| Card width in pixels |
|
| Card height in pixels |
| (none) | Your Notion integration API key |
| (none) | Your Notion tasks database ID |
|
| 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
Create a Notion integration at https://www.notion.so/my-integrations
Copy the API key to your
.envfileShare your tasks database with the integration
Copy the database ID to your
.envfile
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_cardstoolFetch Notion tasks: Use
process_notion_taskstool (with progress tracking)Print existing images: Use
print_onlytoolTest printer: Use
test_printer_connectiontoolRun diagnostics: Use
run_diagnosticstoolGet printer specs: Access
image://thermal-card-sizeresource
Markdown Format
Use
## Titlefor card headersUse
- Taskfor regular tasksUse
- *Taskfor priority tasks (marked with ā )
Development Installation (Optional)
Only needed for contributing or customization:
š§ MCP Tools
MCPOSprint provides 6 MCP tools for task card generation and printing:
Available Tools
process_static_cards- Generate cards from markdown filesParameters:
file(string),no_print(boolean)Returns: List of generated file paths
process_notion_tasks- Fetch and process Notion tasks (with progress tracking)Parameters:
no_print(boolean)Returns: List of generated file paths
Features: Real-time progress updates via Context
print_only- Print existing image files from directoryParameters:
directory(string)Returns: Success status message
test_printer_connection- Test thermal printer connectivityReturns: Connection status message
run_diagnostics- Run comprehensive system diagnosticsReturns: Detailed diagnostic information
create_sample_files- Generate sample markdown file for testingReturns: Success status message
MCP Resources
image://thermal-card-size- Thermal printer card specificationsWidth: 384 pixels (48mm at 203 DPI)
Height: Variable (200-400 pixels)
Format: PNG, monochrome
šØļø Printer Setup
Supported Printers
AI Generated List of ESC/POS Compatible Thermal Printers
EPSON: TM-T20III, TM-T88V, TM-T82, TM-T70
Star Micronics: TSP143, TSP654, TSP100
Citizen: CT-S310II, CT-S4000
Most USB thermal printers supporting ESC/POS protocol
Printer Setup via MCP Tools
Use the MCP tools to test and configure your printer:
Architecture
The MCP server is modularized into clean components:
š Troubleshooting
Common Issues
Printer not found
Use the
test_printer_connectionMCP toolUse the
run_diagnosticsMCP tool for detailed informationCheck USB connections and printer power
Notion connection fails
Use the
run_diagnosticsMCP tool to verify API configurationCheck that your API key is valid in
.envVerify database permissions in Notion
Ensure the database ID is correct
MCP Server connection issues
Verify the server is running:
uv run mcposprintCheck your MCP client configuration
Ensure the working directory path is correct
Real-time Progress Tracking
The process_notion_tasks tool provides real-time progress updates:
ā API Success: Found X tasks
Processing task 1/3: Task Name
ā Generated: ./output/file.png
ā Print Success: Task Name
This prevents client timeouts during long operations.
Development
Local Development
Running the MCP Server
License
MIT License - see LICENSE file for details.
Contributing
Fork the repository
Create a feature branch
Make your changes
Add tests if applicable
Submit a pull request
Changelog
v1.0.0 - MCPOSprint Initial Release
ā Full MCP server implementation with 6 tools
ā Real-time progress tracking with Context support
ā Async Notion task processing with timeout handling
ā Thermal printer card generation and printing
ā Static markdown card processing
ā Modular architecture with clean separation
ā Environment-based configuration
ā ESC/POS direct USB printing support
ā QR code generation for Notion tasks
ā Comprehensive error handling and diagnostics