Skip to main content
Glama

vehicle-safety-mcp

CI License Release

An MCP server that connects Claude to NHTSA vehicle safety data — VIN decoding, safety recalls, NCAP crash-test ratings, and consumer complaints. Ask Claude "does my car have any recalls?" and get a real answer from the US government's own data.

Built on the free NHTSA public APIs — no API key required.

Why

Vehicle safety data is public but painful: it lives across several government APIs, each response carries 100+ mostly-empty fields, and safety ratings require a two-step lookup nobody remembers. This server does the plumbing so the conversation stays natural:

You: Is a 2020 Honda Civic safe? Anything I should know before buying one?

Claude: (calls get_safety_ratings + get_recalls + get_complaints) The 2020 Civic earned a 5-star overall NCAP rating… it has a handful of recall campaigns worth knowing about… and the component owners complain about most is…

Related MCP server: Vincario MCP Server

Tools

Tool

What it does

decode_vin

VIN → make, model, year, engine, plant, safety equipment

check_vin_recalls

VIN → decoded vehicle + its recall campaigns, in one step

get_recalls

Recall campaigns for a make/model/year (defect, consequence, remedy)

get_safety_ratings

NCAP crash-test star ratings per body-style variant

get_complaints

Consumer complaints, grouped by component, with recent narratives

Responses are deliberately trimmed for LLM consumption — raw NHTSA payloads are noisy, so the server keeps the fields that change an answer and drops the rest. Less context burned, better answers.

Quickstart

Requires uv (it manages Python ≥3.11 for you).

git clone https://github.com/basit-khan-abdul/vehicle-safety-mcp.git
cd vehicle-safety-mcp
uv sync

Claude Code

claude mcp add vehicle-safety -- uv run --directory /path/to/vehicle-safety-mcp vehicle-safety-mcp

Claude Desktop

Add to claude_desktop_config.json (Settings → Developer → Edit Config):

{
  "mcpServers": {
    "vehicle-safety": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/vehicle-safety-mcp", "vehicle-safety-mcp"]
    }
  }
}

Restart Claude Desktop; the tools appear under the 🔌 icon.

Try asking

  • "Decode this VIN: 5UXWX7C5BA"*

  • "Does the 2020 Honda Civic have any recalls?"

  • "Compare crash-test ratings of a 2021 Toyota RAV4 and a 2021 Honda CR-V"

  • "What do owners complain about most on the 2019 Ford F-150?"

Reliability

Every NHTSA call runs with explicit connect and read timeouts and retries only transient failures — 5xx responses and connection/timeout errors — up to 3 attempts with exponential backoff and full jitter; client errors (4xx) fail fast and are never retried. When the upstream is genuinely unreachable, tools return a structured {"error", "detail", "available": false} payload the model can relay honestly, never a raw traceback into the MCP layer. Timeouts, attempt count, and backoff are all environment-tunable (see Tuning). And because the NHTSA APIs are the real contract, a weekly scheduled job runs live smoke tests against them and opens a GitHub issue the moment a field or response shape drifts — so breakage surfaces before users do.

Tests

Two suites, split by what they prove:

  • Unit (tests/unit/) — mocked, deterministic, offline. Run on every push/PR across Python 3.11 and 3.12 (CI).

  • Live (tests/live/) — real NHTSA API smoke tests. The upstream contract is the product, so a weekly scheduled job (contract-drift) re-runs them and opens an issue if the API drifts — instead of making every push depend on a third-party API.

uv run --extra dev pytest tests/unit     # fast, offline — what CI runs on push
uv run --extra dev pytest tests/live     # hits the real NHTSA APIs
uv run --extra dev pytest -m "not live"  # everything except live

Design notes

  • Trimmed responses over raw passthrough. Each NHTSA record is filtered to a curated field list (nhtsa.py). An LLM doesn't need 140 vPIC fields to say "it's a BMW X3".

  • Composite tool for the common question. check_vin_recalls chains decode → recall lookup because "does my car have recalls?" is the question real people ask — one tool call instead of two round trips.

  • Bounded output everywhere. Ratings capped at 5 variants, complaint narratives truncated at 400 chars, complaint list limited — tool output that scrolls forever helps nobody.

  • Resilient by default. Every NHTSA call has explicit connect/read timeouts and retries transient failures (5xx, connection errors, timeouts) up to 3 attempts with jittered backoff — but never retries a 4xx. When the upstream is genuinely down, tools return a structured {"error": …, "available": false} payload the model can relay honestly ("NHTSA data is currently unreachable; try again later") instead of surfacing a raw traceback.

