Scans PDFs, screenshots, and scanned documents to detect PII and credentials using text layers and OCR before they are sent to an LLM.
Also known as GuardBee/guardbee-mcp, @guardbee/mcp-document-scanner
- Stars
- 2
- Tools
- 3
- Downloads, 30 days
- 3,086
- Latest version
- 0.4.1
- Last commit
- Nov 12, 2026
- License
- MIT
What is document-scanner MCP?
document-scanner scans PDFs, screenshots, and scanned documents to detect PII and credentials using text layers and OCR before they are sent to an LLM. It exposes 3 tools, such as scan_document, scan_base64, list_detectors.
Summary generated from the project's README
About document-scanner MCP server
Protecting sensitive information from being sent to large language models is the primary function of this tool. It scans PDFs, screenshots, and various image formats to identify personal data and credentials before they reach an AI client. By analyzing text layers and using OCR for scanned pages or images, it detects specific patterns like IBANs, passport numbers, email addresses, and phone numbers.
Developers can integrate this server into their local MCP setup using npx or install it via npm. It supports English and Turkish through tesseract.js and uses @napi-rs/canvas for rendering. The system identifies file types directly from bytes rather than relying on file names or MIME types. It includes specific detectors for Turkish identifiers like TC Kimlik No and MERSİS, alongside standard credential formats. Users can configure limits such as a 25 MB file size or a 50 page maximum per document to manage processing loads.
What you can do with it
- 1Automated document security auditingRun a command line scan on a directory of files to generate a SARIF report for GitHub Code Scanning.
- 2Detecting Turkish specific identifiersIdentify sensitive Turkish data such as VKN or MERSİS numbers within scanned documents.
Written from the project's README. Every use case is checked against a quote from it.
How to install document-scanner MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall document-scanner MCP in Claude Code
$ claude mcp add document-scanner -- npx -y @guardbee/mcp-document-scannerInstall document-scanner MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"document-scanner": {
"command": "npx",
"args": [
"-y",
"@guardbee/mcp-document-scanner"
]
}
}
}Install document-scanner MCP in VS Code
.vscode/mcp.json
{
"servers": {
"document-scanner": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@guardbee/mcp-document-scanner"
]
}
}
}Install document-scanner MCP in VS Code CLI
$ code --add-mcp '{"name":"document-scanner","type":"stdio","command":"npx","args":["-y","@guardbee/mcp-document-scanner"]}'Install document-scanner MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"document-scanner": {
"command": "npx",
"args": [
"-y",
"@guardbee/mcp-document-scanner"
]
}
}
}Install document-scanner MCP in Codex
$ codex mcp add document-scanner -- npx -y @guardbee/mcp-document-scannerInstall document-scanner MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.document-scanner] command = "npx" args = ["-y", "@guardbee/mcp-document-scanner"]
Install document-scanner MCP in Gemini CLI
$ gemini mcp add -s user document-scanner npx -- -y @guardbee/mcp-document-scannerInstall document-scanner MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"document-scanner": {
"command": "npx",
"args": [
"-y",
"@guardbee/mcp-document-scanner"
]
}
}
}document-scanner MCP tools 3
Detected from the READMEscan_documentscan_base64list_detectors
| scan_document | — | |
| scan_base64 | — | |
| list_detectors | — |
Automated checks
Ran Nov 13, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work
- Source repository linked and reachablePass
- Open source license (OSI)Pass
- Commit or release in the last yearPass
- Package name not close to a popular packagePass
- Remote endpoint uses HTTPSNot checked
- Destructive tools are labelledPass
- No hidden instructions to the modelPass
- No critical advisory in the package or its dependenciesPass
README
View on GitHub@guardbee/mcp-document-scanner
🇬🇧 English | 🇹🇷 Türkçe
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=1it sends the server, tool, success, duration and short parameter values such as a file path; longer strings and fields likecontent,tokenorpasswordare 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
npx -y @guardbee/mcp-document-scanner scan ./contracts # text layers only
npm 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
| Tool | What it does |
|---|---|
scan_document |
Scan a file, or every PDF and image in a folder |
scan_base64 |
Scan bytes given as base64 (an attachment, an image a tool returned); the type comes from the bytes |
list_detectors |
The personal-data and credential detectors that run |
{ "mcpServers": { "documents": { "command": "npx", "args": ["-y", "@guardbee/mcp-document-scanner"] } } }
CLI
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).
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.
document-scanner MCP questions
How do I add document-scanner MCP to Claude Code?
Run claude mcp add document-scanner -- npx -y @guardbee/mcp-document-scanner in your terminal. Add --scope user to make it available in every project.
How do I add document-scanner MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What tools does document-scanner MCP provide?
It exposes 3 tools, including scan_document, scan_base64, list_detectors.
What types of files can be scanned?
The scanner supports PDF, PNG, JPEG, GIF, WebP, BMP, TIFF, and text files.
Does the scanner require OCR to work?
No, OCR is optional. Without it, the scanner reads the PDF text layer, but it will report pages or images it could not read.
What kind of sensitive information can it detect?
It detects various personal data and credentials including IBAN, passport numbers, email addresses, phone numbers, and more.
Are there any limitations on file size or length?
By default, the scanner is limited to 25 MB and 50 pages per document.