cups-sane-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MCP_PATH | No | HTTP listener path. | /mcp |
| MCP_PORT | No | HTTP listener port (always bound to 127.0.0.1). | 8710 |
| S3_BUCKET | No | S3 bucket used for upload storage. | |
| S3_REGION | No | S3 region for upload storage. | us-east-1 |
| MCP_MAX_MB | No | Largest file accepted for printing, in MiB (uploads, links, base64). | 32 |
| MCP_PRINTER | No | Printer to use; defaults to the CUPS default printer, else the first printer. | |
| MCP_SCANNER | No | SANE device name, e.g. escl:https://192.0.2.10:443; defaults to the first device scanimage finds. | |
| MCP_SCAN_DIR | No | Directory where scans are saved. | ~/Documents/Scans |
| MCP_PRINT_URL | No | Set to 1 to enable the print_url tool. | off |
| MCP_SCAN_MODES | No | JSON map from tool names to the device's mode values; defaults to matching the device's --mode choices by name. | |
| MCP_SCAN_NOTES | No | Extra guidance for the client about your scanner's quirks. | |
| MCP_PUBLIC_HOST | No | Public hostname(s) in front of the server, comma-separated (used for Host/Origin checks). | |
| S3_ENDPOINT_URL | No | S3-compatible endpoint URL for upload storage; see examples/s3.env.example. | |
| MCP_SCAN_SOURCES | No | JSON map from tool names to the device's source values, e.g. {"adf": "ADF Front", "flatbed": "Flatbed"}. The keys become the tool's choices. | |
| S3_ACCESS_KEY_ID | No | S3 access key ID for upload storage. | |
| MCP_ALLOWED_ORIGINS | No | Extra browser origins allowed to call the server, comma-separated, e.g. https://app.example.com. | |
| MCP_PRINT_URL_HOSTS | No | Comma-separated host suffixes print_url may download from, e.g. dropboxusercontent.com,googleusercontent.com; defaults to any public host. | |
| S3_ADDRESSING_STYLE | No | S3 addressing style for upload storage. | auto |
| S3_SECRET_ACCESS_KEY | No | S3 secret access key for upload storage. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_printersA | List printers and their state. |
| printer_optionsB | Show what a printer accepts in the print tools' |
| print_queueB | Show pending print jobs. |
| cancel_jobB | Cancel a print job by id (e.g. "Office_Printer-42", from print_queue). |
| print_textA | Print plain text you write (notes, lists, a short letter). CUPS lays it out in a monospaced font. For anything formatted (headings, tables, images), make a PDF and print it with get_upload_link + print_file. Print options (all optional): copies, duplex, page_ranges ("1-3,5"), paper, quality, printer; scaling: auto (shrink only if too big), fit (fit the page, keep proportions), fill (fill the page, crop overflow), none (actual size). Usually fit for photos and screenshots, and left unset (printer default) for documents; ppi: override an image's resolution; options: other CUPS options such as {"InputSlot": "Manual", "number-up": "2"}; printer_options lists what the printer accepts. |
| print_file_dataA | Print a small file sent as base64 (only for tiny files: every byte costs tokens). Prefer get_upload_link + print_file for files, or print_text for plain text. Prints PDF, PostScript, PNG, JPEG, TIFF or plain text. Print options (all optional): copies, duplex, page_ranges ("1-3,5"), paper, quality, printer; scaling: auto (shrink only if too big), fit (fit the page, keep proportions), fill (fill the page, crop overflow), none (actual size). Usually fit for photos and screenshots, and left unset (printer default) for documents; ppi: override an image's resolution; options: other CUPS options such as {"InputSlot": "Manual", "number-up": "2"}; printer_options lists what the printer accepts. |
| print_scanA | Print a saved scan by file name (see list_scans), e.g. to make a copy. Print options (all optional): copies, duplex, page_ranges ("1-3,5"), paper, quality, printer; scaling: auto (shrink only if too big), fit (fit the page, keep proportions), fill (fill the page, crop overflow), none (actual size). Usually fit for photos and screenshots, and left unset (printer default) for documents; ppi: override an image's resolution; options: other CUPS options such as {"InputSlot": "Manual", "number-up": "2"}; printer_options lists what the printer accepts. |
| list_scan_sourcesA | Show the scanner in use, its own source and mode names, and which of them the scan tool's names (adf, flatbed, color, gray, ...) map to. scan accepts either kind of name. |
| scanA | Scan a document. Returns the saved file name and watermarked, low-quality preview images. |
| list_scansC | List saved scans, newest first. |
| get_scanA | Show a saved scan's pages as watermarked preview images (up to 5 per call, starting at first_page). upload=True also returns a 5-minute download link to the full-quality file. |
| get_upload_linkA | Get a one-time link for uploading ONE file (PDF, PostScript, PNG, JPEG, TIFF or text; up to 32 MiB). |
| list_uploadsA | List files that have been uploaded and not yet printed (they are deleted after a day). |
| print_fileA | Print a file uploaded with get_upload_link, by its id. The upload is deleted after printing unless keep=True (e.g. to print it again with different settings). Prints PDF, PostScript, PNG, JPEG, TIFF or plain text. Print options (all optional): copies, duplex, page_ranges ("1-3,5"), paper, quality, printer; scaling: auto (shrink only if too big), fit (fit the page, keep proportions), fill (fill the page, crop overflow), none (actual size). Usually fit for photos and screenshots, and left unset (printer default) for documents; ppi: override an image's resolution; options: other CUPS options such as {"InputSlot": "Manual", "number-up": "2"}; printer_options lists what the printer accepts. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 14 tools
The four print tools (print_text, print_file, print_file_data, print_scan) share nearly identical option blocks, but each description names a distinct input source and explicitly steers callers away from the weaker variants (e.g. 'prefer get_upload_link + print_file for files'). The only genuinely confusable pair is print_file vs print_file_data, which the descriptions mitigate but do not fully eliminate.
Most tools follow a clear verb_noun pattern (list_printers, cancel_job, get_scan, print_text), and the scan/print families are coherently grouped. Two outliers break the pattern: 'printer_options' uses noun-first with no verb, and 'scan' is a bare verb, plus 'print_queue' is really a listing operation.
14 tools sits squarely in the well-scoped range, and each one maps to a distinct step in the print/scan workflow: discovery, option lookup, submission, queue inspection, cancellation, and scan retrieval. Nothing appears redundant or padded.
Core lifecycle is covered: list printers, inspect capabilities, submit from four input types, view and cancel queue jobs, scan, list/retrieve scans, and manage uploads. Minor gaps remain — no hold/release or pause-printer operations, no scan deletion or cleanup, and no way to query a single job's detailed status beyond print_queue.