cd /news/ai-agents/id-verification-mcp-tool-let-an-ai-a… · home › topics › ai-agents › article
[ARTICLE · art-181513] src=dev.to ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

ID Verification MCP Tool: Let an AI Agent Check IDs Without Seeing Personal Data

A developer released an open-source MCP server tool, parse_id, that lets AI agents verify identity documents while returning only a verdict by default, keeping names, birth dates and document numbers out of the model's context, request logs and saved transcripts. The tool calls an ID Document OCR API and returns fields such as next_step, document type, country, expiry status, an age_18_or_over flag and MRZ-checked fields, with an optional detail="identity" mode that adds personal details with the document number masked to its last four characters. In sessions run in Claude Code on public specimen documents, the agent accepted a valid French ID card, flagged an expired Korean passport, and switched to identity mode on its own when asked to fill a form.

key takeaway

An MCP tool that returns a verdict (next_step, is_expired, age_18_or_over) instead of raw fields keeps names, birth dates and document numbers out of the model context and logs, with identity details exposed only on explicit request and document numbers masked to the last four characters.

by read3 min views2 publishedDec 4, 2026

Your onboarding or support agent receives a photo of a customer's ID. It needs two answers: is the document usable, and is the person old enough. It does not need the name, the birth date or the document number for that. Yet whatever a tool returns lands in the conversation, the model provider's request, your logs and saved transcripts.

This guide adds an ID verification tool to an AI agent through MCP that returns a verdict, not personal data, unless the task needs the identity. The tool is parse_id, part of our open source AI Engine MCP server, and it calls the ID Document OCR API. Sessions below ran in Claude Code on 4 December 2026 on public specimens.

detail="verdict" (default): next_step, document type, country, is_expired, age_18_or_over, fields checked by the MRZ, anything missing. No name, no birth date, no document number.detail="identity": adds names, dates, nationality and sex, for tasks like filling a form. The document number is masked except its last 4 characters.min_age (18 by default), so the birth date does not have to enter the conversation. Subscribe to the ID Document OCR API on RapidAPI (free plan available), then in Claude Code:

claude mcp add ai-engine -e RAPIDAPI_KEY=your_key -- \
  uvx --from "git+https://github.com/ai-engine-dev/api-examples#subdirectory=mcp-server" ai-engine-mcp
> A customer uploaded id_front.jpg and id_back.jpg to open an account. Is the ID valid and is the customer an adult?

The full tool result the agent received:

{
  "next_step": "accept",
  "document_type": "id_card",
  "country": "FRA",
  "sides": 2,
  "status": "ok",
  "is_expired": false,
  "age_18_or_over": true,
  "checked_by_mrz": [
    "birth_date",
    "document_number",
    "expiry_date",
    "first_name",
    "last_name",
    "nationality",
    "sex"
  ],
  "missing_critical_fields": [],
  "mismatched_fields": [],
  "consistency_issues": []
}
Yes on both counts. The ID passes the check and the holder is 18 or older.

I asked only for the yes/no result, so no personal details (name, date of birth, ID number) came into this conversation. If you need them to fill in the account form, I can run it again and ask for them.

The agent never opened the images and never saw the name, and still answered completely.

> Same check for passport.jpg, a new customer: can we open the account?
{
  "next_step": "ask for a document that is not expired",
  "document_type": "passport",
  "country": "KOR",
  "sides": 1,
  "status": "ok",
  "is_expired": true,
  "age_18_or_over": true,
  "checked_by_mrz": [
    "birth_date",
    "document_number",
    "expiry_date",
    "first_name",
    "last_name",
    "nationality",
    "sex"
  ],
  "missing_critical_fields": [],
  "mismatched_fields": [],
  "consistency_issues": []
}
Not yet. The passport is expired, so ask the customer for a document that is still valid.

I ran the check without personal details, so I didn't see the name, birth date or document number. If you need them, for example to fill in the account form, I can run it again with the identity details turned on.

next_step folds verdict, expiry and age into one instruction, so the agent does not have to combine them.

> Fill form.json with the customer's details from id_front.jpg and id_back.jpg.

The agent chose detail="identity" by itself. The identity part of the result:

{
  "fields": {
    "last_name": {
      "value": "MARTIN",
      "status": "mrz_confirmed"
    },
    "first_name": {
      "value": "MAELYS GAELLE MARIE",
      "status": "mrz_confirmed"
    },
    "birth_date": {
      "value": "1990-07-13",
      "status": "mrz_confirmed"
    },
    "expiry_date": {
      "value": "2030-02-11",
      "status": "mrz_confirmed"
    },
    "nationality": {
      "value": "FRA",
      "status": "mrz_confirmed"
    },
    "sex": {
      "value": "F",
      "status": "mrz_confirmed"
    },
    "document_number": {
      "value": "***** PFW4",
      "status": "mrz_confirmed"
    }
  }
}

Even here the document number arrived as ***** PFW4. If a form needs the full number, read it in backend code, not through the chat.

The full tool code, a test client and production tips are in the original article: ID Verification MCP Tool on ai-engine.net. For the face step of remote onboarding, see the selfie to ID verification guide.

Get a key on the ID Document OCR API page, add the server with the command above and ask your assistant to check the French ID card specimen.

── more in #ai-agents 4 stories · sorted by recency
── more on @claude code 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/id-verification-mcp-…] indexed:0 read:3min 2026-12-04 · —