Skip to main content
Glama
canon-pixma-mcp

canon-pixma-mcp

by andrejpk

canon-pixma-mcp

An MCP server that lets an AI assistant inspect and maintain a Canon PIXMA inkjet printer over your LAN: ink levels, error codes (with Canon's own explanations), page counters, settings, nozzle checks and cleaning.

No Canon driver needed. It talks to the printer directly using the same channels Canon's software uses. Built on the official @modelcontextprotocol/sdk, pure Node.js (no native modules), so it runs on Windows, macOS and Linux.

Developed and live-tested against a Canon PIXMA PRO-100 (firmware 2.001). Other PIXMA models that speak BJNP and have the "Remote UI" web page will likely work for the read-only tools.

Access levels

The server starts in read-only mode. Higher levels must be chosen explicitly, and the tools of a higher level are not even registered at a lower level, so the model can't see or call them.

Level

Flag

What it can do

🟢 read-only (default)

--access read-only

Inspect only: discover, status, errors, ink, counters, settings, raw status. Never changes the printer.

🟡 operator

--access operator

Routine, low-impact actions: blink the printer, cancel a job, print a nozzle check (1 sheet), change dry level / paper gap / paper-width detection.

🔴 danger

--access danger

Ink-hungry and experimental: head cleaning, deep cleaning, auto head alignment, platen cleaning, raw BJL commands. Each call also requires confirm: true.

Every action tool supports dryRun: true to show what it would send without doing anything. Job-starting tools refuse to run unless the printer reports idle with no errors.

Related MCP server: PrusaLink MCP

Tools

read-only

  • printer_discover: find Canon printers on all local subnets (BJNP).

  • printer_status: state, operator-call / service-call errors with Canon's text, per-tank ink.

  • printer_ink_levels: % remaining, cartridge part numbers, the printer's low/out flags.

  • printer_counters: lifetime page counts.

  • printer_info: model, firmware, network, settings.

  • printer_raw_status: undecoded Canon status fields.

  • printer_explain_error: look up a code such as 1688, 1700 or 5B00 (offline).

operator: printer_identify, printer_cancel_job, printer_nozzle_check, printer_set_custom_settings

danger: printer_head_cleaning, printer_deep_cleaning, printer_auto_head_alignment, printer_platen_cleaning, printer_send_raw_bjl

Install & configure

Requires Node.js 20+.

git clone https://github.com/andrejpk/canon-pixma-mcp.git
cd canon-pixma-mcp
npm install        # also builds dist/

Configuration (flags or environment variables):

Flag

Env

Default

--host <ip>

PIXMA_HOST

auto-discover the first Canon printer

--access <level>

PIXMA_ACCESS

read-only

Claude Code

claude mcp add pixma -- node /path/to/canon-pixma-mcp/dist/index.js --host 192.168.1.50
# or, with routine actions enabled:
claude mcp add pixma -- node /path/to/canon-pixma-mcp/dist/index.js --host 192.168.1.50 --access operator

Claude Desktop / other MCP clients

{
  "mcpServers": {
    "pixma": {
      "command": "node",
      "args": ["C:\\path\\to\\canon-pixma-mcp\\dist\\index.js", "--host", "192.168.1.50"],
      "env": { "PIXMA_ACCESS": "read-only" }
    }
  }
}

Tip: run a separate danger instance only when you actually need cleaning, rather than leaving it configured.

How it works

Channel

Port

Used for

Canon BJNP

UDP/TCP 8611

Status (Canon's internal BSCCe string: state, error codes, ink %, tank IDs), device ID, discovery, raw job data

Canon Remote UI backend

HTTP 80, /rui/*.cgi

Ink warnings, counters, settings, maintenance jobs (the same calls as the printer's web page buttons)

IPP

631

Identify-Printer (blink)

The protocol details were worked out from the printer's own web UI JavaScript, Canon's GPL Linux driver sources (cnijfilter), Canon's macOS IJ Printer Utility command tables, and SANE's BJNP code.

What it can't do (on the PRO-100)

  • Override "ink out" / unknown-cartridge errors remotely. Canon's override is physical: hold the Resume/Cancel button for ~5 seconds, which disables level detection for that tank. Canon's own utility doesn't offer an ink-detection toggle for this model, and there's no network command for it.

  • Reset the waste-ink absorber counter (errors 1700 / 5B00 / 5B01). That needs the printer's service mode and a service tool, and isn't possible over the network.

  • Change settings via BJL. The printer acknowledges BJL settings commands sent over the network but doesn't apply them. Settings changes go through the Remote UI instead.

  • Quiet mode. The Remote UI rejects the quiet-mode call on this firmware, so it isn't exposed.

Testing

npm test                               # offline: decoder + per-level tool exposure
node scripts/smoke.mjs <printer-ip>    # live, SAFE: read-only calls, blink, dry runs, no-op writes

The live smoke test never starts a cleaning or prints anything.

Security note

The printer's web interface and BJNP have no authentication. Anyone on your LAN can already do everything this server can. Consider setting an admin password in the printer's web UI.

Disclaimer

Not affiliated with Canon. Cleaning cycles use real ink and fill the printer's waste-ink absorber; use the danger level deliberately. MIT licensed.

Available Tools

7 tools
printer_countersPage countersA
Read-only

Lifetime page counts (total, plain paper vs photo/other). Copy/fax/scan counters are omitted (garbage on printer-only models).

Inputs: host.

printer_discoverDiscover Canon printersA
Read-only

Broadcast a Canon BJNP discovery on all local IPv4 subnets and list printers that answer (IP, MAC, model).

Inputs: timeoutMs.

printer_explain_errorExplain error codeA
Read-only

Look up a Canon error/support code (e.g. 1688, 1700, 5B00) in the printer's own message table. Offline.

Inputs: code (required).

printer_infoPrinter info & settingsB
Read-only

Model, firmware, network configuration and current device settings (dry level, quiet mode, power save, paper gap...).

Inputs: host.

printer_ink_levelsInk levelsA
Read-only

Per-tank ink remaining (%) with cartridge part numbers, plus the printer's own low/out warning flags.

Inputs: host.

printer_raw_statusRaw status fieldsA
Read-only

Undecoded Canon BSCCe status fields (BST, DOC, DSC, CIR, CTK, MSI, ...) for debugging.

Inputs: host.

printer_statusPrinter statusB
Read-only

Current state, any operator-call / service-call errors (with Canon's explanation), and per-tank ink levels.

Inputs: host.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 7 tools

    Disambiguation4/5

    Each tool has a reasonably distinct target (discovery, status, ink, counters, info, raw dump, error lookup). The boundary between printer_status, printer_ink_levels, and printer_info is blurred since status reportedly includes ink levels and info overlaps with device settings, but the descriptions make the intended distinctions clear enough to choose correctly. printer_raw_status vs printer_status is clearly separated by 'undecoded/debugging'.

    Naming Consistency4/5

    All seven tools share a uniform printer_ prefix and snake_case form, giving a predictable namespace. Minor inconsistency: some names are noun resources (printer_status, printer_info, printer_counters) while others are verb actions (printer_discover, printer_explain_error), but the prefix keeps them readable and grouped.

    Tool Count5/5

    Seven tools is a well-scoped set for a read-only Canon printer monitoring server. Each tool covers a distinct data facet (discovery, state, ink, counters, config, raw debug, error codes) without padding, and none feels redundant enough to drop.

    Completeness3/5

    The surface is coherent for diagnostics/monitoring but is entirely read-only: there is no print-job submission, job cancel/queue query, or maintenance action (nozzle check, cleaning, head alignment), and settings can only be read, not set. These are notable gaps for a printer domain, though agents can still accomplish all observation and error-triage tasks.

    Maintenance

    ActivityMaintained
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants to print documents directly on your own printer over a private network, without cloud services or open ports. Supports printing text, URLs, and files with per-person access keys, usage limits, and detailed job control.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI assistants to control and monitor Prusa 3D printers via local HTTP API, supporting status, job info, file operations, print start/pause/resume/stop, snapshots, and upload-and-print.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Lets an AI assistant discover the printers installed on a computer and send them PDFs, images, text, Markdown, or HTML with control over copies, page ranges, paper size, orientation, duplex, and color, then track or cancel the resulting jobs. It can run locally over stdio or be exposed remotely through a Cloudflare tunnel with password authentication.
      67 npm
      1
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI assistants to monitor and control Bambu Lab 3D printers over a local network via MQTT, including real-time status, AMS filament info, print control, and maintenance tracking. It supports guided setup, safety confirmations, read-only mode, and a built-in printer simulator.
      2
      80 npm
      MIT