StructOCR

v1.0.1
io.github.dracula911/structocr-mcp Checked 1 day ago Published 2 days ago

Structured OCR & ID verification MCP: driver license PDF417 verify, PDF tables, 22 endpoints.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

verify_driver_license Verify US/Canada Driver License (Front OCR + Back PDF417)

Single-call US & Canadian driver license verification (POST /v1/driver-license-verify, 4 credits, strict Zero Data Retention). Runs back AAMVA PDF417 barcode decode first, then front OCR cross-check, Document Discriminator (DD vs. DCF), expiry, and optional minimum age check. Unreadable back barcodes return HTTP 422 with failed_side/capture_issue and automatically refund all 4 credits. Card-level consistency check only (does not query DMV registries). Supports JPG, PNG, WebP, and HEIC up to 4.5 MB each.

ParameterTypeDescription
back_file *stringLocal file path, base64 string, or data URL of the back of the driver license showing the PDF417 barcode (JPG/PNG/WebP/HEIC, max 4.5 MB).
front_file *stringLocal file path, base64 string, or data URL of the front of the driver license (JPG/PNG/WebP/HEIC, max 4.5 MB).
min_ageintegerOptional minimum age threshold to verify (1-120, e.g. 18 or 21).

extract_pdf Extract Tables, Key-Values & Custom JSON from PDF

Zero-retention general-purpose PDF and scanned document extraction (POST /v1/pdf-extract, 2 credits per succeeded page, failed pages automatically refunded). Supports PDF, JPG, PNG, and WebP up to 10 MB / 20 pages with multi-page table stitching and optional custom JSON schema.

ParameterTypeDescription
file *stringLocal file path, base64 string, or data URL of the PDF or document image (PDF/JPG/PNG/WebP, max 10 MB).
modestringExtraction mode: "auto" (tables + key-values, default), "tables" (spreadsheet tables), or "json" (key-value/schema extraction).
pagesstringOptional 1-based page range, e.g. "1-5" or "1,3,5-8".
schemaobjectOptional custom JSON schema object to guide structured extraction.
stitch_tablesbooleanWhether to stitch tables that continue across consecutive pages.

image_to_excel Extract Structured Tables from Image or Scan (Image to Excel)

Zero-retention table extraction optimized for photos, screenshots, and scanned sheets (POST /v1/image-to-excel, 2 credits per succeeded image/page, failed pages automatically refunded). Returns deterministic headers[] and rows[][] arrays ready for Excel or CSV.

ParameterTypeDescription
file *stringLocal file path, base64 string, or data URL of the table image or PDF (JPG/PNG/WebP/PDF, max 10 MB).
modestringExtraction mode: "tables" (default), "auto", or "json".
pagesstringOptional 1-based page range when submitting a multi-page PDF.
schemaobjectOptional custom JSON schema object.
stitch_tablesbooleanWhether to stitch multi-page tables.

scan_document Scan Single Document to Structured JSON

Extract schema-validated JSON from any of 19 specialized StructOCR single-document endpoints (1-3 credits depending on document type; supports JPG, PNG, WebP, HEIC, and PDF up to 4.5 MB — driver_license_pdf417 accepts JPG, PNG, WebP, HEIC). Zero Data Retention applies automatically on driver_license_pdf417, health_card, proof_of_address, and visa.

ParameterTypeDescription
document_type *stringTarget document type: driver_license_pdf417 (2cr, zero-retention), driver_license (2cr), passport (2cr), national_id (2cr), health_card (2cr, zero-retention), proof_of_address (2cr, zero-retention), v…
file *stringLocal file path, base64 string, or data URL of the document (max 4.5 MB).
accuracystringReceipt OCR only: "standard" (1 credit, default) or "enhanced" (2 credits).
response_versionstringReceipt OCR only: optional response schema version.

get_account_balance Check StructOCR Account Credit Balance

Retrieve your remaining StructOCR non-expiring credit balance, lifetime usage, and current-month API request metrics (GET /v1/account/balance, 0 credits).

list_supported_documents List Supported StructOCR Documents & Credit Pricing

List all 22 supported StructOCR document & verification endpoints with credit costs, zero-retention flags, accepted file formats, and documentation URLs (local lookup, 0 credits, no API key required).

ParameterTypeDescription
categorystringOptional category filter.
zero_retention_onlybooleanIf true, return only endpoints with strict Zero Data Retention.