{"slug": "id-verification-mcp-tool-let-an-ai-agent-check-ids-without-seeing-personal-data", "title": "ID Verification MCP Tool: Let an AI Agent Check IDs Without Seeing Personal Data", "summary": "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.", "body_md": "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.\n\nThis 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](https://github.com/ai-engine-dev/api-examples/tree/master/mcp-server), and it calls the [ID Document OCR API](https://ai-engine.net/apis/id-document-ocr?utm_source=devto&utm_medium=referral&utm_campaign=crosspost). Sessions below ran in Claude Code on 4 December 2026 on public specimens.\n\n`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.\nSubscribe to the ID Document OCR API on RapidAPI (free plan available), then in Claude Code:\n\n```\nclaude mcp add ai-engine -e RAPIDAPI_KEY=your_key -- \\\n  uvx --from \"git+https://github.com/ai-engine-dev/api-examples#subdirectory=mcp-server\" ai-engine-mcp\n> A customer uploaded id_front.jpg and id_back.jpg to open an account. Is the ID valid and is the customer an adult?\n```\n\nThe full tool result the agent received:\n\n```\n{\n  \"next_step\": \"accept\",\n  \"document_type\": \"id_card\",\n  \"country\": \"FRA\",\n  \"sides\": 2,\n  \"status\": \"ok\",\n  \"is_expired\": false,\n  \"age_18_or_over\": true,\n  \"checked_by_mrz\": [\n    \"birth_date\",\n    \"document_number\",\n    \"expiry_date\",\n    \"first_name\",\n    \"last_name\",\n    \"nationality\",\n    \"sex\"\n  ],\n  \"missing_critical_fields\": [],\n  \"mismatched_fields\": [],\n  \"consistency_issues\": []\n}\nYes on both counts. The ID passes the check and the holder is 18 or older.\n\nI 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.\n```\n\nThe agent never opened the images and never saw the name, and still answered completely.\n\n```\n> Same check for passport.jpg, a new customer: can we open the account?\n{\n  \"next_step\": \"ask for a document that is not expired\",\n  \"document_type\": \"passport\",\n  \"country\": \"KOR\",\n  \"sides\": 1,\n  \"status\": \"ok\",\n  \"is_expired\": true,\n  \"age_18_or_over\": true,\n  \"checked_by_mrz\": [\n    \"birth_date\",\n    \"document_number\",\n    \"expiry_date\",\n    \"first_name\",\n    \"last_name\",\n    \"nationality\",\n    \"sex\"\n  ],\n  \"missing_critical_fields\": [],\n  \"mismatched_fields\": [],\n  \"consistency_issues\": []\n}\nNot yet. The passport is expired, so ask the customer for a document that is still valid.\n\nI 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.\n```\n\n`next_step` folds verdict, expiry and age into one instruction, so the agent does not have to combine them.\n\n```\n> Fill form.json with the customer's details from id_front.jpg and id_back.jpg.\n```\n\nThe agent chose `detail=\"identity\"` by itself. The identity part of the result:\n\n```\n{\n  \"fields\": {\n    \"last_name\": {\n      \"value\": \"MARTIN\",\n      \"status\": \"mrz_confirmed\"\n    },\n    \"first_name\": {\n      \"value\": \"MAELYS GAELLE MARIE\",\n      \"status\": \"mrz_confirmed\"\n    },\n    \"birth_date\": {\n      \"value\": \"1990-07-13\",\n      \"status\": \"mrz_confirmed\"\n    },\n    \"expiry_date\": {\n      \"value\": \"2030-02-11\",\n      \"status\": \"mrz_confirmed\"\n    },\n    \"nationality\": {\n      \"value\": \"FRA\",\n      \"status\": \"mrz_confirmed\"\n    },\n    \"sex\": {\n      \"value\": \"F\",\n      \"status\": \"mrz_confirmed\"\n    },\n    \"document_number\": {\n      \"value\": \"***** PFW4\",\n      \"status\": \"mrz_confirmed\"\n    }\n  }\n}\n```\n\nEven here the document number arrived as `***** PFW4`. If a form needs the full number, read it in backend code, not through the chat.\n\nThe full tool code, a test client and production tips are in the original article: [ID Verification MCP Tool on ai-engine.net](https://ai-engine.net/blog/id-verification-mcp-tool?utm_source=devto&utm_medium=referral&utm_campaign=crosspost). For the face step of remote onboarding, see the [selfie to ID verification guide](https://ai-engine.net/blog/ekyc-saas-selfie-id-verification?utm_source=devto&utm_medium=referral&utm_campaign=crosspost).\n\nGet a key on the [ID Document OCR API page](https://ai-engine.net/apis/id-document-ocr?utm_source=devto&utm_medium=referral&utm_campaign=crosspost), add the server with the command above and ask your assistant to check the French ID card specimen.", "url": "https://wpnews.pro/news/id-verification-mcp-tool-let-an-ai-agent-check-ids-without-seeing-personal-data", "canonical_source": "https://dev.to/aiengine/id-verification-mcp-tool-let-an-ai-agent-check-ids-without-seeing-personal-data-595p", "published_at": "2026-12-04 01:39:22+00:00", "updated_at": "2026-12-04 01:46:05.801413+00:00", "lang": "en", "topics": ["ai-agents", "agent-protocols", "ai-tools", "developer-tools", "ai-safety"], "entities": ["Claude Code", "AI Engine MCP server", "ID Document OCR API", "RapidAPI", "GitHub"], "also_reported_by": [], "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.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/id-verification-mcp-tool-let-an-ai-agent-check-ids-without-seeing-personal-data", "markdown": "https://wpnews.pro/news/id-verification-mcp-tool-let-an-ai-agent-check-ids-without-seeing-personal-data.md", "text": "https://wpnews.pro/news/id-verification-mcp-tool-let-an-ai-agent-check-ids-without-seeing-personal-data.txt", "jsonld": "https://wpnews.pro/news/id-verification-mcp-tool-let-an-ai-agent-check-ids-without-seeing-personal-data.jsonld"}}