National ID & Tax ID Validator MCP
Validates and decodes national ID, tax, company/VAT, passport, driver licence, and MRZ values offline via the validate_ids tool.
Accepts one or more ID, MRZ, or tax numbers; spaces and hyphens are allowed.
Optionally restricts matching by ISO 3166 alpha-3 country or exact ID type such as
pol_pesel;mrzandusa_driver_licensebroaden matching across layouts/states.Returns every matching ID type, checksum-verified first, with formatted layout and decoded fields such as birth date, sex, region, citizenship, and taxpayer type.
Reports
validas null without a hint, true/false with country/type hints where checksums exist, and includes near-match reasons.Performs offline format/checksum validation only; it does not confirm document existence or registry status.
Integrates with the National ID & Tax ID Validator API hosted on RapidAPI to validate and decode national IDs, tax IDs, company/VAT numbers, passport numbers, and passport MRZ strings across many countries, returning matching ID types, checksum status, formatted layouts, and encoded fields such as date of birth, sex, region, and citizenship.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@National ID & Tax ID Validator MCP Validate 50001010006 as an Estonian ID and tell me the birth date and sex"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
National ID & Tax ID Validator MCP
An MCP server that lets an AI agent validate and decode ID numbers: national IDs, tax IDs, company and VAT numbers, passport and driver licence numbers, and the MRZ of passports, ID cards and visas.
279 ID types from 130 countries and territories.
For every value it returns each ID type the value fits, whether the checksum is right, the number in its usual printed layout, and what the number itself encodes: date of birth, sex, region or place of birth, citizenship, taxpayer type.
The validation is offline: no government registry is queried. "Valid" means the number is correctly built, not that the document exists or belongs to a particular person.
The server is a thin client for the National ID & Tax ID Validator API, available on RapidAPI and as an Apify Actor. Use whichever account you have.
Quick start
No install: add Apify's hosted MCP server to your client and sign in to Apify on the first connection.
https://mcp.apify.com?tools=soxoj/national-id-tax-id-validatorRelated MCP server: Qiniso
Examples
All three numbers are made up for this README. The tool returns JSON (see The tool); here the answers are shown as tables.
5010100A000PB1: Belarusian personal number (blr_personal_number), checksum verified
Field | Value |
Date of birth | 2000-01-01 |
Sex | male |
Region | Minsk |
Status | citizen |
Serial number | 000 |
50001010006 with country="EST": Estonian personal code (est_personal_id), checksum verified
Field | Value |
Date of birth | 2000-01-01 |
Sex | male |
50001010006@eesti.ee (the official address every Estonian ID card holder gets) | |
Serial number | 000 |
Without country the same string also passes the checksums of a Hungarian and a Lithuanian personal number and fits
four more formats; all seven matches are returned, checksum-verified first, and valid is null.
EATA000101MDFXSNA6: Mexican CURP (mex_curp) of a fictional Ana Example Test, checksum verified
Field | Value |
Initials | EATA: Example, Test, Ana |
Inner consonants | XSN: example, test, ana |
Date of birth | 2000-01-01 |
Sex | female |
State of birth | DF (Mexico City) |
Homoclave | A |
Use cases
Investigations. An ID number turns up in a leak, a court record or a scanned document. Find out which country and document it belongs to and what it says about its holder: birth date, sex, region, citizenship. Then compare that with what you already know about the person.
KYC and anti-fraud. Reject mistyped and invented numbers at sign-up, and compare the birth date and sex encoded in the number with the ones the customer entered. A mismatch is a reason to look closer.
Pivots. Some numbers lead to other identifiers, such as the
@eesti.eeaddress of an Estonian, or the PAN embedded in an Indian GSTIN.Data cleaning. Sort a column of unlabeled numbers by country and document type, drop the broken ones and print the rest in their usual layout.
Document workflows. After an OCR tool has read a passport or an ID card, check the extracted number, or the passport's MRZ check digits, before anything is done with it.
Setup
You need uv and one of the two keys.
RapidAPI: subscribe to the API on RapidAPI
(there is a free plan) and copy your X-RapidAPI-Key.
Apify: take your API token from Apify Console → Settings → API & Integrations. Runs of the Actor are billed to your Apify account per checked ID.
Claude Code
claude mcp add national-id -e RAPIDAPI_KEY=your-key -- uvx --from git+https://github.com/soxoj/national-id-mcp national-id-mcp(or -e APIFY_TOKEN=your-token)
Claude Desktop, Cursor and other clients
{
"mcpServers": {
"national-id": {
"command": "uvx",
"args": ["--from", "git+https://github.com/soxoj/national-id-mcp", "national-id-mcp"],
"env": {"RAPIDAPI_KEY": "your-key"}
}
}
}If both keys are set, RapidAPI is used.
No install: Apify's hosted MCP server
Apify serves any Store Actor as an MCP tool. Point your client at
https://mcp.apify.com?tools=soxoj/national-id-tax-id-validatorand sign in to Apify in the browser on the first connection, or send Authorization: Bearer <APIFY_TOKEN>. That way
the tool comes from Apify's generic Actor wrapper rather than from this server.
The tool
validate_ids(values, country=None, type=None)
values: a list of ID numbers, MRZ strings or tax numbers. Spaces and hyphens are fine.country: optional ISO 3166 alpha-3 code, e.g.POL. Only this country's types are tried, andvalidbecomestrueorfalse. Without itvalidisnull, since one string can be a valid number in several countries.type: optional exact type, e.g.pol_pesel, taken from an earlier result.mrztries every MRZ layout, andusa_driver_licensethe driver licences of every US state the API reads.
Through RapidAPI the result is one object per value: {"value", "valid", "matches": [{"type", "checksum_verified", "formatted", "fields"}], "reason"}, checksum-verified matches first. reason comes only when something nearly
matched: an MRZ with a wrong check digit, or, with a hint, a number that is off by its check digit. Through Apify it
is one row per matched type, with the same fields.
What it does not do
No registry lookups: it cannot tell whether a person exists, a passport is still valid or a tax number is active.
About a third of the types have no public checksum; for those only the format is checked.
US driver licences: 10 states so far, format only (no state publishes a check digit).
No OCR: the input is text.
Development
uv run --with mcp python -m unittestLicense
MIT
Available Tools
1 toolvalidate_idsA
Validate and decode ID numbers: national IDs, tax IDs, company and VAT numbers, passport numbers or MRZ.
Every ID type a value fits is returned, checksum-verified ones first, with the number's formatted layout and the fields it encodes (birth date, sex, region...). Without a hint, valid is null: one string can be a valid number in several countries. With country (ISO alpha-3, e.g. "POL") or an exact type (e.g. "pol_pesel", from an earlier result) only those types are tried and valid is true or false (null where the country's IDs have no checksum). Offline validation only: valid means correctly built, not that the document exists.
Inputs: values (required), type, country. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
With only one tool, there is no possibility of selecting the wrong tool or confusing overlapping purposes. The tool's purpose is clearly stated and self-contained.
The single tool name validate_ids follows a clear verb_noun convention. There are no competing naming styles to create inconsistency.
A single tool is thin for a server, even one focused on ID validation. The tool is broad enough to cover many ID types, but the surface offers no separate operations such as batch validation or type listing.
The tool covers validation and decoding across national IDs, tax IDs, company/VAT numbers, passports, and MRZ, with country/type hints and checksum awareness. Minor gaps like batch validation or explicit supported-type discovery are not covered, but core validation workflows are present.
Maintenance
Related MCP Connectors
15 deterministic validation tools for AI agents: tax IDs (15 countries), VAT, IBAN, LEI, HS codes.
Validate EU, UK, AU VAT numbers for AI agents. EU ViDA e-invoicing compliance.
Checksum validation for AI agents: IBAN, ISBN, EAN/GTIN, UUID, ULID. Deterministic, no auth.
KYB for AI agents: GLEIF entity, parent chain, sanctions and EU VAT checks. Data lookup only.
Related MCP Servers
- AlicenseAqualityDmaintenanceVerified validation of structured identifiers — IBAN, payment cards, ISBN-13 and VIN — for AI agents. Runs the real checksum algorithms (mod-97, Luhn, mod-10, ISO 3779) instead of letting the model guess, and returns structured results with clear errors.438 npmApache 2.0

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- AlicenseNot gradedqualityNot gradedmaintenanceValidates LatAm banking and tax IDs (Mexican CLABE, Brazilian CNPJ/CPF checksums) and performs BrasilAPI company, CEP, and bank lookups, enabling AI agents to verify financial and tax information in Latin America.72 npmMIT
- AlicenseAqualityBmaintenanceEnables AI agents to validate Mexican RFC, CURP, CLABE and NSS identifiers with real check digits, parse CFDI 4.0 invoices with labelled SAT catalogue codes and verified totals, and query the SAT's public status service to see whether an invoice is still valid. It also generates coherent test people and companies, all read-only and without API keys, certificates or PAC contracts.9108 npm1MIT