How to check an online shop before paying with the Vercel AI SDK

Updated 25 November 2026

Short answer

Open an MCP client to https://fidemcheck.com/mcp with createMCPClient from @ai-sdk/mcp and pass its tools to generateText or streamText. The model gets a check_shop tool that says which company is behind a domain and whether that company proved it.

It is free and needs no API key. Let the agent pay without asking only when identity_verified is true.

Connect the tool

Install ai and @ai-sdk/mcp. The client uses the HTTP transport, so it works from Node and from serverless functions.

import { createMCPClient } from '@ai-sdk/mcp';

const fidem = await createMCPClient({
  transport: { type: 'http', url: 'https://fidemcheck.com/mcp' },
});
const tools = await fidem.tools();   // { check_shop, consultar_tienda }

const result = await tools.check_shop.execute({ domain: 'tienda-demo.fidemcheck.com' }, { toolCallId: 'check-1', messages: [] });
const answer = JSON.parse(result.content[0].text);
console.log(answer.decision, answer.identity_verified);   // verified true

await fidem.close();

Tested on 25 November 2026 with ai 7.0.181 and @ai-sdk/mcp 2.0.104 on Node 22. Close the client when the response has finished.

Give it to your agent

Pass the same tools object to generateText or streamText, next to your own tools, and add this to the system prompt so the model knows when to call it:

Before you pay on a shop, call check_shop with its domain.
Pay without asking only if identity_verified is true.
Otherwise tell the user which company the shop claims
and what the official register says.
If lookup_status is in_progress, wait retry_after_seconds
and call check_shop again.

When the first lookup is still running

A domain Fidem has never seen can take longer than an agent wants to wait, so the answer comes within about 7 seconds either way. If the full check has not finished, it says lookup_status: in_progress and retry_after_seconds: 15, and the next call returns the full answer from cache. Allow the model at least one more step so it can ask again.

What to branch on

Branch on decision. It is the same in the MCP tool, the REST API and the reference checker.

decisionWhat your agent should do
verifiedThe company proved control of the domain and was checked against the official register. identity_verified is true. The only value to pay on without asking.
domain_provenThe shop proved the domain on the free plan, without a signed file. Show the user the facts and ask.
in_reviewThe shop proved the domain and its company is being checked. Show the facts and ask.
not_verifiedNo verification. Most shops have none yet, so this is not a sign of fraud. Show the facts and ask.
revoked, expired, invalid_fileA verification existed and no longer holds. Ask the user, and say why.
fictitious_demoFidem’s own example shop. Never pay.
no_dataThe check could not finish. Ask the user.

Limits

  • Free, no API key, 300 lookups per hour per IP.
  • Registers connected today: VIES for EU VAT numbers and Companies House for UK companies. Shops in the US and Latin America get the public facts without a register match.
  • Fidem does not rate products, deliveries or service, and gives no fraud score. It says who is behind the shop and how that was checked.
  • When a shop is run by an individual, Fidem never publishes their name or tax ID.

Sources

All the ways to connect