DEV Community

Cover image for How to give Claude a vehicle safety-recall lookup tool with the Apify MCP server
Michael
Michael

Posted on • Originally published at scrapers.lat

How to give Claude a vehicle safety-recall lookup tool with the Apify MCP server

Ask Claude whether a 2018 Honda Accord has any open safety recalls and it will give you a confident, fluent answer drawn from its training data. That answer may be incomplete, out of date, or wrong, because recall campaigns are filed continuously and expanded years after a model ships. For a dealer pricing a trade-in, an insurer assessing risk, or a shopper about to hand over money, "probably fine" is the wrong standard. A car with an unremedied fuel-pump defect that can stall the engine on the highway is not a rounding error.

In this guide we fix that. We connect Claude to the official Apify MCP server, expose a single Actor that reads the U.S. National Highway Traffic Safety Administration (NHTSA) recall records, and turn "does this vehicle have recalls?" from a guess into a live lookup against the federal source of record. By the end you will have a working recall-lookup tool that Claude, Cursor, or any MCP client can call mid-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 make, model, and year 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 NHTSA Vehicle Recalls & Complaints Scraper. You give it a make, a model, and one or more model years, and it returns every official safety-recall campaign on record for that vehicle: the NHTSA campaign number, the affected component, the defect summary, the safety consequence, the remedy, the report date, the number of units potentially affected, and flags such as "park it" or "park outside" for the most dangerous fire-risk recalls.

That field set is exactly what an auto-marketplace listing check, a dealer reconditioning workflow, an insurance underwriting note, or a consumer buying decision needs. The data is public, authoritative, and carries no login wall.

The NHTSA Vehicle Recalls & Complaints 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/nhtsa-recalls-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/nhtsa-recalls-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--nhtsa-recalls-scraper
Enter fullscreen mode Exit fullscreen mode

That last entry, scrapers_lat--nhtsa-recalls-scraper, is our recall-lookup 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 about a vehicle

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

"I'm looking at a used 2018 Honda Accord. Does it have any open safety recalls I should worry about?"

Claude recognizes it cannot answer this reliably from memory, selects the recall 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--nhtsa-recalls-scraper",
  "arguments": {
    "makes": ["Honda"],
    "models": ["Accord"],
    "modelYears": ["2018"],
    "dataset": "recalls",
    "maxRecalls": 25
  }
}
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": "2bLeVVxCCOnumq0yW",
  "actorName": "scrapers_lat/nhtsa-recalls-scraper",
  "status": "SUCCEEDED",
  "datasetItems": 6
}
Enter fullscreen mode Exit fullscreen mode

Six recall campaigns, live against the federal record.

Step 5: Read the real output

The dataset the tool returns is structured recall data, one record per campaign. This is an actual record from the run:

{
  "campaignNumber": "20V314000",
  "make": "HONDA",
  "model": "ACCORD",
  "modelYear": "2018",
  "component": "FUEL SYSTEM, GASOLINE:DELIVERY:FUEL PUMP",
  "summary": "Honda is recalling certain 2018-2019 Accord and other vehicles. The low-pressure fuel pump inside the fuel tank may fail.",
  "consequence": "If the fuel pump fails, the engine can stall while driving, increasing the risk of a crash.",
  "remedy": "Honda will notify owners and dealers will replace the fuel pump assembly, free of charge. The recall began July 22, 2020.",
  "manufacturer": "Honda (American Honda Motor Co.)",
  "potentialUnitsAffected": 135995,
  "parkIt": false,
  "parkOutSide": false
}
Enter fullscreen mode Exit fullscreen mode

Claude calling the NHTSA recall tool and answering with live campaign data

Claude reads that and answers in plain language: yes, the 2018 Accord carries several open campaigns, the most serious being 20V314000, a fuel-pump defect that can stall the engine while driving, remedied by a free dealer replacement that began July 22, 2020, affecting roughly 135,995 units. The run also surfaced 23V158000 (a front seat-belt buckle that may fail to latch) and 20V771000 (a Body Control Module software fault affecting the wipers, defroster, and rearview camera). Every one of those facts is traceable to an official NHTSA campaign, not the model's memory.

