scan-mcp — minimal MCP server for scanner capture, batching, and multipage assembly

scan-mcp — minimal MCP server for scanner capture, batching, and multipage assembly

page-image-scanner•byjacksenechal

A small, typed MCP server that exposes tools for scanner device discovery and scan jobs, capturing pages through Linux SANE and assembling multipage TIFF documents.

License: Not specified•Runtime: Awaiting documentation review•Category: productivity work

WHAT IT DOES

  • •Exposes MCP tools for discovering scanners, reading device options, and managing scan jobs, including job status, cancellation, recent job listing, manifest retrieval, and event log access.
  • •Scan jobs accept ADF or duplex sources, resolutions from 50 to 1200 dpi, configurable color modes and page sizes, document break policies that split a batch by page count, and optional carrier-sheet cropping.
  • •Automatically selects a scanner, preferring ADF and duplex-capable backends and avoiding camera backends, with defaults aimed at 300 dpi and ADF/duplex when available.
  • •Runs over stdio by default to keep capture on-device, and optionally over streamable HTTP using server-sent events for streaming tool output.

BEST FOR

  • •Scanning multipage batches on an ADF or duplex scanner and splitting them into separate documents by page count.
  • •Privacy-first, single-machine setups where scanning stays on-device through the default stdio transport.
  • •Sharing a scanner attached to one machine with an agent running elsewhere on a trusted network via the HTTP transport.

ABOUT PAGE-IMAGE-SCANNER

scan-mcp — minimal MCP server for scanner capture, batching, and multipage assembly is cataloged as an MCP server attributed to jacksenechal. A small, typed MCP server that exposes tools for scanner device discovery and scan jobs, capturing pages through Linux SANE and assembling multipage TIFF documents. It is categorized under productivity work. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for scan-mcp — minimal MCP server for scanner capture, batching, and multipage assembly are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What happens if start_scan_job is called without a device_id?

It auto-selects a scanner and begins scanning with default options; supplying device_id targets a specific scanner instead.

What does scan-mcp require to run?

Node 22 and Linux SANE backends using scanimage, plus tiffcp for multipage assembly and ImageMagick convert for carrier-sheet detection and cropping, both required by preflight.

Where does scan-mcp write scanned artifacts?

Under INBOX_DIR for each job, as page TIFFs, assembled document TIFFs, manifest.json and events.jsonl.

Upstream README

View this exact version on GitHub

README.md · 685772b8bb51 · Fetched 2026-11-13 08:15:49 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

scan-mcp logo

scan-mcp

CI npm version node-current npm downloads

Minimal MCP server for scanner capture (ADF/duplex/page-size), batching, and multipage assembly.

Features

  • Small, typed MCP server exposing tools for device discovery and scan jobs
  • zod-validated inputs; the JSON Schemas in schemas/ document the contract and are contract-tested
  • Smart device selection (prefers ADF/duplex, avoids camera backends), robust defaults
  • Local-first transports: stdio by default to keep everything on-device, optional HTTP for your own network deployments

Note: This package targets Node 22 and Linux SANE backends (scanimage).

Quick Start (local stdio, default)

Add a server entry to your MCP client configuration:

{
  "mcpServers": {
    "scan": {
      "command": "npx",
      "args": [
        "-y",
        "scan-mcp"
      ],
      "env": {
        "INBOX_DIR": "~/Documents/scanned_documents/inbox"
      }
    }
  }
}
  • This invocation runs over stdio for a privacy-first, single-machine setup.
  • Call start_scan_job without a device_id to auto-select a scanner and begin scanning.
  • Artifacts are written under INBOX_DIR per job: job-*/page_*.tiff, doc_*.tiff, manifest.json, events.jsonl. When crop_carrier_sheets is set and a carrier sheet is detected, a page_*.cropped.tiff derivative is also written per affected page.

Streamable HTTP transport

Prefer to attach the scanner to another machine on your network? scan-mcp also supports the streamable HTTP transport:

scan-mcp --http
  • Default port is 3001; set MCP_HTTP_PORT to override (for example MCP_HTTP_PORT=3333 scan-mcp --http).
  • Binds 127.0.0.1 by default. Set MCP_HTTP_HOST to expose it on other interfaces (for example MCP_HTTP_HOST=:: for all, or a LAN address); the server has no authentication, so only do that on a trusted network.
  • HTTP responses use server-sent events (SSE) for streaming tool output; clients such as Claude Desktop and Windsurf support this transport.
  • There is currently no authentication; widen the bind address only on a trusted internal network.

