veridigit
Validates Discover card numbers using Luhn checksum and length rules, and detects the brand from the BIN.
Validates JCB card numbers using Luhn checksum and length rules, and detects the brand from the BIN.
Validates Mastercard card numbers using Luhn checksum and length rules, and detects the brand from the BIN.
Validates Visa card numbers using Luhn checksum and length rules, and detects the brand from the BIN.
veridigit
Verified validation of structured identifiers for AI agents — checksums, not guesses.
LLMs cheerfully accept malformed IBANs, mistype card check digits, invent ISBN and VIN
check digits, and guess a card's brand wrong. veridigit gives an agent a deterministic,
authoritative answer instead: it runs the real checksum algorithms and returns structured
results with the parsed parts and clear error reasons.
It ships as both an MCP server (for agents to call live) and a typed TypeScript library (for apps to import).
Supported in v1:
IBAN — ISO 7064 mod-97 checksum + country-specific length, for 75+ countries.
Payment cards — Luhn (ISO/IEC 7812) checksum, brand detection from the BIN (Visa, Mastercard, Amex, Discover, Diners, JCB, UnionPay), and length rules.
ISBN-13 — 978/979 prefix and mod-10 weighted check digit.
VIN — ISO 3779 alphabet (no I/O/Q) and the position-9 transliteration check digit.
Why
On 32 randomly generated, non-memorised identifiers, a frontier model with no tool got the
check digit wrong 91% of the time — IBAN 100%, VIN 100%, ISBN-13 88%, card/Luhn 75% —
versus 0% for veridigit. The failure is invisible: the model returns a confident,
well-formatted answer that happens to be wrong. veridigit replaces the guess with the
algorithm.
Benchmark and reproducible harness: https://qinisolabs.github.io/veridigit
The 91% figure is one frontier model, tool-free, at temperature 0. Run it on any model yourself with the harness in
bench/.
Related MCP server: Qiniso
Use as an MCP server
// in your MCP client config
{
"mcpServers": {
"veridigit": { "command": "npx", "args": ["-y", "veridigit"] }
}
}Tools exposed: validate_iban, validate_card, validate_isbn, validate_vin.
Use as a library
npm install veridigitimport { validateIban, validateCard, validateIsbn13, validateVin } from "veridigit";
validateIban("GB82 WEST 1234 5698 7654 32");
// { valid: true, countryCode: "GB", country: "United Kingdom", checkDigits: "82", ... }
validateCard("4111 1111 1111 1111");
// { valid: true, luhnValid: true, brand: "Visa", lengthValid: true, ... }
validateIsbn13("978-0-306-40615-7"); // { valid: true, type: "ISBN-13", checkDigit: "7", ... }
validateVin("1HGCM82633A004352"); // { valid: true, checkDigit: "3", ... }Helper exports are also available: ibanCheckDigits, luhnValid, luhnCheckDigit,
detectBrand, isbn13CheckDigit, vinCheckDigit, supportedIbanCountries.
Scope
veridigit validates the structure of an identifier — its format and checksum. It
does not confirm that a bank account, card, book or vehicle actually exists, is active,
or belongs to anyone. It performs no network calls.
Development
npm install
npm run build # tsc -> dist/
npm test # parity/known-answer tests via tsxThe curated reference data (IBAN country specs, card BIN ranges) lives in data/.
License
Apache-2.0
Available Tools
4 toolsvalidate_cardA
USE THIS to check a payment card number's structure before using it — never assume a card number is valid or guess its brand. Verifies the Luhn checksum, detects the brand (Visa, Mastercard, Amex, Discover, Diners, JCB, UnionPay) from its BIN, and checks the length. Does NOT check whether the card is real, active or has funds.
Inputs: number (required).
validate_ibanA
USE THIS to verify an IBAN (international bank account number) before relying on it — instead of guessing whether it looks right. Checks the country, the country-specific length, and the ISO 7064 mod-97 checksum, and returns the country, check digits and BBAN. Call this whenever a user supplies a bank account for a payment, payout or invoice.
Inputs: iban (required).
validate_isbnA
USE THIS to verify an ISBN-13 book identifier instead of trusting that 13 digits are correct. Checks the 978/979 prefix and the mod-10 weighted check digit, and returns the expected check digit when it fails.
Inputs: isbn (required).
validate_vinA
USE THIS to verify a vehicle VIN before acting on it — do not assume a 17-character string is a valid VIN. Checks the allowed alphabet (no I/O/Q) and the ISO 3779 transliteration check digit in position 9, and returns the expected check digit when it fails.
Inputs: vin (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool validates a completely different type of identifier (card, IBAN, ISBN, VIN) with no overlap in purpose. An agent can clearly distinguish which tool to use based on the entity type.
All tools follow a consistent 'validate_<entity>' pattern using snake_case, making the naming predictable and uniform.
Four tools is an appropriate number for a validation-focused server covering common but distinct identifier types. Each tool serves a clear and necessary purpose without being excessive.
The set covers major identifier validations (payment, banking, book, vehicle). Minor gap: no validation for other common identifiers like email or phone, but the scope is coherent and well-defined.
Related MCP Connectors
Checksum validation for AI agents: IBAN, ISBN, EAN/GTIN, UUID, ULID. Deterministic, no auth.
15 deterministic validation tools for AI agents: tax IDs (15 countries), VAT, IBAN, LEI, HS codes.
Validates Luhn, IBAN, ISBN, EAN/UPC, SWIFT/BIC, and EU VAT checksums and formats.
Validate IBAN, VAT, SWIFT, LEI, and credit card numbers
Related MCP Servers
- AlicenseAqualityBmaintenanceIBAN validation across 89 countries, BIC/SWIFT and Swiss clearing lookup, batch validation, payment-reference, postal-address and Swiss QR-bill checks for AI agents. Connect via MCP or the REST API. Includes free quotas, paid credits and a Pro subscription. SEPA and country-risk indicators support payment-data checks; they do not confirm account ownership or replace beneficiary AML/KYC screening.133MIT

Qinisoofficial
AlicenseAqualityCmaintenanceThe deterministic fact-verification layer for AI agents. Validates the structured facts an agent emits — IBANs, payment cards, VAT and national tax IDs, crypto and bank addresses, domains, emails, phone numbers, securities and academic identifiers, plus dates, currencies and holidays — against checksums and curated authoritative data, not guesses.561Apache 2.0- AlicenseAqualityBmaintenanceIBAN validation, extraction, format specs, and BIC/SWIFT lookup tools for AI assistants, backed by ibanchecker.cash. Covers 90 countries; no IBAN data is stored.569 npmMIT
- AlicenseAqualityBmaintenanceEnables AI agents to validate IBANs, generate synthetic checksum-valid test IBANs, and look up bank registry records by BIC or domestic identifier, with optional paid capabilities for bank, BIC, and SEPA Instant/VoP reachability.6MIT