Official MCP Server
structocr-mcpio.github.dracula911/structocr-mcp

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.

Run via npx
npx -y structocr-mcp

Node.js 18+ · stdio MCP transport

Tool Coverage
6 Tools · 22 Endpoints

Backed by official structocr@^1.11.0 SDK

Zero Retention
7 Strict Endpoints

No file or JSON storage on sensitive KYC/PDF APIs

Pricing
200 Free · From $5

$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-mcp

VS 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-verify
4 creditsZero Retention

US & 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-extract
2 credits / pageZero Retention

Multi-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-excel
2 credits / imageZero Retention

Convert 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 endpoints
1–3 credits

Scan 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/balance
0 credits

Inspect remaining credit balance, 30-day usage summary, and active API key statistics without consuming credits.

list_supported_documentsLocal catalog (offline)
0 credits

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 / WorkflowMCP ToolCreditsZero RetentionAPI Reference
US/Canada Driver License Verify (front + back PDF417)verify_driver_license4YesDocs →
PDF Table & JSON Extraction (up to 20 pages)extract_pdf2 / pageYesDocs →
Image to Excel Table Extractionimage_to_excel2 / imageYesDocs →
US/Canada Driver License PDF417 Barcodescan_document (driver_license_pdf417)2YesDocs →
Driver License (Front)scan_document (driver_license)2—Docs →
Passport (MRZ + Visual)scan_document (passport)2—Docs →
National ID Cardscan_document (national_id)2—Docs →
Health Insurance Cardscan_document (health_card)2YesDocs →
Proof of Addressscan_document (proof_of_address)2YesDocs →
Travel Visa (MRV-A/B & eVisa)scan_document (visa)2YesDocs →
VINscan_document (vin)1—Docs →
VIN Pro (VIN + Vehicle Details)scan_document (vin_pro)2—Docs →
License Platescan_document (license_plate)1—Docs →
Vehicle Registration (Istimara, Mulkiya, Global)scan_document (vehicle_registration)2—Docs →
Auto Insurance Cardscan_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 & Freightscan_document (bill_of_lading)3—Docs →
Weighbridge Ticketscan_document (weighbridge_ticket)2—Docs →
ATM Cassettescan_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, and proof_of_address never persist uploaded files or extracted JSON.
  • Environment variables: STRUCTOCR_API_KEY (required for live API calls), optional STRUCTOCR_BASE_URL (defaults to https://api.structocr.com/v1), optional STRUCTOCR_TIMEOUT_MS (defaults to 60000).

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.