{
  "markdown": "# veridigit\n\n**Verified validation of structured identifiers for AI agents — checksums, not guesses.**\n\nLLMs cheerfully accept malformed IBANs, mistype card check digits, invent ISBN and VIN\ncheck digits, and guess a card's brand wrong. `veridigit` gives an agent a deterministic,\nauthoritative answer instead: it runs the real checksum algorithms and returns structured\nresults with the parsed parts and clear error reasons.\n\nIt ships as **both** an MCP server (for agents to call live) and a typed TypeScript\nlibrary (for apps to import).\n\nSupported in v1:\n\n- **IBAN** — ISO 7064 mod-97 checksum + country-specific length, for 75+ countries.\n- **Payment cards** — Luhn (ISO/IEC 7812) checksum, brand detection from the BIN\n  (Visa, Mastercard, Amex, Discover, Diners, JCB, UnionPay), and length rules.\n- **ISBN-13** — 978/979 prefix and mod-10 weighted check digit.\n- **VIN** — ISO 3779 alphabet (no I/O/Q) and the position-9 transliteration check digit.\n\n## Why\n\nOn 32 randomly generated, non-memorised identifiers, a frontier model with no tool got the\ncheck digit **wrong 91% of the time** — IBAN 100%, VIN 100%, ISBN-13 88%, card/Luhn 75% —\nversus **0%** for `veridigit`. The failure is invisible: the model returns a confident,\nwell-formatted answer that happens to be wrong. `veridigit` replaces the guess with the\nalgorithm.\n\nBenchmark and reproducible harness: **https://qinisolabs.github.io/veridigit**\n\n> The 91% figure is one frontier model, tool-free, at temperature 0. Run it on any model\n> yourself with the harness in [`bench/`](bench/).\n\n## Use as an MCP server\n\n```jsonc\n// in your MCP client config\n{\n  \"mcpServers\": {\n    \"veridigit\": { \"command\": \"npx\", \"args\": [\"-y\", \"veridigit\"] }\n  }\n}\n```\n\nTools exposed: `validate_iban`, `validate_card`, `validate_isbn`, `validate_vin`.\n\n## Use as a library\n\n```bash\nnpm install veridigit\n```\n\n```ts\nimport { validateIban, validateCard, validateIsbn13, validateVin } from \"veridigit\";\n\nvalidateIban(\"GB82 WEST 1234 5698 7654 32\");\n// { valid: true, countryCode: \"GB\", country: \"United Kingdom\", checkDigits: \"82\", ... }\n\nvalidateCard(\"4111 1111 1111 1111\");\n// { valid: true, luhnValid: true, brand: \"Visa\", lengthValid: true, ... }\n\nvalidateIsbn13(\"978-0-306-40615-7\"); // { valid: true, type: \"ISBN-13\", checkDigit: \"7\", ... }\nvalidateVin(\"1HGCM82633A004352\");    // { valid: true, checkDigit: \"3\", ... }\n```\n\nHelper exports are also available: `ibanCheckDigits`, `luhnValid`, `luhnCheckDigit`,\n`detectBrand`, `isbn13CheckDigit`, `vinCheckDigit`, `supportedIbanCountries`.\n\n## Scope\n\n`veridigit` validates the **structure** of an identifier — its format and checksum. It\ndoes **not** confirm that a bank account, card, book or vehicle actually exists, is active,\nor belongs to anyone. It performs no network calls.\n\n## Development\n\n```bash\nnpm install\nnpm run build   # tsc -> dist/\nnpm test        # parity/known-answer tests via tsx\n```\n\nThe curated reference data (IBAN country specs, card BIN ranges) lives in `data/`.\n\n## License\n\nApache-2.0\n",
  "bytes": 3011,
  "sha": "9a3467b784db298d4b0b306846d676abf90288786d67edcb54e95a3e2599ffc9",
  "repo_slug": "qinisolabs/veridigit",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_qinisolabs_veridigit_46cc8579/readme"
}