Install

  • Run with npx: npx scan-mcp (recommended)
    • The CLI runs a quick preflight check for Node 22+ and required scanner/image tools and prints installation hints if anything is missing.
    • See recommended server config above
  • Use npx scan-mcp --http to launch the streamable HTTP transport when running on another machine.
  • CLI help: scan-mcp --help
  • From source (for development):
    • npm install
    • npm run build
  • For Cline setup, and other automated agentic installation, see llms-install.md

System Requirements

  • Linux with SANE utilities: scanimage
  • TIFF tools: tiffcp (multipage assembly) and ImageMagick convert (carrier-sheet detection and cropping); preflight requires both

Environment Variables

  • SCAN_MOCK (default: false): mock SANE calls and generate fake TIFFs for testing.
  • INBOX_DIR (default: scanned_documents/inbox): base directory for job runs and artifacts.
  • SCANIMAGE_BIN (default: scanimage): override the binary path.
  • TIFFCP_BIN / IM_CONVERT_BIN (defaults: tiffcp / convert): multipage assembly and image analysis tools.
  • SCAN_EXCLUDE_BACKENDS (CSV): backends to exclude (e.g., v4l).
  • SCAN_PREFER_BACKENDS (CSV): preferred backends (e.g., epjitsu,epson2).
  • PERSIST_LAST_USED_DEVICE (default: true): persist and lightly prefer last used device.
  • LOG_LEVEL (default: info): pino log level.
  • MCP_HTTP_PORT (default: 3001): TCP port for the HTTP transport.
  • MCP_HTTP_HOST (default: 127.0.0.1): bind address for the HTTP transport.

API

Tools

  • list_devices

    • Discover connected scanners with backend details.
    • Inputs: none.
  • get_device_options

    • Get SANE options for a specific device.
    • Inputs:
      • device_id (string): Target device identifier.
  • start_scan_job

    • Begin a scanning job; omitting device_id triggers auto-selection and default options.
    • Inputs (all optional unless noted):
      • device_id (string)
      • resolution_dpi (integer, 50–1200)
      • color_mode (Color | Gray | Lineart): color_mode defaults to Lineart (document-first); at >= 600dpi it defaults to Color, since high-dpi capture usually means artwork/photos where 1-bit destroys information. Pass color_mode explicitly to override either default; high dpi is the only signal used.
      • source (Flatbed | ADF | ADF Duplex)
      • duplex (boolean)
      • page_size (Letter | A4 | Legal | Custom)
      • custom_size_mm { width, height }
      • doc_break_policy { type (page_count | none), page_count }: split the batch into documents of page_count pages
      • output_format (string, default tiff)
      • tmp_dir (string)
      • crop_carrier_sheets (boolean, default false): detect carrier-sheet leading-edge band and write cropped page derivatives; raw pages are kept
  • get_job_status

    • Inspect job state and artifact counts.
    • Inputs:
      • job_id (string)
  • cancel_job

    • Request job cancellation; best effort during scan loops.
    • Inputs:
      • job_id (string)
  • list_jobs

    • List recent jobs from the inbox directory.
    • Inputs (optional):
      • limit (integer, max 100)
      • state (running | completed | cancelled | error | unknown)
  • get_manifest

    • Fetch a job's manifest.json.
    • Inputs:
      • job_id (string)
  • get_events

    • Retrieve a job's events.jsonl log.
    • Inputs:
      • job_id (string)

See JSON Schemas in schemas/ for input shapes. Runtime validation is zod (src/server/register.ts); the schemas document the contract and tests assert against them.

How Selection and Defaults Work

Defaults aim for 300dpi, reasonable color mode, and ADF/duplex when available. Full details on scoring and fallbacks live in docs:

  • Selection and defaults: docs/SELECTION.md

Project Layout

  • src/mcp.ts — MCP server entry and tool registration
  • src/services/* — hardware interface and job orchestration
  • schemas/ — JSON Schemas documenting the tool contracts (used by tests)
  • docs/ — architecture, conventions, and deep dives

Development

  • npm run dev (stdio MCP server), npm run dev:http (HTTP transport)
  • make verify runs lint, typecheck, and tests
  • Conventions: docs/CONVENTIONS.md and architecture in docs/BLUEPRINT.md

Roadmap

Tracking ideas and future improvements are documented in docs/ROADMAP.md.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for scan-mcp — minimal MCP server for scanner capture, batching, and multipage assembly from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/page-image-scanner)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related productivity work MCP Servers

Alternative and complementary servers in the same category

View all in productivity work →
Tuqui hosted MCP server for Odoo
tuqui-odoo-mcp-for-claude-chatgpt•tuqui-ai

Tuqui is a hosted MCP server that connects Odoo with Claude and ChatGPT so users can ask about sales, stock, customers and overdue invoices in plain language.

Repository stats unavailable
Productivity & Ops