npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

lan-mcp-cups

v1.1.0

Published

MCP server for printing to CUPS network printers via streamable HTTP. Discover printers, add them locally, and send print jobs from Claude Code or other MCP clients.

Readme

LAN MCP CUPS

LAN MCP CUPS

An MCP server for printing to CUPS network printers via streamable HTTP. Discover printers on a network print server, add them to your local system, and send print jobs directly from Claude Code or other MCP clients.

Transport Modes

  • HTTP (default): Runs as an HTTP server at http://127.0.0.1:3000/mcp
  • Stdio (legacy): For clients that spawn the process directly

Use Cases

1. Printer Discovery & Setup

"I just set up my laptop on the network. There's a print server somewhere - help me find the printers and add them."

2. Print from Context

"There's a PDF in this repo - print it on the laser printer."

Installation

Using npx (Recommended)

The easiest way to use LAN MCP CUPS is via npx, which runs the package directly without global installation:

npx lan-mcp-cups

With a CUPS server configured:

MCP_CUPS_SERVER=print-server.local npx lan-mcp-cups

Using npm

For a permanent global installation:

npm install -g lan-mcp-cups

Then run:

lan-mcp-cups

Or with environment variable:

MCP_CUPS_SERVER=print-server.local lan-mcp-cups

Claude Code Configuration

Streamable HTTP (Recommended)

Start the server first:

MCP_CUPS_SERVER=print-server.local npx lan-mcp-cups

Then add to your Claude Code settings (~/.claude/settings.json):

{
  "mcpServers": {
    "cups": {
      "url": "http://127.0.0.1:3000/mcp"
    }
  }
}

Stdio Mode (Legacy)

For clients that don't support HTTP transport:

{
  "mcpServers": {
    "cups": {
      "command": "npx",
      "args": ["lan-mcp-cups"],
      "env": {
        "MCP_CUPS_SERVER": "print-server.local",
        "MCP_CUPS_TRANSPORT": "stdio"
      }
    }
  }
}

Replace print-server.local with your CUPS server hostname or IP address.

Environment Variables

CUPS Configuration

| Variable | Default | Description | |----------|---------|-------------| | MCP_CUPS_SERVER | (none) | CUPS server hostname or IP (required for network printing) | | MCP_CUPS_PORT | 631 | CUPS server port | | MCP_CUPS_DEFAULT_PRINTER | (none) | Default printer name | | MCP_CUPS_MAX_COPIES | 10 | Maximum copies per job (0 = unlimited) |

Transport Configuration

| Variable | Default | Description | |----------|---------|-------------| | MCP_CUPS_TRANSPORT | http | Transport mode: http or stdio | | MCP_CUPS_HTTP_HOST | 127.0.0.1 | HTTP server bind address | | MCP_CUPS_HTTP_PORT | 3000 | HTTP server port |

Tools

list_printers

List all printers available on the CUPS server.

User: What printers are available?
AI: [calls list_printers]

Printers on print-server.local:

printer HP_LaserJet is idle.
printer Brother_Color is idle.
system default destination: HP_LaserJet

print_file

Print a local file to a printer on the CUPS server.

Parameters:

  • file_path (required) - Path to the file to print
  • printer (optional) - Printer name
  • copies (optional) - Number of copies
  • options (optional) - CUPS options like landscape, sides=two-sided-long-edge
User: Print the README.pdf on the laser printer
AI: [calls print_file with file_path="README.pdf", printer="HP_LaserJet"]

✓ Sent to HP_LaserJet
  File: README.pdf

add_printer

Add a network printer from the CUPS server to your local system. Makes it available for regular printing from any application.

Parameters:

  • printer_name (required) - Name of the printer on the remote server
  • local_name (optional) - Local name for the printer
  • set_default (optional) - Set as system default
User: Add the Brother printer and make it my default
AI: [calls add_printer with printer_name="Brother_Color", set_default=true]

✓ Added printer "Brother_Color"
  URI: ipp://print-server.local/printers/Brother_Color
  Set as default printer

Common CUPS Options

Pass these in the options parameter:

  • landscape - Landscape orientation
  • sides=two-sided-long-edge - Duplex (long edge binding)
  • sides=two-sided-short-edge - Duplex (short edge binding)
  • media=A4 or media=Letter - Paper size
  • page-ranges=1-5 - Print specific pages
  • fit-to-page - Scale to fit
  • number-up=2 - Multiple pages per sheet

Requirements

  • Linux or macOS with CUPS installed
  • Network access to a CUPS print server
  • Node.js 18+

Troubleshooting

"No printers found"

  • Check MCP_CUPS_SERVER is set correctly
  • Verify the server is reachable: lpstat -h print-server.local -p

"Permission denied" when adding printers

  • Add your user to the lpadmin group: sudo usermod -aG lpadmin $USER
  • Log out and back in for group changes to take effect

Printer not accepting jobs

  • Check printer status on the server
  • The printer may be paused or have errors

License

MIT

Author

Daniel Rosehill