StructOCR MCP Server
Connect Claude Desktop, Cursor, Claude Code, VS Code, Windsurf, and any MCP-compatible AI agent to all 22 StructOCR document & verification APIs — including US/Canadian front+back driver license verification, multi-page PDF table extraction, Image to Excel, passports, visas, proof of address, health cards, vehicle registrations (Istimara & Mulkiya), invoices, and bills of lading.
npx -y structocr-mcpNode.js 18+ · stdio MCP transport
Backed by official structocr@^1.11.0 SDK
No file or JSON storage on sensitive KYC/PDF APIs
$5 / 500 credits ($0.0058–$0.01/credit), never expire
Quick Setup
No global installation required. Add npx -y structocr-mcp to your MCP client with your StructOCR API key.
Claude Desktop (claude_desktop_config.json) & Cursor (.cursor/mcp.json)
{
"mcpServers": {
"structocr": {
"command": "npx",
"args": ["-y", "structocr-mcp"],
"env": {
"STRUCTOCR_API_KEY": "YOUR_API_KEY"
}
}
}
}Claude Code CLI
claude mcp add structocr \
-e STRUCTOCR_API_KEY=YOUR_API_KEY \
-- npx -y structocr-mcpVS Code (.vscode/mcp.json)
{
"servers": {
"structocr": {
"type": "stdio",
"command": "npx",
"args": ["-y", "structocr-mcp"],
"env": {
"STRUCTOCR_API_KEY": "${input:structocr-api-key}"
}
}
},
"inputs": [
{
"id": "structocr-api-key",
"type": "promptString",
"description": "StructOCR API Key",
"password": true
}
]
}Exposed MCP Tools
The server exposes 6 focused tools so agents stay within a clean tool budget while still accessing every public StructOCR endpoint.
verify_driver_licensePOST /v1/driver-license-verifyUS & Canadian front OCR + back PDF417 AAMVA barcode cross-check. Accepts front/back paths or base64 (including native iPhone HEIC) and optional min_age (1–120). Auto-refunds on HTTP 422 unreadable barcodes.
extract_pdfPOST /v1/pdf-extractMulti-page PDF and image table/JSON extraction (up to 20 pages, 10 MB). Supports mode (auto | tables | json), pages selector (e.g. 1-5), custom schema, and cross-page stitch_tables. Failed pages auto-refund.
image_to_excelPOST /v1/image-to-excelConvert spreadsheet screenshots, printed tables, or photographed forms (JPG, PNG, WebP, or PDF) into structured tables and rows ready for Excel or CSV.
scan_document19 single-document endpointsScan any of 19 single-document types via document_type enum: driver_license_pdf417, driver_license, passport, national_id, health_card, proof_of_address, visa, vin, vin_pro, license_plate, vehicle_registration, auto_insurance, invoice, receipt (standard/enhanced), container, bill_of_lading, weighbridge_ticket, atm_cassette, hin.
get_account_balanceGET /v1/account/balanceInspect remaining credit balance, 30-day usage summary, and active API key statistics without consuming credits.
list_supported_documentsLocal catalog (offline)Return all 22 supported endpoints, credit costs, zero-retention flags, and pricing summary locally — no API key required.
All 22 Supported Document & Verification Endpoints
Only successful 200 OK requests are billed. Failed pages on extract_pdf / image_to_excel and unreadable back barcodes (HTTP 422) on verify_driver_license are automatically refunded.
| Document / Workflow | MCP Tool | Credits | Zero Retention | API Reference |
|---|---|---|---|---|
| US/Canada Driver License Verify (front + back PDF417) | verify_driver_license | 4 | Yes | Docs → |
| PDF Table & JSON Extraction (up to 20 pages) | extract_pdf | 2 / page | Yes | Docs → |
| Image to Excel Table Extraction | image_to_excel | 2 / image | Yes | Docs → |
| US/Canada Driver License PDF417 Barcode | scan_document (driver_license_pdf417) | 2 | Yes | Docs → |
| Driver License (Front) | scan_document (driver_license) | 2 | — | Docs → |
| Passport (MRZ + Visual) | scan_document (passport) | 2 | — | Docs → |
| National ID Card | scan_document (national_id) | 2 | — | Docs → |
| Health Insurance Card | scan_document (health_card) | 2 | Yes | Docs → |
| Proof of Address | scan_document (proof_of_address) | 2 | Yes | Docs → |
| Travel Visa (MRV-A/B & eVisa) | scan_document (visa) | 2 | Yes | Docs → |
| VIN | scan_document (vin) | 1 | — | Docs → |
| VIN Pro (VIN + Vehicle Details) | scan_document (vin_pro) | 2 | — | Docs → |
| License Plate | scan_document (license_plate) | 1 | — | Docs → |
| Vehicle Registration (Istimara, Mulkiya, Global) | scan_document (vehicle_registration) | 2 | — | Docs → |
| Auto Insurance Card | scan_document (auto_insurance) | 2 | — | Docs → |
| Invoice (Multi-page PDF up to 5 pages) | scan_document (invoice) | 3 | — | Docs → |
| Receipt (Standard / Enhanced) | scan_document (receipt) | 1 (2 enhanced) | — | Docs → |
| Shipping Container (ISO 6346) | scan_document (container) | 1 | — | Docs → |
| Bill of Lading & Freight | scan_document (bill_of_lading) | 3 | — | Docs → |
| Weighbridge Ticket | scan_document (weighbridge_ticket) | 2 | — | Docs → |
| ATM Cassette | scan_document (atm_cassette) | 1 | — | Docs → |
| HIN (Boat Hull Number) | scan_document (hin) | 1 | — | Docs → |
Privacy, Inputs & Environment Variables
- File inputs: Local paths,
data:...;base64,...URLs, or raw base64 strings. Supports JPG, PNG, WebP, native iPhone HEIC/HEIF (on ID/DL endpoints), and PDF. - Strict Zero Data Retention:
verify_driver_license,driver_license_pdf417,extract_pdf,image_to_excel,health_card,visa, andproof_of_addressnever persist uploaded files or extracted JSON. - Environment variables:
STRUCTOCR_API_KEY(required for live API calls), optionalSTRUCTOCR_BASE_URL(defaults tohttps://api.structocr.com/v1), optionalSTRUCTOCR_TIMEOUT_MS(defaults to60000).
Frequently Asked Questions
How much does it cost to use structocr-mcp?
New StructOCR accounts receive 200 permanent free credits with no credit card required (enough for 50 full driver license front+back verifications or 100 two-credit document scans). After free credits, pay-as-you-go packs start at $5 for 500 credits ($0.0058–$0.01/credit) with no monthly subscription and non-expiring credits. Listing tools and checking balance cost 0 credits.
Which MCP clients are supported?
structocr-mcp uses standard MCP stdio transport and works out of the box with Claude Desktop, Cursor, Claude Code, VS Code, Windsurf, and any other MCP-compatible client on Node.js 18+.
Does structocr-mcp store sensitive documents or extracted fields?
All 7 zero-retention endpoints — verify_driver_license, driver_license_pdf417, extract_pdf, image_to_excel, health_card, visa, and proof_of_address — enforce strict zero data retention on the StructOCR API: source files and extracted JSON are never persisted to storage or audit logs. Traffic is encrypted in transit with TLS 1.3.
How do I pass images or PDFs to MCP tools?
Every file parameter accepts a local filesystem path (e.g., /path/to/license-back.heic or ./invoice.pdf), a data URL (data:image/jpeg;base64,...), or a raw base64 string. Native iPhone HEIC/HEIF photos are supported on driver license and ID endpoints.
Also need direct backend SDKs?
Use the official Python or Node.js SDKs with the exact same credit wallet and API key.