Document Scanner

io.github.GuardBeePublished by GitHub account GuardBeev0.4.1Updated Nov 3, 2026

Finds PII and credentials in PDFs, screenshots and scanned documents

VerifiedSTDIODesktop onlyFiles & StorageSecurity & Monitoring

Overview

AI-generated overview

Local MCP server that scans PDFs, images and text files for personal data and credentials before they are handed to an LLM.

What you can do
  • Scan a file or a folder of PDFs and images for PII and credentials, reading PDF text layers and using OCR for images and scanned pages
  • Scan document bytes supplied as base64, with the file type detected from the bytes
  • List the personal-data and credential detectors the scanner runs
  • Report findings with masked values, severity levels and page numbers
When to use it
Useful when documents, screenshots or attachments may contain identity numbers, IBANs, card numbers, e-mail addresses, phone numbers or credentials and you want them checked before the content reaches a model or leaves the machine.
Requirements
Runs locally as an npm package over stdio, typically started with npx. OCR is optional and needs tesseract.js and @napi-rs/canvas installed; Tesseract downloads Turkish and English language data on first use, or you can point it at a local language folder for offline use. No accounts, API keys or environment variables are declared.
Before you install
Findings are masked, but the scanner reads the full content of the files you point it at, so choose paths deliberately. Telemetry is off by default; setting GUARDBEE_TELEMETRY=1 sends tool names, success, duration and short parameter values such as file paths to a third party. OCR can miss digits in poor scans, and names, signatures and handwriting are not detected, so a clean result is not proof the document is safe.

Installation

In SourceWeft

  1. Open Document Scanner in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

@guardbee/mcp-document-scanner

🇬🇧 English | 🇹🇷 Türkçe

[npm version] [npm downloads] [License: MIT]

An MCP server and CLI that finds personal data and credentials inside documents — PDFs, screenshots, scanned pages — before they are handed to an LLM. Text checks in a proxy or a DLP see a PDF attachment or an image as an opaque blob; this package reads it: the PDF text layer first, and OCR (Turkish and English) for images and for PDF pages that have no text.

Telemetry is off by default. With GUARDBEE_TELEMETRY=1 it sends the server, tool, success, duration and short parameter values such as a file path; longer strings and fields like content, token or password are replaced with a placeholder. See @guardbee/mcp-telemetry.

document ──► type from the bytes (PDF, PNG, JPEG, GIF, WebP, BMP, TIFF, text)              │              ├─ PDF page with a text layer ──► text              ├─ PDF page without one ─────► render (@napi-rs/canvas) ──► OCR (tesseract.js)              └─ image ─────────────────────► OCR (tesseract.js)                                                 │                     guard-core detectors ◄──────┘  TC Kimlik No, VKN, IBAN, card (checksums),                                                    passport, SGK, MERSİS, birth date, address,                                                    e-mail, KEP, phone, 22+ credential formats

Install

bash
npx -y @guardbee/mcp-document-scanner scan ./contracts      # text layers onlynpm i -g @guardbee/mcp-document-scanner tesseract.js @napi-rs/canvas   # with OCR

OCR is optional: tesseract.js reads images, and @napi-rs/canvas (prebuilt, no compiler needed) renders scanned PDF pages for it. Without them the scanner still reads every PDF text layer and says which pages or images it could not read. Tesseract downloads the tur and eng language data (~10 MB) on first use into ~/.cache/guardbee/tessdata (or $XDG_CACHE_HOME/guardbee/tessdata) — never into your working directory. Offline: put <lang>.traineddata in a folder and pass --lang-path.

MCP tools

ToolWhat it does
scan_documentScan a file, or every PDF and image in a folder
scan_base64Scan bytes given as base64 (an attachment, an image a tool returned); the type comes from the bytes
list_detectorsThe personal-data and credential detectors that run
json
{ "mcpServers": { "documents": { "command": "npx", "args": ["-y", "@guardbee/mcp-document-scanner"] } } }

CLI

bash
guardbee-document-scanner scan <file|folder> [--format=text|json|sarif] [--fail-on=any|critical|high|medium|low|none]                               [--no-ocr] [--lang=tur,eng] [--lang-path=<dir>] [--cache-path=<dir>] [--include=ip_address,plate_tr]                               [--max-pages=50] [--max-files=500] [--text]
⚠️  Found 3 item(s) in 1 document(s) (812ms)   Critical: 0  High: 2  Medium: 1  Low: 0
contracts/acme.pdf (pdf, 2 page(s) read)  [HIGH] tc_kimlik (personal) — page 1, pdf-text: 10*******46  [HIGH] iban (personal) — page 2, pdf-ocr: TR************26  [MEDIUM] email (personal) — page 2, pdf-ocr: al***********om

Findings show only the first and last characters. --format=sarif gives SARIF 2.1.0 with the page as the line, for GitHub Code Scanning. Exit code 1 when something at or above --fail-on was found.

In the security proxy

@guardbee/mcp-security-proxy uses this package for interceptors.documents: images and embedded PDFs in tool results and resource blobs are scanned before the model sees them, and a document holding personal data or a credential is withheld (block) or logged (warn).

yaml
interceptors:  documents: { enabled: true, action: block, ocr: true, maxBytes: 26214400 }

Limits

  • The type is taken from the bytes, never from a file name or a MIME type.
  • 25 MB and 50 pages per document by default (maxBytes, --max-pages).
  • OCR quality depends on the scan; a blurry photo can miss a digit and so fail a checksum — such a value is not reported, which errs towards silence rather than false alarms.
  • Names, signatures and handwriting are not detected.

License

MIT

Feedback

Questions, ideas, or a false positive? Start a thread in GitHub Discussions or open an issue. If GuardBee is useful to you, a ⭐ on the repository helps others find it.

Source: packages/document-scanner/README.md at commit bc5997d

Tools

3

scan_document

Find PII (TC Kimlik No, IBAN, card, passport, e-mail, phone, address…) and credentials inside a PDF, an image (screenshot, scanned page) or a text file on disk, before it is given to an LLM. PDFs are read from their text layer; images and scanned pages with OCR (Turkish and English).

Parametersocrpathrequiredincludelanguages

scan_base64

Scan a document given as base64 (an attachment, an image a tool returned) for PII and credentials. The type is detected from the bytes.

Parametersocrdatarequiredlabelincludelanguages

list_detectors

List the PII and credential detectors this scanner runs

Takes no parameters.

Version history

8
  1. v0.4.1LatestOct 30, 2026
  2. v0.3.0Oct 22, 2026
  3. v0.1.10Oct 21, 2026
  4. v0.1.9Oct 20, 2026
  5. v0.1.7Oct 19, 2026
  6. v0.1.5Oct 16, 2026
  7. v0.1.4Oct 15, 2026
  8. v0.1.2Oct 14, 2026

Score

90% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts
  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts