SuperAPIAI Directory

scan-mcp

github.com · AI developer platforms

scan-mcp is a lightweight MCP server for scanner acquisition, providing device discovery, scan job initiation, batch scanning, and multi-page TIFF assembly capabilities. It connects to MCP clients via stdio or streamable HTTP transport, runs locally by default, and is suited to scenarios that need to expose scanning hardware capabilities to AI clients. The project requires Node 22 and a Linux SANE backend, and depends on tools such as scanimage, tiffcp, and ImageMagick convert.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux

About this tool

Purpose: scan-mcp is a minimal MCP (Model Context Protocol) server for exposing scanner acquisition capabilities to MCP clients. It supports device discovery, scan job management, ADF/duplex/page size settings, batch processing, and multi-page assembly, and can write scan outputs to a specified inbox directory.

Main capabilities: provides tools such as list_devices, get_device_options, start_scan_job, get_job_status, cancel_job, list_jobs, get_manifest, and get_events. start_scan_job can omit device_id to automatically select a scanner; it supports parameters such as resolution_dpi (50–1200), color_mode (Color/Gray/Lineart), source (Flatbed/ADF/ADF Duplex), duplex, page_size (Letter/A4/Legal/Custom), custom_size_mm, doc_break_policy, output_format (default tiff), tmp_dir, and crop_carrier_sheets. It defaults to preferring 300dpi and prioritizes ADF/duplex when available; color_mode defaults to Lineart, but defaults to Color at >=600dpi. Job outputs are written per job to INBOX_DIR, including job-/page_.tiff, doc_.tiff, manifest.json, and events.jsonl; when crop_carrier_sheets is enabled and carrier sheets are detected, page_.cropped.tiff derivative files are also written for affected pages, while the original pages are retained.

Usage: can be run via npx scan-mcp (recommended); the CLI pre-checks Node 22+ and the required scanning/image tools and prints installation hints; starting with npx scan-mcp --http enables streamable HTTP transport, default port 3001, overridable with MCP_HTTP_PORT, bound to 127.0.0.1 by default, and exposable to other interfaces with MCP_HTTP_HOST. HTTP responses use SSE streaming to output tool results, and clients such as Claude Desktop and Windsurf support this transport. Development from source is also possible: npm install, npm run build; development commands npm run dev (stdio), npm run dev:http (HTTP); make verify runs lint, type checking, and tests.

Environment variables: SCAN_MOCK (default false, simulates SANE calls and generates fake TIFFs for testing), INBOX_DIR (default scanned_documents/inbox), SCANIMAGE_BIN, TIFFCP_BIN, IM_CONVERT_BIN, SCAN_EXCLUDE_BACKENDS, SCAN_PREFER_BACKENDS, PERSIST_LAST_USED_DEVICE (default true), LOG_LEVEL (default info), MCP_HTTP_PORT (default 3001), MCP_HTTP_HOST (default 127.0.0.1).

Use cases: scenarios that need AI clients or automation agents to invoke scanners on a local machine or trusted intranet, perform batch document scanning, and generate multi-page TIFFs and job manifests.

Limitations: the target platform is Node 22 with a Linux SANE backend (scanimage); the TIFF tool tiffcp and ImageMagick convert are required, and the pre-check requires both to be present. HTTP transport currently has no authentication; only expand the bind address on trusted networks. The project provides no information on fees, pricing, or performance promises.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools