nhtsa-recalls-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@nhtsa-recalls-mcpdecode VIN 5YJ3E1EA7KF317000 and list its open recalls"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
nhtsa-recalls-mcp
A remote Model Context Protocol (MCP) server that gives Claude, ChatGPT, Cursor, or any MCP client read-only access to the US NHTSA public vehicle-safety datasets: VIN decoding, safety recalls, owner complaints, and 5-Star (NCAP) safety ratings.
Runs on Cloudflare Workers as a stateless streamable-HTTP server. No database, no API keys for the data (NHTSA's APIs are public), one file of config, one command to deploy.
Built by Dylan Lane (Chucks-Lab) as a reference implementation of the pattern most businesses actually need: a small, allowlisted, read-only MCP server in front of an existing API, with logging, upstream error handling, and an optional bearer token.
Claude / ChatGPT / Cursor --(MCP over HTTPS)--> Cloudflare Worker --(HTTPS)--> api.nhtsa.gov, vpic.nhtsa.dot.gov
/mcp MCP endpoint (POST)
/health JSON status + tool listTools
Tool | What it does |
| Decode a VIN with NHTSA vPIC: make, model, year, trim, body class, engine, fuel type, plant, GVWR, decode warnings. |
| The model names NHTSA uses for a make and year (recalls or complaints catalog). Use it to get spellings right. |
| Recalls for make/model/year: campaign number, date, component, summary, consequence, remedy, park-it / park-outside / OTA flags. Newest first. |
| One recall by campaign number (e.g. |
| Owner complaints for make/model/year: total, crash/fire/injury/death counts, top components, most recent complaints. Filter by component. |
| NCAP ratings for make/model/year. Lists rated variants (2WD/4WD, cab styles) or returns the full rating when there is one. Suggests spellings when the model name misses. |
| Full 5-Star ratings for one rated variant by NHTSA VehicleId. |
Every tool is annotated readOnlyHint: true. Each returns a readable text block plus structuredContent
JSON for clients that use it.
Example prompts once connected:
"Decode VIN 5YJ3E1EA7KF317000 and list its open recalls."
"How many complaints does a 2019 Ford F-150 have about the transmission? Show the three most recent."
"Compare the NCAP ratings of the 2019 F-150 SuperCrew 4x2 and 4x4."
Related MCP server: RecallChecker
Try the public instance
Health:
https://nhtsa-recalls-mcp.chucks-lab.workers.dev/healthMCP endpoint:
https://nhtsa-recalls-mcp.chucks-lab.workers.dev/mcp
Claude (web or desktop): Settings -> Connectors -> Add custom connector -> paste the /mcp URL.
Claude Code: claude mcp add --transport http nhtsa https://nhtsa-recalls-mcp.chucks-lab.workers.dev/mcp
Cursor: add { "mcpServers": { "nhtsa": { "url": "https://nhtsa-recalls-mcp.chucks-lab.workers.dev/mcp" } } } to mcp.json.
Deploy your own (5 minutes)
Requirements: Node 20+, a Cloudflare account (the free plan is enough), npx wrangler login done once.
git clone https://github.com/chucks-lab/nhtsa-recalls-mcp
cd nhtsa-recalls-mcp
npm install
npm run dev # local server on http://127.0.0.1:8787
npm test # 11 unit tests against recorded NHTSA responses (no network)
npm run test:e2e # real MCP client against the local server and live NHTSA data
npm run deploy # wrangler deploy -> prints your workers.dev URLOn Windows PowerShell where npm run wrappers are blocked, call the tools directly: npx.cmd wrangler dev,
npx.cmd wrangler deploy, npx.cmd vitest run. If your machine sets NODE_ENV=production, npm skips dev
dependencies; use npm install --include=dev.
Configuration
All settings live in wrangler.jsonc under vars, except the secret.
Setting | Default | Meaning |
| all seven | Comma-separated allowlist. Remove a name and the tool disappears from |
|
| Per-request timeout for NHTSA calls (clamped 1000-25000). One retry with backoff on 429, 5xx, timeouts and network errors. |
|
|
|
| unset | Secret. When set, every |
Locking it down with a bearer token
openssl rand -hex 32 | npx wrangler secret put MCP_BEARER_TOKENThen add the header in your client. Claude custom connectors support a bearer token field; Claude Code:
claude mcp add --transport http nhtsa https://<host>/mcp --header "Authorization: Bearer <token>".
Rotating the secret
openssl rand -hex 32 | npx wrangler secret put MCP_BEARER_TOKEN(takes effect on the next deploy-less reload, usually within seconds).Update the token in each client.
Old token stops working immediately; there is no dual-token window by design. If you need one, add a second secret (
MCP_BEARER_TOKEN_PREVIOUS) and accept either insrc/index.tsfor the rotation window.
Never commit tokens. .dev.vars (for local wrangler dev) is git-ignored.
Logs and observability
Workers Logs are enabled in wrangler.jsonc (observability.logs). Every request emits one JSON line:
{"ts":"2026-09-13T02:37:38.205Z","requestId":"<cf-ray>","path":"/mcp","method":"POST","event":"request","status":200,"ms":7,"tools_enabled":7,"tools_total":7}
{"ts":"...","requestId":"<cf-ray>","event":"tool","tool":"get_recalls","ms":412,"ok":true}Tail live: npx wrangler tail. Upstream failures log event: "tool", ok: false, upstreamStatus: 503 and
return an MCP tool result with isError: true and a plain-English message, never a protocol error.
Design notes
Stateless per request.
createMcpHandlerfrom@modelcontextprotocol/serverbuilds a freshMcpServerfor every HTTP request; nothing is held between calls, so the Worker scales to zero and needs no Durable Objects.Allowlist, not blocklist. The server only ever registers the tools named in
ALLOWED_TOOLS. A hidden tool cannot be called.Read-only by construction. There is no code path that writes anywhere. Adding a write tool is a deliberate change, not a flag.
Upstream quirks handled. NHTSA returns DD/MM/YYYY dates from the recalls API and MM/DD/YYYY from the complaints API; the ratings dataset spells models differently ("F-150 SUPER CREW"). The server sorts correctly and suggests spellings instead of returning empty results.
Two Workers gotchas already fixed for you. Calling a stored global
fetchthrows "Illegal invocation" (wrap it), andnew Date()at module scope reads as 1970 (compute inside the request).
Project layout
src/index.ts Worker entry: routing, bearer auth, request logging
src/server.ts MCP server factory: tool definitions, allowlist, formatting
src/nhtsa.ts NHTSA HTTP client: timeouts, retry, date parsing, VIN masking in logs
test/ vitest unit tests with recorded fixtures; e2e-client.mjs for a live run
wrangler.jsonc Worker config and non-secret settingsData source and disclaimer
Data comes from the US National Highway Traffic Safety Administration public APIs (api.nhtsa.gov and vpic.nhtsa.dot.gov). This project is not affiliated with NHTSA. Recall and complaint data can lag and complaints are unverified consumer reports; confirm safety-critical information with the manufacturer or at nhtsa.gov/recalls.
License
MIT. See LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
NHTSA MCP — wraps the NHTSA vPIC (Vehicle Product Information Catalog) API (free, no auth)
Decodes US VINs and looks up open NHTSA safety recall campaigns for a vehicle.
Decode any VIN and check open NHTSA safety recalls. Free official US government data, no auth.
Vehicle safety recalls, complaints, and crash data from NHTSA
Related MCP Servers
- AlicenseAqualityAmaintenanceConnects Claude to NHTSA vehicle safety data, enabling VIN decoding, recall checks, crash-test ratings, and consumer complaints via natural language.5MIT
- AlicenseNot gradedqualityDmaintenanceEnables instant U.S. vehicle recall lookup by make, model, and year using official NHTSA data.MIT
- AlicenseNot gradedqualityCmaintenanceA remote MCP server that provides tools to decode vehicle VINs and check for open safety recalls using NHTSA's public APIs.MIT
- AlicenseNot gradedqualityCmaintenanceEnables searching current used car, truck, and motorcycle parts in the US, resolving vehicles via VIN, and retrieving part listings with source attribution, through read-only MCP tools.Apache 2.0