Tuning

The HTTP behaviour is env-configurable (sensible defaults shown):

Variable

Default

Meaning

NHTSA_CONNECT_TIMEOUT

5.0

Connection timeout (seconds)

NHTSA_READ_TIMEOUT

20.0

Response read timeout (seconds)

NHTSA_MAX_ATTEMPTS

3

Total attempts per request (1 = no retry)

NHTSA_BACKOFF_BASE

0.5

Base backoff (seconds) before jitter

NHTSA_BACKOFF_CAP

8.0

Max backoff for any single retry (seconds)

MCP registries

Built to the Model Context Protocol spec and installable from source (see Quickstart). Browse or publish MCP servers via the community registries:

Data source & disclaimer

Data comes from the US National Highway Traffic Safety Administration public APIs and covers vehicles sold in the United States. This project is not affiliated with or endorsed by NHTSA. Always verify safety-critical information with official sources.

License

MIT © Basit Khan

Available Tools

5 tools
check_vin_recallsA

Decode a VIN and look up recalls for that exact vehicle in one step.

Call this when the user gives a VIN and asks "does my car have any recalls?" — it chains VIN decoding into a recall search automatically.

ParametersJSON Schema
NameRequiredDescriptionDefault
vinYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided. The description mentions chaining VIN decoding with recall search but does not disclose error handling, validity requirements, or any side effects. Adequate but could be more explicit.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, no redundancy. First sentence states the action, second provides an example use case. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has an output schema and is simple (one parameter), the description covers the essential behavior. Could mention error cases but overall complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Only one parameter 'vin' with no schema description. The description adds minimal detail beyond the parameter name. Baseline 3 is appropriate since the parameter is self-explanatory.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool decodes a VIN and looks up recalls in one step. It distinguishes itself from sibling tools like decode_vin and get_recalls by combining both actions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly provides a use case: 'Call this when the user gives a VIN and asks does my car have any recalls?' and implies alternatives for separate decoding or recall lookup.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

decode_vinA

Decode a VIN into vehicle details (make, model, year, engine, plant, safety equipment).

Call this when the user provides a VIN (17 characters, or a partial VIN) and wants to know what vehicle it is. Passing model_year improves accuracy for pre-2001 VINs.

ParametersJSON Schema
NameRequiredDescriptionDefault
vinYes
model_yearNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It adds some behavioral context by mentioning the output details and the optional model_year optimization, but does not disclose potential limitations, error handling, or data freshness. This leaves room for improvement.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences, each adding value: purpose, usage context, and parameter hint. No redundant information, perfectly concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the presence of an output schema (implied), the description covers the tool's functionality and parameter semantics adequately. It distinguishes from siblings and includes a helpful note. Missing details about error handling or partial VIN handling, but overall sufficient for a straightforward tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema has 0% description coverage, so the description must compensate. It adds meaning by stating that vin is a VIN (17 characters or partial) and that model_year improves accuracy, but it could provide more explicit constraints or format guidance for both parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states 'Decode a VIN into vehicle details (make, model, year, engine, plant, safety equipment)', specifying a verb and resource, and it distinguishes from sibling tools like check_vin_recalls and get_recalls which deal with different aspects.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Description says 'Call this when the user provides a VIN... and wants to know what vehicle it is', giving clear when-to-use context. It also notes that passing model_year improves accuracy for pre-2001 VINs. However, it lacks explicit when-not-to-use guidance or alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_complaintsA

Get consumer complaints filed with NHTSA for a vehicle, grouped by component.

Call this when the user asks about known problems, reliability issues, or owner-reported defects. Returns totals per component plus the most recent complaint narratives (truncated). Increase limit for more narratives.