The parkIt and parkOutSide flags are worth watching. When NHTSA marks a recall "park outside," it means the vehicle can catch fire even when switched off, and owners are told not to park it in a garage or near a building. An agent triaging a fleet or a listing page can filter on those two booleans alone to find the cars that need to come off the road today.

The other fields carry weight in different workflows. component uses NHTSA's own controlled vocabulary, so an agent can group recalls by system, all the fuel-system campaigns, all the airbag campaigns, across an entire inventory. potentialUnitsAffected tells you whether a campaign touched a handful of cars or, as with the expanded fuel-pump recall in this model line, more than two million, which is a rough proxy for how likely a given used car is to be caught up in it. And because every record carries the exact campaignNumber, the answer Claude gives is auditable: anyone can drop that number into the NHTSA site and see the same official filing.

A real use case: a marketplace listing-integrity agent

Put this in context. An online auto marketplace wants every listing to carry an accurate recall badge, and it does not want to pay a human to check thousands of cars. Wired into Claude, the flow becomes: for each listing, the agent reads the make, model, and year, calls the Actor, and gets back the full campaign list. It counts the open recalls, pulls the worst consequence into a one-line warning, and raises a red flag on any record where parkIt or parkOutSide is true.

A dealer can run the same tool the other direction, before reconditioning, so a car is never advertised as "certified" while a free safety fix is still outstanding. An insurer can attach recall exposure to an underwriting note. A shopper can paste a few candidates into the chat and ask which one has the cleanest safety history. In every case the mechanical lookup disappears and the judgment stays with the human.

The economics matter here too. The manual version of this check is a person opening the NHTSA site, typing a make and model, reading through each campaign, and copying the important lines into a spreadsheet, several minutes per vehicle. Across a lot of a few hundred cars that is a full day of tedious work that goes stale the moment a new campaign is filed. The agent version runs in seconds per car, costs a fraction of a cent per lookup, and can be re-run on a schedule so the recall badge on every listing stays current. Because the tool returns the raw potentialUnitsAffected count and the campaign date alongside the text, the agent can also sort a fleet by exposure, oldest unremedied campaigns first, and hand a service manager a prioritized worklist instead of an undifferentiated pile.

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

Going further: chain a second tool

A recall list is keyed to make, model, and year, but recalls are ultimately closed out per vehicle, and the only way to nail down the exact car is its VIN. The same MCP connection can expose a second Actor by extending the tools parameter:

https://mcp.apify.com?tools=scrapers_lat/nhtsa-recalls-scraper,scrapers_lat/nhtsa-vin-decoder-scraper
Enter fullscreen mode Exit fullscreen mode

Now the agent can take a 17-character VIN, decode it into the exact make, model, year, trim, engine, and plant with the NHTSA VIN Decoder & Vehicle Specs Scraper, then feed those decoded values straight into the recall tool, in the same conversation. The shopper pastes a VIN off a windshield; the agent decodes it, looks up the campaigns, and answers with a per-vehicle recall summary. Because each Actor is a separate tool, the agent picks the right one for each step on its own.

🏹 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: each tool call is a real Actor run billed to your Apify account (this Actor is pay-per-result). A recall lookup returns only a handful of records, so a one-off check costs a fraction of a cent; if you plan to screen an entire inventory on a schedule, run the Actor directly through the Apify API or a scheduled task instead of one call per chat message. Recall counts also vary by model and year: a clean vehicle may return zero records, which is itself a useful signal.

Wrapping up

You now have an AI agent that can check any U.S. vehicle against the official federal recall record, on demand, mid-conversation, with the campaign number, component, consequence, and remedy a real safety decision 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:

  • Switch dataset from recalls to consumer complaints to see the problems owners are reporting before they become formal recalls.
  • Chain the VIN decoder so the agent works from a single VIN instead of a typed make and model.
  • 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 Actor used in this guide: NHTSA Vehicle Recalls & Complaints Scraper.

Top comments (0)