AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
MCP verified MIT Self-run

Mcp Printer

mcp-steveclarke-mcp-printer · by steveclarke

MCP server for printing documents on macOS/Linux via CUPS

No reviews yet
0 installs
18 views
0.0% view→install

Install

$ agentstack add mcp-steveclarke-mcp-printer

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets Used
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/mcp-steveclarke-mcp-printer)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
5mo ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Mcp Printer? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

MCP Printer Server 🖨️

An MCP server for printing documents on macOS/Linux. Provides AI assistants with the ability to print files, manage print queues, and control printers via the CUPS printing system.

Why?

In the era of AI-assisted development, we're generating more documentation, specs, guides, and code than ever before. When working with AI on complex projects, it's often valuable to review generated artifacts offline on paper. This tool makes it effortless to ask your AI assistant: "Print all the markdown files you just created" or "Print the README and all TypeScript files in this directory" — streamlining the workflow from AI generation to offline review.

  • [Features](#features)
  • [Installation](#installation)
  • [Configuration](#configuration)
  • [Available Tools](#available-tools)
  • [Available Prompts](#available-prompts)
  • [Usage Examples](#usage-examples)
  • [CUPS Options](#cups-options)
  • [Supported File Types](#supported-file-types)
  • [Code Rendering](#code-rendering)
  • [Troubleshooting](#troubleshooting)
  • [Security](#security)
  • [Development](#development)
  • [Requirements](#requirements)
  • [Contributing](#contributing)

Features

  • 📄 Print files - PDF, text, and other formats
  • 📝 Render markdown - Convert markdown to beautifully formatted PDFs
  • 📊 Mermaid diagrams - Flowcharts, sequence diagrams, and more render as visual graphics in markdown
  • 💻 Syntax-highlighted code - Automatically render code files with syntax highlighting, line numbers, and proper formatting
  • 🔍 Page count preview - Check how many pages a document will print before sending to printer (prevents accidental 200-page printouts!)
  • 🖨️ List printers - See all available printers and their status
  • 📋 Manage queue - View and cancel print jobs
  • ⚙️ Configure - Set default printers
  • 🎯 Smart - Supports multiple copies, landscape, duplex, and more

Installation

Add to your MCP configuration file (e.g., ~/.cursor/mcp.json for Cursor):

{
  "mcpServers": {
    "Printer": {
      "command": "npx",
      "args": ["-y", "mcp-printer"]
    }
  }
}

That's it! The package will be automatically downloaded from npm on first use.

> 🖥️ Platform Support: This server currently supports macOS and Linux only. Windows is not currently supported (contributions welcome!).

> 📋 Requirements: Google Chrome or Chromium is required for rendering markdown and code files to PDF. The server will auto-detect Chrome/Chromium installations on macOS/Linux. See [Requirements](#requirements) for details.

> ⚠️ Security: This server allows AI assistants to print files from allowed directories (~/Documents, ~/Downloads, ~/Desktop by default, customizable via MCP_PRINTER_ALLOWED_PATHS). Dotfiles and hidden directories are always blocked. Only use with trusted AI assistants on your local machine. See [Security](#security) for configuration options.

Configuration

All configuration is optional. Add an env object to customize behavior:

| Variable | Default | Description | | -------------------------------------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | MCP_PRINTER_DEFAULT_PRINTER | (none) | Default printer to use when none specified (falls back to system default) | | MCP_PRINTER_AUTO_DUPLEX | false | Set to "true" to automatically print double-sided by default (can be overridden per-call) | | MCP_PRINTER_DEFAULT_OPTIONS | (none) | Additional CUPS options (e.g., "fit-to-page", "landscape") | | MCP_PRINTER_CHROME_PATH | (auto-detected) | Path to Chrome/Chromium for PDF rendering (override if auto-detection fails) | | MCP_PRINTER_AUTO_RENDER_MARKDOWN | true | Automatically render markdown files (.md, .markdown) to PDF (can be overridden with force_markdown_render) | | MCP_PRINTER_AUTO_RENDER_CODE | true | Automatically render code files to PDF with syntax highlighting (can be overridden with force_code_render) | | MCP_PRINTER_ENABLE_MANAGEMENT | false | Management operations are disabled by default for security. Set to "true" to enable set_default_printer and cancel_print_job tools | | MCP_PRINTER_ENABLE_PROMPTS | true | Enable prompts (workflow templates). Set to "false" to disable prompt registration if you don't want prompts in your MCP client | | MCP_PRINTER_ALLOWED_PATHS | ~/Documents, ~/Downloads, ~/Desktop | Colon-separated paths allowed for printing. Overrides default allowed directories when set (e.g., "$HOME/Documents:$HOME/src") | | MCP_PRINTER_DENIED_PATHS | (system dirs) | Colon-separated paths denied for printing. Merged with system directory defaults like /etc, /var, etc. (e.g., "/home/user/private") | | MCP_PRINTER_FALLBACK_ON_RENDER_ERROR | false | Set to "true" to print original file if PDF rendering fails (markdown/code). When false, errors will be thrown instead | | MCP_PRINTER_MAX_COPIES | 10 | Maximum copies allowed per print job (set to 0 for unlimited) | | MCP_PRINTER_CONFIRM_IF_OVER_PAGES | 10 | If set > 0, print jobs exceeding this many physical sheets will trigger a confirmation prompt from the AI before printing. Set to 0 to disable. (PDF files only) | | MCP_PRINTER_CODE_EXCLUDE_EXTENSIONS | (none) | Extensions to exclude from code rendering (e.g., "json,yaml,html") - only applies when code rendering is enabled | | MCP_PRINTER_CODE_COLOR_SCHEME | "atom-one-light" | Syntax highlighting color scheme (see [Available Themes](#code-color-schemes)) | | MCP_PRINTER_CODE_AUTO_LINE_NUMBERS | true | Automatically show line numbers in code printouts (can be overridden per-call with the line_numbers parameter) | | MCP_PRINTER_CODE_FONT_SIZE | "10pt" | Font size for code (e.g., "8pt", "12pt") | | MCP_PRINTER_CODE_LINE_SPACING | "1.5" | Line spacing multiplier for code (e.g., "1", "1.5", "2") |

Example configuration:

{
  "mcpServers": {
    "Printer": {
      "command": "npx",
      "args": ["-y", "mcp-printer"],
      "env": {
        "MCP_PRINTER_DEFAULT_PRINTER": "HP_LaserJet_Pro",
        "MCP_PRINTER_AUTO_DUPLEX": "true",
        "MCP_PRINTER_DEFAULT_OPTIONS": "fit-to-page",
        "MCP_PRINTER_AUTO_RENDER_MARKDOWN": "true",
        "MCP_PRINTER_AUTO_RENDER_CODE": "true",
        "MCP_PRINTER_ENABLE_PROMPTS": "true",
        "MCP_PRINTER_CODE_COLOR_SCHEME": "github",
        "MCP_PRINTER_CODE_FONT_SIZE": "9pt",
        "MCP_PRINTER_ALLOWED_PATHS": "/Users/myname/Documents:/Users/myname/Downloads:/Users/myname/projects"
      }
    }
  }
}

💡 Note: The MCP_PRINTER_ALLOWED_PATHS example above replaces the default allowed directories. If you set this variable, you must explicitly include any default directories you want to keep (like Documents, Downloads, Desktop) plus any additional directories like your projects folder. Use colon-separated absolute paths (:).

💡 Tip: You can use the list_printers tool to see all available printers and their exact names.

User-specified options in prompts always override these defaults.

Available Tools

get_config

Get the current MCP Printer configuration settings. Only returns non-sensitive configuration values.

Example:

User: What are my printer settings?
AI: Current MCP Printer Configuration:

MCP_PRINTER_DEFAULT_PRINTER: HP_LaserJet_4001
MCP_PRINTER_AUTO_DUPLEX: true
MCP_PRINTER_DEFAULT_OPTIONS: (not set)
MCP_PRINTER_CHROME_PATH: (auto-detected)
MCP_PRINTER_AUTO_RENDER_MARKDOWN: true
MCP_PRINTER_AUTO_RENDER_CODE: true
MCP_PRINTER_ENABLE_MANAGEMENT: false
MCP_PRINTER_ENABLE_PROMPTS: true

list_printers

List all available printers with their status.

Example:

User: What printers do I have available?
AI: Let me check what printers you have...
→ HP_LaserJet_4001 is idle and accepting jobs
→ Canon_Pixma is disabled

print_file

Print one or more files to a specified printer. Supports batch operations to reduce tool call costs.

Parameters:

  • files (required) - Array of file specifications (use single-element array for one file):
  • file_path (required) - Full path to file
  • printer (optional) - Printer name
  • copies (optional) - Number of copies (default: 1)
  • options (optional) - CUPS options like landscape, sides=two-sided-long-edge
  • skip_confirmation (optional) - Skip page count confirmation check (bypasses MCP_PRINTER_CONFIRM_IF_OVER_PAGES threshold)
  • line_numbers (optional) - Show line numbers when rendering code files (boolean, overrides global setting)
  • color_scheme (optional) - Syntax highlighting theme for code files (e.g., github, monokai, atom-one-light)
  • font_size (optional) - Font size for code files (e.g., 8pt, 10pt, 12pt)
  • line_spacing (optional) - Line spacing for code files (e.g., 1, 1.5, 2)
  • force_markdown_render (optional) - Force markdown rendering to PDF (boolean: true=always render, false=never render, undefined=use config)
  • force_code_render (optional) - Force code rendering to PDF with syntax highlighting (boolean: true=always render, false=never render, undefined=use config)

Note: The code rendering parameters (line_numbers, color_scheme, font_size, line_spacing) only apply when printing code files that are automatically rendered to PDF with syntax highlighting.

Batch Operations: To print multiple files efficiently, pass an array of file specifications. Each file is processed independently, and the operation continues even if individual files fail. The response shows success/failure status for each file.

Batch Size Limit: Batches are limited to 50 items per operation for reliability. If you need to process more items, the AI will automatically split them into multiple tool calls.

Page Count Confirmation: By default, print jobs exceeding 10 physical sheets will trigger a confirmation prompt from the AI before printing. You can adjust this threshold with MCP_PRINTER_CONFIRM_IF_OVER_PAGES or set it to 0 to disable. If you confirm, the AI will automatically retry the print with the confirmation bypassed. This feature only works for PDF files (including auto-rendered markdown and code files).

Example (single file):

User: Print README.md to my HP LaserJet, 2 copies
AI: *prints file*
Print Results: 1/1 successful

✓ /path/to/README.md
  Printed to HP_LaserJet_4001 × 2 copies (rendered: markdown → PDF)

Example (batch):

User: Print all markdown files in docs/
AI: *prints multiple files in one tool call*
Print Results: 3/3 successful

✓ /path/to/docs/setup.md
  Printed to HP_LaserJet_4001 (rendered: markdown → PDF)

✓ /path/to/docs/guide.md
  Printed to HP_LaserJet_4001 (rendered: markdown → PDF)

✓ /path/to/docs/reference.md
  Printed to HP_LaserJet_4001 (rendered: markdown → PDF)

get_page_meta

Get page count and physical sheet information for one or more files before printing. This tool pre-renders files (markdown, code) if needed and returns page metadata. Supports batch operations.

Parameters:

  • files (required) - Array of file specifications (use single-element array for one file):
  • file_path (required) - Full path to file
  • options (optional) - CUPS options for duplex detection (e.g., sides=two-sided-long-edge)
  • line_numbers (optional) - Show line numbers when rendering code files (boolean, overrides global setting)
  • color_scheme (optional) - Syntax highlighting theme for code files
  • font_size (optional) - Font size for code files (e.g., 8pt, 10pt, 12pt)
  • line_spacing (optional) - Line spacing for code files (e.g., 1, 1.5, 2)
  • force_markdown_render (optional) - Force markdown rendering to PDF
  • force_code_render (optional) - Force code rendering to PDF with syntax highlighting

Note: Page counting only works for PDF files, including:

  • Markdown files (auto-rendered to PDF)
  • Code files with syntax highlighting (auto-rendered to PDF)
  • Existing PDF files

Plain text files, images, and other non-PDF formats cannot have their page count determined.

Batch Operations: Check page counts for multiple files in a single tool call. Each file is processed independently, and the operation continues even if individual files fail.

Batch Size Limit: Batches are limited to 50 items per operation for reliability. If you need to process more items, the AI will automatically split them into multiple tool calls.

Example (single file):

User: How many pages would README.md be?
AI: *gets page metadata*
Page Metadata Results: 1/1 successful

✓ /path/to/README.md
  32 pages (16 sheets, duplex) (rendered: markdown → PDF)

Example (batch):

User: How many pages would all the markdown files in docs/ be?
AI: *gets metadata for multiple files*
Page Metadata Results: 3/3 successful

✓ /path/to/docs/setup.md
  8 pages (4 sheets, duplex) (rendered: markdown → PDF)

✓ /path/to/docs/guide.md
  24 pages (12 sheets, duplex) (rendered: markdown → PDF)

✓ /path/to/docs/reference.md
  16 pages (8 sheets, duplex) (rendered: markdown → PDF)

Use cases:

  • Check page count before printing large documents
  • Estimate paper usage for duplex vs single-sided printing
  • Preview rendered output of markdown or code files
  • Calculate total pages across multiple documents

get_print_queue

Check the print queue for pending jobs.

Parameters:

  • printer (optional) - Specific printer to check

Example:

User: What's in my print queue?
AI: Let me check your print queue...
→ Job 123: document.pdf (active)
→ Job 124: notes.txt (pending)

cancel_print_job

Cancel one or more print jobs. Supports batch operations.

Parameters:

  • jobs (required) - Array of job cancellation specifications (use singl

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.