ParametersJSON Schema
NameRequiredDescriptionDefault
makeYes
limitNo
modelYes
model_yearYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description discloses that the tool returns totals per component and truncated narratives, and is non-destructive. However, it doesn't mention rate limits or data freshness, but the behavioral description is adequate for a query tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four concise sentences, front-loaded with the purpose, followed by usage guidance, output description, and a practical hint. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given an output schema exists, the description adequately explains the output structure (grouped by component, totals, truncated narratives). It covers when to use and gives a usage hint. Missing details like error conditions but otherwise complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description only mentions the limit parameter ('Increase limit for more narratives'). It does not elaborate on make, model, or model_year, leaving them self-explanatory but not adding extra meaning.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it retrieves consumer complaints for a vehicle grouped by component, specifying the data source (NHTSA). It distinguishes from sibling tools like recalls, VIN decoding, and safety ratings by focusing on owner-reported problems.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says to call when the user asks about known problems, reliability issues, or defects. Offers a hint to increase limit for more narratives. While it doesn't mention when not to use, the context is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_recallsA

Get NHTSA safety recall campaigns for a vehicle make/model/year.

Call this when the user asks whether a vehicle has recalls, what a recall covers, or how a defect is remedied. Example: make="Honda", model="Civic", model_year=2020.

ParametersJSON Schema
NameRequiredDescriptionDefault
makeYes
modelYes
model_yearYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It indicates a read operation ('Get') and focuses on public safety data. However, it omits details like rate limits, error conditions, or what happens if no recalls are found. The basic behavior is clear but lacks depth.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise: two informative sentences plus an example. It front-loads the purpose, provides usage guidance, and is free of superfluous text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the presence of an output schema (which documents return values) and sibling tools for context, the description sufficiently covers when and how to use the tool. It could briefly mention the output structure but is adequate for the complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% coverage (no descriptions for parameters). The description adds value by providing an explicit example ('make="Honda", model="Civic", model_year=2020'), clarifying the expected format and use of each parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly states 'Get NHTSA safety recall campaigns for a vehicle make/model/year', using a specific verb and resource. It clearly distinguishes from siblings like check_vin_recalls which uses VIN.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit context: 'Call this when the user asks whether a vehicle has recalls, what a recall covers, or how a defect is remedied.' It includes an example but does not explicitly exclude other use cases or mention alternatives like check_vin_recalls.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_safety_ratingsA

Get NCAP crash-test star ratings (overall, frontal, side, rollover) for a vehicle.

Call this when the user asks how safe a vehicle is or how it scored in crash tests. Returns ratings per body-style variant.

ParametersJSON Schema
NameRequiredDescriptionDefault
makeYes
modelYes
model_yearYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. It discloses that results are per body-style variant, which is a behavioral trait. It does not mention destructive actions or auth needs, but the tool is a read-only lookup.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, highly concise, with the core action front-loaded. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

While the output schema exists (not shown), the description lacks any mention of required input parameters. For a 3-param required tool with 0% schema coverage, the description should at least list the expected inputs.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage for parameters. The description does not explain the parameters (make, model, model_year) or their formatting, leaving the agent to rely solely on parameter names. This is insufficient compensation for the low coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it retrieves NCAP crash-test star ratings for a vehicle, specifying rating types (overall, frontal, side, rollover) and mentioning per-body-style variants. This distinguishes it from sibling tools like recalls or VIN decode.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit guidance: 'Call this when the user asks how safe a vehicle is or how it scored in crash tests.' It does not explicitly state when not to use, but the context signals and sibling names imply distinct use cases.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A4.2/5.0
Disambiguation5/5

Each tool targets a distinct aspect of vehicle safety: VIN decoding, recalls (via two methods that are clearly differentiated), complaints, and safety ratings. No overlap in purpose.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern (check_, decode_, get_complaints, get_recalls, get_safety_ratings) with clear, descriptive names.

Tool Count5/5

5 tools is well-scoped for the vehicle safety domain, covering key information queries without unnecessary complexity.

Completeness4/5

The tool surface covers VIN decoding, recalls, complaints, and safety ratings. Minor gap: includes a combined decode+recall tool but no separate tool for service bulletins or NHTSA investigations.

Maintenance

ActivityNo data
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    A
    maintenance
    Enables Claude Desktop to access Tesla vehicle data through the Tessie API. Users can query their car's location, battery level, mileage, driving history, and charging status using natural language.
    5
    7
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to decode VINs, check stolen vehicle databases, and retrieve market valuations through natural language.
    2
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables natural-language querying of NHTSA vehicle safety data, including VIN decoding, recall searches, consumer complaints, crash-test ratings, and defect investigations via MCP.
    316
    1
    Apache 2.0

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/basit-khan-abdul/vehicle-safety-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server