How to check an online shop before paying in a LangChain agent

Updated 25 November 2026

Short answer

Add Fidem as a remote MCP server with langchain-mcp-adapters. Your agent gets a check_shop tool that takes a domain and says which company is behind it 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 langchain-mcp-adapters and point it at https://fidemcheck.com/mcp with the streamable_http transport.

import asyncio, json
from langchain_mcp_adapters.client import MultiServerMCPClient

client = MultiServerMCPClient({
    "fidem": {"url": "https://fidemcheck.com/mcp", "transport": "streamable_http"}
})

async def main():
    tools = {t.name: t for t in await client.get_tools()}
    result = await tools["check_shop"].ainvoke({"domain": "tienda-demo.fidemcheck.com"})
    answer = json.loads(result[0]["text"])
    print(answer["decision"], answer["identity_verified"])   # verified True

asyncio.run(main())

Tested on 25 November 2026 with langchain-mcp-adapters 0.3.2 and mcp 1.30.0.

Give it to your agent

get_tools() returns ordinary LangChain tools, so you pass them to your agent like any other tool. The agent also needs to know when to call it and what to do with the answer. This is the instruction we use:

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.

If you call the tool from your own code instead of leaving it to the agent, this helper retries for you:

async def check_shop(domain, tries=4):
    tools = {t.name: t for t in await client.get_tools()}
    for _ in range(tries):
        result = await tools["check_shop"].ainvoke({"domain": domain})
        answer = json.loads(result[0]["text"])
        if answer.get("lookup_status") != "in_progress":
            break
        await asyncio.sleep(answer.get("retry_after_seconds", 15))
    return answer

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