
jacksenechal/scan-mcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
MCP server for scanning (image capture/multipage assembly)
概要
Minimal MCP server for scanner capture (ADF/duplex/page-size), batching, and multipage assembly. - 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). Add a server entry to your MCP client configuration: - 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.
README
以下は原文 README の抜粋です。原文を見る。
scan-mcp
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_jobwithout adevice_idto auto-select a scanner and begin scanning. - Artifacts are written under
INBOX_DIRper job:job-*/page_*.tiff,doc_*.tiff,manifest.json,events.jsonl. Whencrop_carrier_sheetsis set and a carrier sheet is detected, apage_*.cropped.tiffderivative 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; setMCP_HTTP_PORTto override (for exampleMCP_HTTP_PORT=3333 scan-mcp --http). - Binds
127.0.0.1by default. SetMCP_HTTP_HOSTto expose it on other interfaces (for exampleMCP_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 --httpto launch the streamable HTTP transport when running on another machine. - CLI help:
scan-mcp --help - From source (for development):
インストール
npx -y scan-mcp