- Home
- MCP servers
- Printer
Printer
- typescript
4
GitHub Stars
typescript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"steveclarke-mcp-printer": {
"command": "npx",
"args": [
"-y",
"mcp-printer"
],
"env": {
"MCP_PRINTER_AUTO_DUPLEX": "true",
"MCP_PRINTER_CHROME_PATH": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
"MCP_PRINTER_ALLOWED_PATHS": "/Users/myname/Documents:/Users/myname/Downloads:/Users/myname/projects",
"MCP_PRINTER_CODE_FONT_SIZE": "9pt",
"MCP_PRINTER_ENABLE_PROMPTS": "true",
"MCP_PRINTER_DEFAULT_OPTIONS": "fit-to-page",
"MCP_PRINTER_DEFAULT_PRINTER": "HP_LaserJet_Pro",
"MCP_PRINTER_AUTO_RENDER_CODE": "true",
"MCP_PRINTER_CODE_COLOR_SCHEME": "github",
"MCP_PRINTER_ENABLE_MANAGEMENT": "false",
"MCP_PRINTER_AUTO_RENDER_MARKDOWN": "true"
}
}
}
}You deploy an MCP Printer Server to render and print documents from your AI assistant. It integrates with the CUPS printing system, rendering Markdown and code to PDF, optionally showing page counts, and letting you manage printers and the print queue from your AI workflow.
How to use
You control printing from your MCP client by sending print requests, checking printers and queues, and previewing page counts before printing. The server supports rendering Markdown and code to PDF, applying syntax highlighting, and honoring CUPS options like duplex and landscape. You can print single files or batches, with per-file controls for copies, rendering type, and print options.
How to install
Prerequisites before you begin are Node.js, npm (or your preferred package manager), Google Chrome or Chromium for rendering, and a working CUPS setup on macOS or Linux.
# 1) Ensure Node.js is installed (version 22+ is recommended)
node -v
npm -v
# 2) Create or locate your MCP client configuration for the Printer server
# Example placement: ~/.cursor/mcp.json
- Add the MCP Printer server configuration to your MCP client configuration. The following JSON snippet configures the server to run via npx when you start the MCP client.
{
"mcpServers": {
"Printer": {
"command": "npx",
"args": ["-y", "mcp-printer"]
}
}
}
- Install dependencies on first use. The package will be automatically downloaded from npm when the MCP client connects for the first time.
Additional startup options for local development
If you run the server locally from your development directory, you can start it with a direct Node invocation that points to the built dist index. This is useful for testing changes before publishing.
{
"mcpServers": {
"Printer": {
"command": "node",
"args": ["/absolute/path/to/mcp-printer/dist/index.js"],
"env": {
"MCP_PRINTER_DEFAULT_PRINTER": "Your_Printer_Name",
"MCP_PRINTER_AUTO_DUPLEX": "true"
}
}
}
}
Configuration and security notes
Configuration is optional. You control printer behavior with environment variables and per-call options. Default allowed print directories are your Documents, Downloads, and Desktop folders, with dotfiles and system directories blocked for safety. You can customize allowed paths and enable or disable management features as needed.
Usage examples
Print a single Markdown file and render to PDF with default Markdown rendering.
User: Print docs/guide.md
AI: *renders markdown to PDF and sends to the default printer*
Print multiple Markdown files in a batch with a single tool call.
User: Print all markdown files in docs/
AI: *prints all files in one batch operation*
Common options you can control per print
You can pass CUPS options like landscape, duplex, page ranges, paper size, and more. Use natural language in your requests and the AI will translate to appropriate CUPS options.
For per-file rendering, you can force rendering of Markdown or code regardless of automatic settings by using the relevant per-call options.
CUPS options and supported file types
The server passes through valid CUPS options such as landscape, duplex, page ranges, paper size, and multi-page layouts. It supports PDFs, plain text, images, Markdown, and code files, with special handling to render Markdown and code when configured.
Troubleshooting and notes
If a printer cannot be found, verify the name with your system printer list. Chrome/Chromium must be installed and discoverable for PDF rendering. If printing fails due to access restrictions, review allowed paths and dotfile protection. Adjust the page-count threshold carefully to avoid unexpected prompts when printing large files.
Security considerations
Printing is restricted to predefined allowed directories and dotfiles are blocked to protect sensitive data. You can enable management operations (set default printer and cancel jobs) only when you understand the implications.
Development and contributing
To develop locally, clone the MCP Printer project, install dependencies, and build. You can run a watch mode for development or a full build before testing locally.
# Setup
git clone https://github.com/steveclarke/mcp-printer.git
cd mcp-printer
pnpm install
pnpm run build
# Development
pnpm run dev
Requirements
macOS or Linux with CUPS, Node.js 22+, and Google Chrome or Chromium for rendering. Windows is not supported. Printers must be configured in your system.
Notes on usage with Prompts
Prompts provide guided workflows for common printing tasks, such as printing changed files or checking the print queue, and can be enabled or disabled per your configuration.
Available tools
get_config
Retrieve current MCP Printer configuration values that are non-sensitive.
list_printers
List all available printers and their current status.
print_file
Submit one or more files to print with per-file options like printer, copies, rendering mode, and CUPS options.
get_page_meta
Get page counts and sheet information for files before printing, with support for Markdown and code rendering.
get_print_queue
Check the current print queue for pending or active jobs.
cancel_print_job
Cancel one or more print jobs, supporting batch operations.
get_default_printer
Query the system default printer (not the MCP setting).
set_default_printer
Set a printer as the system default printer.