LLMに送信される前に、PDF、スクリーンショット、スキャンされたドキュメントをスキャンし、テキストレイヤーとOCRを使用してPII(個人識別情報)や認証情報を検出します。
別名 GuardBee/guardbee-mcp, @guardbee/mcp-document-scanner
- スター
- 2
- ツール
- 3
- ダウンロード数(30日間)
- 3,086
- 最新バージョン
- 0.4.1
- 最終コミット
- 2026年11月12日
- ライセンス
- MIT
document-scanner MCPとは
document-scannerはMCPサーバーです。 LLMに送信される前に、PDF、スクリーンショット、スキャンされたドキュメントをスキャンし、テキストレイヤーとOCRを使用してPII(個人識別情報)や認証情報を検出します。. 3個のツールを提供しており、scan_document, scan_base64, list_detectorsなどがあります。
プロジェクトのREADMEから生成された概要
document-scanner MCP server について
このツールの主な機能は、機密情報が大規模言語モデルに送信されるのを防ぐことです。PDF、スクリーンショット、およびさまざまな画像形式をスキャンし、AIクライアントに届く前に個人データや認証情報を特定します。テキストレイヤーの分析や、スキャンされたページ・画像に対するOCRの使用により、IBAN、パスポート番号、メールアドレス、電話番号などの特定のパターンを検出します。
開発者は、npxを使用してローカルのMCP環境にこのサーバーを統合するか、npm経由でインストールできます。tesseract.jsを通じて英語とトルコ語をサポートしており、レンダリングには@napi-rs/canvasを使用します。システムは、ファイル名やMIMEタイプに依存せず、バイトデータから直接ファイル形式を識別します。標準的な認証情報の形式に加え、TC Kimlik NoやMERSİSといったトルコ特有の識別子を検出する専用のデテクターが含まれています。ユーザーは、処理負荷を管理するために、ファイルサイズ25 MBやドキュメントあたり最大50ページといった制限を設定できます。
できること
- 1ドキュメントセキュリティ監査の自動化ファイルディレクトリに対してコマンドラインスキャンを実行し、GitHub Code Scanning用のSARIFレポートを生成します。
- 2トルコ特有の識別子の検出スキャンされたドキュメント内のVKNやMERSİS番号などの機密性の高いトルコデータを特定します。
プロジェクトの README から作成されています。すべてのユースケースは、その引用と照らし合わせて確認されています。
document-scanner MCPのインストール方法
フォーマット検証日 2026年11月10日Cursor に追加Gooseに追加Claude Codeにdocument-scanner MCPをインストール
$ claude mcp add document-scanner -- npx -y @guardbee/mcp-document-scannerCursorにdocument-scanner MCPをインストール
~/.cursor/mcp.json
{
"mcpServers": {
"document-scanner": {
"command": "npx",
"args": [
"-y",
"@guardbee/mcp-document-scanner"
]
}
}
}VS Codeにdocument-scanner MCPをインストール
.vscode/mcp.json
{
"servers": {
"document-scanner": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@guardbee/mcp-document-scanner"
]
}
}
}VS Code CLIにdocument-scanner MCPをインストール
$ code --add-mcp '{"name":"document-scanner","type":"stdio","command":"npx","args":["-y","@guardbee/mcp-document-scanner"]}'Claude Desktopにdocument-scanner MCPをインストール
claude_desktop_config.json
{
"mcpServers": {
"document-scanner": {
"command": "npx",
"args": [
"-y",
"@guardbee/mcp-document-scanner"
]
}
}
}Codexにdocument-scanner MCPをインストール
$ codex mcp add document-scanner -- npx -y @guardbee/mcp-document-scannerCodex config.tomlにdocument-scanner MCPをインストール
~/.codex/config.toml
[mcp_servers.document-scanner] command = "npx" args = ["-y", "@guardbee/mcp-document-scanner"]
Gemini CLIにdocument-scanner MCPをインストール
$ gemini mcp add -s user document-scanner npx -- -y @guardbee/mcp-document-scannerGemini settings.jsonにdocument-scanner MCPをインストール
~/.gemini/settings.json
{
"mcpServers": {
"document-scanner": {
"command": "npx",
"args": [
"-y",
"@guardbee/mcp-document-scanner"
]
}
}
}document-scanner MCPツール 3
READMEから検出scan_documentscan_base64list_detectors
| scan_document | — | |
| scan_base64 | — | |
| list_detectors | — |
自動チェック
実行日 2026年11月13日完全なレポート →自動チェックに合格しました。これはセキュリティ監査ではありません。コードを読み、サーバーに必要最小限のアクセス権を与えてください。 チェックの仕組み
- ソースリポジトリがリンクされており、アクセス可能合格
- オープンソースライセンス (OSI)合格
- 過去1年以内にコミットまたはリリースあり合格
- パッケージ名が有名なパッケージに酷似していない合格
- リモートエンドポイントがHTTPSを使用未チェック
- 破壊的なツールがラベル付けされている合格
- モデルへの隠れた指示がない合格
- パッケージおよびその依存関係に重大な勧告なし合格
README
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のよくある質問
document-scanner MCPをClaude Codeに追加するには
ターミナルでclaude mcp add document-scanner -- npx -y @guardbee/mcp-document-scannerを実行します。すべてのプロジェクトで利用するには--scope userを追加します。
document-scanner MCPをCursorに追加するには
~/.cursor/mcp.jsonを開き、上記のインストールセクションに示すCursor設定を使ってmcpServersの下にサーバーを追加します。
document-scanner MCPが提供するツールは
3個のツールを提供しており、scan_document, scan_base64, list_detectorsなどがあります。
どのようなファイル形式をスキャンできますか?
PDF、PNG、JPEG、GIF、WebP、BMP、TIFF、およびテキストファイルをサポートしています。
スキャンにはOCRが必要ですか?
いいえ、OCRはオプションです。OCRを使用しない場合、スキャナーはPDFのテキストレイヤーを読み取りますが、読み取れなかったページや画像については報告されます。
どのような機密情報を検出できますか?
IBAN、パスポート番号、メールアドレス、電話番号など、さまざまな個人データや認証情報を検出します。
ファイルサイズやページ数に制限はありますか?
デフォルトでは、1ファイルあたり25 MB、1ドキュメントあたり50ページまでに制限されています。