Skip to content

alpozcan/PrivaScan

Repository files navigation

PrivaScan

Privacy-first document intelligence for Claude. OCR, barcode reading, document scanning, image classification, and face detection — all processed on-device using Apple Vision. Nothing ever leaves your Mac.

PrivaScan demo — privacy audit of sensitive documents

Why PrivaScan?

Most document processing tools send your files to the cloud. PrivaScan runs entirely on your machine using Apple's Vision framework. Your medical bills, contracts, tax forms, and personal documents stay private.

  • On-device OCR — Text recognition powered by Apple Vision, no network calls
  • Document detection — Automatically finds and crops documents in photos
  • PDF extraction — Page-by-page text extraction with language support
  • Barcode/QR reading — Decode any barcode type from images
  • Image classification — Identify document types before processing
  • Face detection — Find faces for PII redaction (detection only, no recognition)

Requirements

  • macOS 14.0+
  • Swift 6.0+ / Xcode 16+

Install

Claude Marketplace

claude install alpozcan/PrivaScan

Build from source

git clone https://github.com/alpozcan/PrivaScan.git
cd PrivaScan
swift build -c release

The binary will be at .build/release/PrivaScan.

Setup

Claude Code

Add to your MCP config (~/.claude.json):

{
  "mcpServers": {
    "privascan": {
      "command": "/path/to/PrivaScan/.build/release/PrivaScan"
    }
  }
}

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "privascan": {
      "command": "/path/to/PrivaScan/.build/release/PrivaScan"
    }
  }
}

Tools

recognize_text

Extract text from an image using on-device OCR.

Parameter Type Required Description
file_path string yes Absolute path to image file
languages string[] no Recognition languages (default: ["en-US"])

Supported formats: PNG, JPEG, TIFF, HEIC

scan_document

Detect document regions in a photo, crop, and OCR.

Parameter Type Required Description
file_path string yes Absolute path to image file
languages string[] no Recognition languages

extract_pdf_text

Extract text from PDF pages using on-device OCR.

Parameter Type Required Description
file_path string yes Absolute path to PDF file
pages string no Page range (e.g. "1-5", "1,3,7")
languages string[] no Recognition languages

read_barcodes

Detect and decode barcodes and QR codes.

Parameter Type Required Description
file_path string yes Absolute path to image file

Supported types: QR, EAN-13, EAN-8, Code 128, Code 39, UPC-E, PDF417, Aztec, Data Matrix

classify_image

Classify an image using Apple's built-in Vision model.

Parameter Type Required Description
file_path string yes Absolute path to image file
max_results integer no Max results to return (default: 5)

detect_faces

Detect faces and return bounding boxes. Useful for identifying PII in documents like IDs or passports. Detection only — no face recognition.

Parameter Type Required Description
file_path string yes Absolute path to image file

Try It

The demo/ folder includes realistic sample documents (medical form, W-2, employment contract, bank statement) for a privacy audit scenario. After setup, try:

Scan all files in demo/ for personal information. Cross-reference what you find across documents and give me a privacy risk report.

See demo/DEMO.md for more prompts.

Privacy

PrivaScan processes everything locally using Apple's Vision framework. No data is sent to any server for OCR, classification, or detection. The only data that leaves your machine is the extracted text that gets passed back to Claude through the MCP protocol — never the original images or documents.

License

MIT

About

Privacy-first document intelligence for Claude — OCR, PDF extraction, barcode reading, face detection. All on-device via Apple Vision. Nothing leaves your Mac.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors