UPC & EAN Barcode-to-Product Spec MCP

v1.0.0
io.github.RizkySugiharto/upc-barcode-spec-mcp Checked 2 days ago Published 6 days ago

Convert UPC/EAN/GTIN barcodes into product specs and eBay/Amazon listing drafts via MCP + x402.

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

validate_barcodes Validate Barcodes (Free)

Local, no-network GS1 barcode pre-validator ($0.00, no x402 payment). ALWAYS call this before paid lookups to filter bad scans, then route valid results to lookup_barcode_spec (1 barcode) or batch_lookup_barcodes (2–5 barcodes); does not fetch product data. Accepts 1–50 raw strings (1–32 chars each; spaces/hyphens stripped automatically), detects format (EAN-8, UPC-A, EAN-13, GTIN-14), verifies GS1 Modulo-10 check digits, and counts duplicates. Returns { summary: { total_received, valid_unique_count, invalid_count, duplicate_count }, results: [{ input, normalized, gtin14, format, valid,…

ParameterTypeDescription
barcodes *arrayList of 1 to 50 raw barcode strings (hyphens/spaces allowed) to validate locally for free.

lookup_barcode_spec Lookup Barcode Spec ($0.005 USDC)

Resolves a single UPC-A (12), EAN-13 (13), EAN-8 (8), or GTIN-14 (14) barcode via a deterministic catalog cascade (OpenFoodFacts → OpenBeautyFacts → UPCitemdb) with a warm-instance LRU cache and UPCitemdb circuit breaker. Paid: $0.005 USDC on Base via x402 PayAI, billed regardless of hit rate. Usage: call validate_barcodes (free) first to drop invalid scans; use batch_lookup_barcodes ($0.01 flat) instead for 2–5 barcodes. Parameters: barcode accepts raw scanned text (spaces/hyphens stripped; invalid check digits fail locally with no upstream call); bypass_cache (default false) reuses cac…

ParameterTypeDescription
barcode *stringSingle UPC-A (12), EAN-13 (13), EAN-8 (8), or GTIN-14 (14) barcode. Spaces and hyphens are stripped automatically.
bypass_cachebooleanOptional. Set true to skip the warm-instance in-memory LRU cache and force a fresh upstream lookup.

batch_lookup_barcodes Batch Lookup Barcodes ($0.01 USDC)

Resolves 2–5 UPC/EAN/GTIN barcodes in one call ($0.01 USDC flat on Base via x402 PayAI = $0.002/barcode at 5; billed regardless of hit rate). Usage: call validate_barcodes (free) first to filter invalid scans; use lookup_barcode_spec ($0.005) instead for a single barcode. Pipeline: deduplicates inputs, rejects invalid check digits locally with no upstream call, queries OpenFoodFacts and OpenBeautyFacts concurrently, and routes misses to UPCitemdb (capped at 2 requests/batch under circuit-breaker limits). Parameters: barcodes accepts 2–5 raw strings (spaces/hyphens stripped); bypass_cache (…

ParameterTypeDescription
barcodes *arrayArray of 2 to 5 raw UPC/EAN/GTIN barcodes (spaces/hyphens stripped and deduplicated) to look up in a single $0.01 USDC batch.
bypass_cachebooleanOptional. Set true to skip the warm-instance LRU cache and force fresh upstream lookups for all valid items in the batch.