Udyam Registration Number (URN) verification is a high-value workflow for lending, procurement, onboarding, subsidies, and B2B marketplaces. Yet asking an AI agent to verify a small business is not as simple as exposing a web page to a language model. The system must identify the correct Udyam record, obtain consent where required, handle portal constraints, protect sensitive business data, and return evidence that a reviewer can audit.
This guide explains how to develop a WebMCP for agents to verify Udyam Registration Numbers. It uses “WebMCP” to mean a web-based Model Context Protocol (MCP) integration: a controlled tool layer that allows an AI agent to call verification functions through a browser-accessible service rather than scraping pages or improvising business logic.
What is WebMCP and why use it for Udyam verification?
MCP is a structured way to expose tools and data sources to AI applications. A WebMCP places that capability behind HTTPS, typically with an authenticated gateway, so an agent can discover and invoke narrowly defined tools such as:
validate_udyam_formatcreate_verification_sessionverify_udyam_numberget_verification_resultdownload_verification_receipt
The agent should not receive unrestricted access to the Udyam portal, your database, or a general-purpose browser. Instead, it should call a tool with a defined schema and receive a predictable response.
A well-designed integration helps you:
- Reduce manual checks during MSME onboarding.
- Prevent hallucinated verification claims by requiring machine-readable evidence.
- Separate agent reasoning from regulated or sensitive verification operations.
- Apply rate limits, consent checks, and fraud controls centrally.
- Maintain an audit trail showing what was checked, when, and against which source.
Important distinction: format validation versus official verification
A Udyam number can be syntactically valid without belonging to an active or matching enterprise. Your WebMCP should clearly distinguish at least three outcomes:
1. Format valid — the value resembles the expected Udyam Registration Number structure.
2. Record found — an authorised verification source returned a corresponding record.
3. Business match confirmed — the returned record matches the supplied business identity attributes, subject to your policy.
Never tell an agent that a registration is “verified” solely because a regular expression passed. A typical Udyam identifier follows a pattern similar to UDYAM-XX-00-0000000, but format rules can change and should be confirmed against current official guidance. Store the raw input, normalized value, validation version, and verification source separately.
Define the verification use case before writing code
The required data and compliance controls depend on why verification is being performed. Document the use case first:
- Supplier onboarding: confirm registration status and legal-name alignment.
- Credit or lending: verify the enterprise and preserve evidence for underwriting.
- Government scheme eligibility: check the specific scheme’s current rules; Udyam status alone may not prove eligibility.
- Marketplace trust: display only the minimum status required by users.
- Internal procurement: retain a time-stamped result and refresh it periodically.
Define acceptable outcomes, including verified, not_found, mismatch, temporarily_unavailable, consent_required, and manual_review. This prevents an AI agent from treating a technical error as a failed business verification—or worse, as a successful check.
Reference architecture for a Udyam WebMCP
A production design usually contains six layers:
1. Agent and client layer
The AI agent requests verification using a tool call. The client should display the requested purpose, enterprise identifier, and any consent prompt before sensitive data is transmitted.
2. WebMCP gateway
The gateway exposes MCP-compatible tools over HTTPS. It should authenticate the calling application, validate JSON schemas, enforce permissions, and reject unknown parameters. Avoid allowing arbitrary URLs, scripts, or browser commands from the model.
3. Verification orchestration service
This service manages the workflow:
- Normalizes the Udyam number.
- Checks format and duplicate requests.
- Creates a verification session.
- Selects the approved data source.
- Handles retries and timeouts.
- Applies matching rules.
- Generates a signed or tamper-evident result.
4. Official-source connector
Use an authorised API or an approved verification mechanism wherever available. Do not design the product around scraping CAPTCHA-protected pages, bypassing access controls, or automating a portal in violation of its terms. If no suitable API exists, provide a consent-based redirect or human-in-the-loop workflow rather than pretending that a page scrape is authoritative.
5. Evidence and audit store
Store a minimal verification record: request ID, normalized identifier hash or protected value, source, timestamp, response status, matching fields, policy version, and evidence reference. Encrypt sensitive fields and restrict access by role.
6. Observability and review console
Operators need to inspect failures without exposing full business data to every support user. Log structured events, latency, source errors, agent identity, and decision reason. Build a manual-review queue for ambiguous matches.
Design the MCP tool schema carefully
A narrow schema is safer and easier for agents to use than a large “verify anything” endpoint. For example:
{
"name": "verify_udyam_number",
"description": "Verify a Udyam Registration Number using an approved source and return a traceable result.",
"inputSchema": {
"type": "object",
"required": ["udyamNumber", "purpose", "consentReference"],
"properties": {
"udyamNumber": { "type": "string", "maxLength": 32 },
"purpose": { "type": "string", "enum": ["onboarding", "procurement", "lending", "scheme_review"] },
"consentReference": { "type": "string", "maxLength": 128 },
"businessName": { "type": "string", "maxLength": 200 }
},
"additionalProperties": false
}
}The output should be equally explicit:
{
"status": "verified",
"udyamNumber": "UDYAM-XX-00-0000000",
"match": "business_name_confirmed",
"source": "approved_udyam_verification_source",
"checkedAt": "2026-09-03T10:20:00Z",
"evidenceId": "ev_12345",
"expiresAt": "2026-10-03T10:20:00Z",
"nextAction": "none"
}Use enums instead of free text for statuses. Return sourceUnavailable or manualReview when appropriate. Do not return internal stack traces, credentials, CAPTCHA details, or unnecessary personal information to the agent.
Implement a safe verification workflow
A practical sequence is:
1. Receive the request and authenticate the client application.
2. Validate the schema and reject excess fields.
3. Normalize the number by trimming whitespace, converting case consistently, and applying documented formatting rules.
4. Run local format validation without calling the external source.
5. Check consent and purpose according to your product policy.
6. Create an idempotency key to prevent repeated calls caused by agent retries.
7. Call the approved verification source with strict timeout and retry limits.
8. Normalize the response into your internal result model.
9. Compare supplied identity fields using deterministic rules, not an LLM.
10. Persist evidence and an audit event.
11. Return a concise result plus evidence ID and next action.
For name matching, avoid a simple case-insensitive equality check. Normalize Unicode, punctuation, legal suffixes, and whitespace, then use a conservative similarity policy. A fuzzy match should never automatically approve a high-risk transaction. Route borderline results to human review.
Security controls for agent-facing verification
AI agents introduce prompt-injection and tool-abuse risks. Apply conventional application security plus agent-specific controls:
- Authenticate clients with OAuth 2.0, signed tokens, or mTLS for server-to-server use.
- Authorize tools by tenant, user role, purpose, and data scope.
- Use short-lived access tokens and rotate secrets.
- Enforce per-tenant rate limits and anomaly detection.
- Add idempotency keys and replay protection.
- Validate all tool inputs server-side; never trust the model’s claims.
- Block SSRF by allowing connectors to reach only approved hosts.
- Do not let untrusted webpage content redefine tool instructions.
- Separate system prompts from verification data.
- Encrypt data in transit and at rest.
- Redact Udyam numbers and business identifiers in general logs.
- Set retention and deletion schedules.
- Sign result payloads or store tamper-evident hashes when evidence integrity matters.
The agent should be told that an external document, webpage, or business name is data, not an instruction. This protects the workflow from prompt injection embedded in retrieved content.
India-specific privacy and compliance considerations
Udyam verification may involve business and personal data, particularly for proprietorships and contact information. Design for India’s Digital Personal Data Protection Act, 2023 (DPDP Act), and obtain professional legal advice for your exact role and processing model.
Key practices include:
- Define the lawful purpose and provide a clear notice.
- Collect only fields necessary for verification.
- Record consent where consent is your selected basis and make it purpose-specific.
- Provide a mechanism for correction, withdrawal, and grievance handling where applicable.
- Use processors and cloud regions according to your contracts and legal assessment.
- Apply access controls, incident response, and breach procedures.
- Do not use verification data for unrelated profiling without a valid basis.
Also verify current requirements from official Udyam and government sources before launch. Portal procedures, APIs, eligibility rules, and acceptable evidence can change. Your application should show the source and check timestamp rather than claiming permanent validity.
Handling portal availability and source limitations
External government services can experience maintenance, throttling, or changes in response formats. Build resilience without weakening verification:
- Use bounded exponential backoff for transient failures.
- Circuit-break repeatedly failing connectors.
- Cache only where permitted, with an explicit freshness period.
- Mark cached results as cached and display their age.
- Never convert
unknownintonot_found. - Provide a manual verification path with an evidence upload or official reference.
- Version your connector and response parser.
- Alert on sudden changes in field names, status values, or latency.
A useful result model separates businessStatus from technicalStatus. For example, technicalStatus: unavailable and businessStatus: unknown is safer than a generic “verification failed.”
Testing strategy for a WebMCP
Test the integration at four levels.
Contract tests
Validate MCP discovery, tool schemas, required fields, enum values, authentication failures, and error formats. Test that unknown properties are rejected.
Unit tests
Cover normalization, format validation, name matching, status mapping, consent checks, idempotency, and retention rules. Include malformed Unicode, whitespace, lowercase input, duplicate separators, and very long strings.
Integration tests
Use a sandbox or mocked official connector. Simulate valid records, no matches, mismatches, timeout, rate limiting, malformed responses, and source maintenance.
Agent evaluation
Give the agent ambiguous prompts and adversarial retrieved content. Confirm it:
- Uses the verification tool instead of guessing.
- Asks for missing consent or purpose.
- Reports
unknownwhen the source is unavailable. - Does not expose confidential evidence.
- Does not retry indefinitely.
- Escalates borderline identity matches.
Track precision, false-positive rate, false-negative rate, tool-call success rate, median latency, and manual-review percentage. For lending or compliance workflows, optimize for a low false-positive rate even if manual review increases.
Example response policy for agents
Provide the agent with a short operational policy:
- You may claim “verified” only when the tool returns
status=verified. - A format-valid number is not an official verification.
- If
status=source_unavailable, explain that verification could not be completed. - If
status=mismatch, do not disclose unnecessary returned fields; request clarification or escalate. - Cite the evidence ID and timestamp internally or to authorised users.
- Never invent a Udyam status, enterprise name, or certificate detail.
This policy belongs in the application’s trusted instruction layer, but enforcement must remain server-side. Prompts are not a substitute for authorization or business rules.
Deployment checklist
Before releasing your Udyam WebMCP, confirm:
- The official or authorised source has been identified and its usage terms reviewed.
- The tool schema rejects arbitrary URLs and unexpected fields.
- Consent, purpose, and tenant authorization are enforced.
- Verification and format validation are separate statuses.
- Results include source, timestamp, freshness, and evidence reference.
- Logs are redacted and retention is configured.
- Rate limits, idempotency, circuit breakers, and alerts are active.
- Connector changes are versioned and tested.
- Human review handles mismatches and unavailable sources.
- Privacy notices and user-facing disclosures are ready.
- Security testing covers SSRF, prompt injection, replay, broken access control, and data leakage.
FAQ: WebMCP for Udyam verification
Can an AI agent verify a Udyam number by scraping the portal?
It should not scrape or bypass CAPTCHA, authentication, robots controls, or usage restrictions. Prefer an authorised API or a consent-based official workflow, and confirm current portal terms before implementation.
Is a regex enough to verify an Udyam Registration Number?
No. Regex can perform format validation only. Official verification requires an authorised source and, when relevant, deterministic matching against enterprise information.
Should the agent receive the full Udyam certificate?
Usually not. Return the minimum fields needed for the use case, along with a protected evidence reference. Limit certificate access to authorised users and retain it only as long as necessary.
How often should verification be refreshed?
Set freshness based on risk and business purpose. Procurement may refresh periodically, while a high-risk financial decision may require a check immediately before approval. Always display the check timestamp.
Can this be built without an official API?
You can still build the WebMCP orchestration, consent, audit, and manual-review layers. However, do not label a result as officially verified unless it comes from an authorised source or approved process.
Apply for AI Grants India
Building a secure agent infrastructure product for Indian MSMEs? Apply to AI Grants India to explore grant opportunities and support for responsible AI innovation.