sane-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
sane-mcp
An MCP server that lets an AI assistant (any MCP client) use a scanner on your network through SANE.
Why this one?
It works for assistants that run elsewhere, such as web or mobile clients, as well as local ones:
Results the AI can see. Feeder or flatbed, multi-page PDFs or images. The client gets small watermarked previews to read and check.
No lost pages. If nobody says where the pages are, it reads every page in the feeder, or scans the glass when the feeder is empty.
Full-quality files without exposing your disk. Scans stay on your machine. When you want the actual file, that one file goes to your private S3-compatible bucket with a short-lived download link.
Works with quirky scanners. The scanner, its sources and its modes are detected automatically, with overrides for devices that name them oddly.
Related MCP server: scan-mcp
Tools
Tool | What it does |
| Scan from the feeder or the glass; returns the file name and previews |
| Saved scans: list, previews, download link |
| The scanner's sources and modes, and how the tool's names map to them |
Install
Needs Linux with SANE and a supported scanner, Python 3.11+, and the libsane development headers (or your
distro's python-sane package).
python -m venv venv && venv/bin/pip install .
venv/bin/sane-mcp # stdio, for local clients
venv/bin/sane-mcp --http # HTTP on 127.0.0.1:8711/mcpFor a local client that starts servers itself:
{
"mcpServers": {
"scanner": {
"command": "/path/to/venv/bin/sane-mcp",
"env": { "MCP_SCAN_DIR": "/home/me/Scans" }
}
}
}To run it permanently over HTTP, see examples/sane-mcp.service and "Connecting remote clients" below.
Settings (environment variables)
Variable | Default | |
|
| HTTP listener (always 127.0.0.1) |
| – | Public hostname(s) in front of it, comma-separated |
| – | Extra browser origins allowed to call it, comma-separated, e.g. |
| first scanner found | SANE device name, e.g. |
| matched by name | JSON maps from the tool's names to the scanner's own, e.g. |
| – | Extra guidance for the client about your scanner's quirks |
|
| Where scans are saved |
|
| How long download links work, in minutes (up to 10080, 7 days) |
| – , | Storage for download links; see |
If the automatic matching picks the wrong source or mode, list_scan_sources shows the scanner's own
names; scan accepts those too, or set MCP_SCAN_SOURCES / MCP_SCAN_MODES.
Connecting remote clients
Remote (web) clients need a public HTTPS URL. The server has no authentication of its own: put it
behind a reverse proxy or tunnel that does (for example an OAuth-capable proxy or a zero-trust tunnel), and
set MCP_PUBLIC_HOST to that hostname. If the client calls it from a browser page, add that page's origin
to MCP_ALLOWED_ORIGINS. To use download links, the client must be able to reach your bucket's endpoint.
Security
Run it as a dedicated user;
examples/sane-mcp.serviceshows a sandboxed systemd unit.Use a storage key limited to the one bucket, and a lifecycle rule that deletes old objects.
Download links are only made for a scan the client asks for, and the server never downloads from URLs it's given.
Known issues
Linux only.
Licence
MIT, see LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Scans remote MCP servers for protocol, security, and TLS issues; exposes scan tools via MCP.
Screenshots, PDFs, image editing, QR codes, email validation and more through one hosted MCP server.
Remote MCP server for Scanduro QR codes, scan analytics and controlled code actions.
PDF tools + QR over MCP: merge, split, rotate, text, metadata, malicious-content scan.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables scanning documents via network (eSCL) or USB (WIA/SANE) scanners, returning inline images, OCR text, or saved PDFs for Claude to read.23MIT
- AlicenseBqualityCmaintenanceEnables scanner capture via SANE on Linux, providing tools for device discovery, scan jobs with ADF/duplex support, document batching, and multipage assembly through a local MCP server.862 npm6MIT
- AlicenseNot gradedqualityBmaintenanceEnables secure local control of Anycubic Slicer Next and compatible printers, supporting slicing, 3MF/CAD operations, printer control, spool registry, and camera access through MCP tools.1MIT
- AlicenseBqualityBmaintenanceEnables MCP clients to search and read documents from a Paperless-ngx archive, with optional metadata and tag editing plus file uploads through the REST API.6312 npmMIT