DEV Community

Cover image for How to give Claude a UK company-verification (KYB) tool with the Apify MCP server
Michael
Michael

Posted on • Originally published at scrapers.lat

How to give Claude a UK company-verification (KYB) tool with the Apify MCP server

AI agents are good at reasoning and terrible at facts. Ask Claude whether "Tesco PLC" is a real, active UK company, what its registered office is, and who sits on its board today, and it will give you a confident answer from its training data that may be months or years stale, or simply wrong. Directors change, companies get dissolved, registered offices move. For anything compliance-related, "probably correct" is not good enough.

In this guide we fix that. We connect Claude to the official Apify MCP server, expose a single Actor that reads the UK Companies House register, and turn "is this company real and who runs it?" from a guess into a live lookup against the source of record. By the end you will have a working KYB (know-your-business) tool that Claude, Cursor, or any MCP client can call during a conversation, and you will understand exactly where in the run the tool fires and what it returns.

Everything below is a real setup with real output. No mocked responses.

What is the Apify MCP server?

Model Context Protocol (MCP) is an open standard that lets AI clients call external tools. The Apify MCP server (https://mcp.apify.com) implements that standard on top of the Apify platform, which means every one of the thousands of Actors in the Apify Store becomes a tool an agent can invoke.

Why route an Actor through MCP instead of hard-coding an API call?

  • The agent decides when to fetch. Claude reads the conversation, notices it needs a fact it does not have, and calls the tool on its own. You do not write glue code for every question.
  • Structured input and output. The MCP server hands Claude the Actor's input schema, so the model fills in the parameters correctly, and returns a clean dataset it can reason over.
  • One connection, many tools. The same MCP endpoint exposes search-actors, fetch-actor-details, and call-actor, so an agent can discover and run any Actor without new configuration.
  • No infrastructure. The server is hosted. You add a few lines to a config file and you are done.

The Actor we will use

We will expose the UK Companies House Scraper. It searches the UK register and returns the full profile for a company: registered company name and number, status (active/dissolved/liquidation), company type, incorporation date, registered office address, SIC codes (nature of business), previous names, accounts and confirmation-statement dates, and the full list of officers, directors and secretaries, with roles, appointment and resignation dates, nationality and country of residence. It can also return persons with significant control (PSC) and filing history.

That field set is exactly what a KYB, supplier-onboarding, or AML check needs. The UK is a useful jurisdiction because Companies House is public, authoritative, and covers every registered UK company with no login wall, and because so many global holding structures route through a UK entity.

The UK Companies House Scraper on the Apify Store

Step 1: Get your Apify API token

Sign in to the Apify Console, open Settings → Integrations, and copy your personal API token. The MCP server uses it to authenticate and to bill Actor runs to your account.

📌 Note: the token is a secret. Keep it in the client config only, never in a prompt or a committed file.

Step 2: Point Claude Desktop at the Apify MCP server

Open Claude Desktop's config file (Settings → Developer → Edit Config, or ~/Library/Application Support/Claude/claude_desktop_config.json on macOS) and add the Apify server. The tools query parameter is the important part: it tells the server which Actor to expose, so Claude gets one focused tool instead of the entire Store.

{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=scrapers_lat/uk-companies-house-scraper",
      "headers": {
        "Authorization": "Bearer YOUR_APIFY_TOKEN"
      }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Cursor uses the same JSON in .cursor/mcp.json. If you prefer to run it locally over stdio instead of the hosted endpoint:

{
  "mcpServers": {
    "apify": {
      "command": "npx",
      "args": ["-y", "@apify/actors-mcp-server", "--tools", "scrapers_lat/uk-companies-house-scraper"],
      "env": { "APIFY_TOKEN": "YOUR_APIFY_TOKEN" }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Restart Claude Desktop so it picks up the new server.

Step 3: Confirm the tool is loaded

After the restart, the Actor shows up as a callable tool. If you list the tools the Apify server exposes, you will see the storage helpers plus the Actor itself, named after its Store handle:

get-actor-run, get-dataset-items, get-key-value-store-record,
abort-actor-run, scrapers_lat--uk-companies-house-scraper
Enter fullscreen mode Exit fullscreen mode

That last entry, scrapers_lat--uk-companies-house-scraper, is our KYB tool. Claude now knows it exists, what it does (from the Actor's README), and what inputs it takes (from the input schema the server passes along).

Step 4: Ask Claude to verify a company

Now the payoff. In a normal chat, ask a question that requires ground truth:

"Before we onboard Tesco PLC as a supplier, is it a real, active UK company? What is its company number, status, incorporation date, registered office, and who are its current directors?"

Claude recognizes it cannot answer this reliably from memory, selects the Companies House tool, and fills in the input from your question. Under the hood the client sends a tools/call with the Actor's parameters:

{
  "name": "scrapers_lat--uk-companies-house-scraper",
  "arguments": {
    "searchQuery": "TESCO PLC",
    "withOfficers": true,
    "maxCompanies": 3
  }
}
Enter fullscreen mode Exit fullscreen mode

The Apify MCP server starts the Actor, waits for it to finish, and returns the dataset. Here is the real run metadata it produced:

{
  "runId": "fJhFJzwb4edCzMlMr",
  "actorName": "scrapers_lat/uk-companies-house-scraper",
  "status": "SUCCEEDED",
  "startedAt": "2026-07-30T17:43:23.282Z",
  "finishedAt": "2026-07-30T17:43:27.818Z",
  "stats": { "runTimeSecs": 4.4 }
}
Enter fullscreen mode Exit fullscreen mode

Under five seconds, live against Companies House.

Step 5: Read the real output

The dataset the tool returns is structured register data. This is an actual record from the run (trimmed to the fields that matter for KYB):

{
  "companyNumber": "00445790",
  "companyName": "TESCO PLC",
  "status": "Active",
  "type": "Public limited Company",
  "incorporationDate": "27 November 1947",
  "registeredAddress": "Tesco House, Shire Park, Kestrel Way, Welwyn Garden City, AL7 1GA",
  "sicCodes": [
    { "code": "47110",
      "description": "Retail sale in non-specialised stores with food, beverages or tobacco predominating" }
  ],
  "lastAccountsMadeUpTo": "28 February 2026",
  "lastConfirmationStatementDate": "18 June 2026",
  "officers": [
    { "name": "TAYLOR, Christopher Jon", "role": "Secretary", "status": "Active",
      "appointedOn": "14 April 2025" },
    { "name": "BETHELL, Melissa", "role": "Director", "status": "Active",
      "appointedOn": "24 September 2018", "nationality": "British",
      "countryOfResidence": "United Kingdom" },
    { "name": "BODSON, Bertrand Jean Francois", "role": "Director", "status": "Active",
      "appointedOn": "1 June 2021", "nationality": "Belgian",
      "countryOfResidence": "England" }
  ],
  "url": "https://find-and-update.company-information.service.gov.uk/company/00445790"
}
Enter fullscreen mode Exit fullscreen mode

Claude reads that and answers in plain language: yes, the entity is active, it is a UK Public Limited Company, its company number is 00445790, it was incorporated in 1947, its registered office is Tesco House in Welwyn Garden City, and its current officers include company secretary Christopher Jon Taylor (appointed April 2025) and directors Melissa Bethell and Bertrand Bodson. The record lists 11 active and 35 total officers, so any signatory can be matched against a named director. Every one of those facts is traceable to an official register entry, not the model's memory.

Claude calling the UK Companies House tool and answering with live register data

The counter-example is just as important. Search the same term with a wider net and the tool also returns TESCO AQUA (FINCO2) LIMITED, company number 05888957, status Dissolved. An agent doing due diligence needs to see that a name match can be a dissolved subsidiary or shell, not the trading entity the user meant. The tool surfaces the status and company number for every hit; the model alone would not.

A real use case: a supplier due-diligence agent

Put this in context. A procurement or compliance analyst is onboarding a new UK supplier and needs to confirm, before signing, that:

  1. the legal entity exists and is active (not dissolved or in liquidation),
  2. the person signing the contract is actually a serving director or the company secretary, and
  3. the registered office and nature of business match what the supplier claims.

Without a tool, the analyst opens the Companies House website, types the name, picks the right entity out of a list of near-identical names, clicks into the record, opens the officers tab, and copies fields into a form, once per supplier. With the tool wired into Claude, the analyst pastes the supplier list into the chat and asks the agent to verify each one. Claude calls the Actor per company, compares the signer's name against the returned officers, flags any Dissolved or liquidation status, checks the incorporation date against the "established 20XX" claim on the supplier's website, and produces a short go/no-go note with the company number as evidence. The manual lookup step disappears; the judgment stays with the human.

This is the shape of every good agent tool: it removes the mechanical fetch, not the decision.

Going further: chain a second tool

KYB rarely stops at "does it exist." Many UK suppliers are VAT-registered and invoice cross-border, so the next question is usually whether the VAT number they gave you is valid and matches the company name. The same MCP connection can expose more Actors by extending the tools parameter:

https://mcp.apify.com?tools=scrapers_lat/uk-companies-house-scraper,scrapers_lat/eu-vat-vies-validation-scraper
Enter fullscreen mode Exit fullscreen mode

Now the agent can confirm the company on Companies House and validate its VAT number against the official EU VIES service in the same conversation, checking that the registered name and address on the VAT record line up with the Companies House entity, then combine both results into one risk summary. Because each Actor is a separate tool, the agent picks the right one for each step on its own: register lookup first, VAT validation second, one verdict at the end.

🏹 Troubleshooting: if the tool does not appear in Claude, the two usual causes are a missing or misspelled Actor handle in the tools parameter (it must be the exact username/actor-name from the Store URL) and a config that was edited while Claude was running. Fix the handle, save, and fully restart the client.

📌 Note: UK company names are rarely unique, so several entities can share almost the same name (a PLC, its subsidiaries, and dissolved shells). Give Claude the company number when you have it, or ask it to confirm the status and registered office before trusting a match. Each tool call is a real Actor run billed to your Apify account (this Actor is pay-per-result). For one-off verification the cost is a fraction of a cent; if you plan to check thousands of companies on a schedule, run the Actor directly through the Apify API or a scheduled task instead of one call per chat message.

Wrapping up

You now have an AI agent that can verify a UK company against the official Companies House register, on demand, mid-conversation, with the officer and status detail a due-diligence check actually needs. The pattern is reusable: pick an Actor that returns authoritative structured data, expose it through the Apify MCP server with the tools parameter, and let the agent decide when to call it.

To take it further:

  • Swap in a different jurisdiction by changing the Actor handle. The setup is identical.
  • Add VAT validation, sanctions, or ownership (PSC) screening to build a multi-step compliance agent.
  • Read the Apify MCP server docs for OAuth setup, resource reads, and the search-actors / call-actor tools that let an agent discover Actors it was not preconfigured with.

The Actors used in this guide: UK Companies House Scraper and EU VAT Number Validation Scraper (VIES).

Top comments (0)