npm @cyanheads/nhtsa-vehicle-safety-mcp-serverstreamable-httpApache-2.0updated 17d ago
@cyanheads/nhtsa-vehicle-safety-mcp-server Decode VINs, search recalls, complaints, crash ratings, and investigations via MCP. STDIO or Streamable HTTP. 7 Tools
What can you do with nhtsa vehicle safety mcp server?
Public Hosted Server: https://nhtsa.caseyjhand.com/mcp
Tools
Seven tools for querying NHTSA vehicle safety data:
| Tool Name | Description |
|---|---|
nhtsa_get_vehicle_safety |
Comprehensive safety profile combining crash test ratings, recalls, and complaint summary with per-section availability status. |
nhtsa_search_recalls |
Search recall campaigns by vehicle or campaign number with optional date filtering. |
nhtsa_search_complaints |
Consumer safety complaints with component breakdown and severity stats. |
nhtsa_get_safety_ratings |
NCAP crash test ratings and ADAS feature availability. |
nhtsa_decode_vin |
Decode VINs for make, model, year, engine, safety equipment (single or batch up to 50). |
nhtsa_search_investigations |
Search NHTSA defect investigations (PE, EA, DP, RQ, AQ, and more) with cached index. |
nhtsa_lookup_vehicles |
Look up valid makes, models, vehicle types, and manufacturer details from VPIC. |
nhtsa_get_vehicle_safety
Composite safety profile — the default tool when asked about vehicle safety, reliability, or purchase decisions.
- Combines NCAP crash test ratings, recall history, and complaint summary in a single response
- Frontal crash, side crash, and rollover ratings per vehicle variant
- Recall consequence text plus the do-not-drive, park-outside, and over-the-air-update advisories
- Complaint breakdown by component with crash, fire, injury, and death counts
- Returns
sectionStatusplus warnings so upstream outages are not mistaken for a clean record
nhtsa_search_recalls
Search recall campaigns by vehicle or campaign number.
- Look up by make/model/year or by specific NHTSA campaign number
- Campaign lookups return every make/model the campaign covers, plus the ODI investigation that preceded it
- Optional date range filtering (ISO 8601)
- Includes do-not-drive advisories, park-outside warnings, and OTA update availability
nhtsa_decode_vin
Decode Vehicle Identification Numbers for manufacturing and safety details.
- Single VIN or batch decode up to 50 VINs
- Partial VINs accepted — use
*for unknown positions - Preserves sparse VPIC fields instead of filling missing data with empty placeholders
nhtsa_search_investigations
Search NHTSA defect investigations.
- Investigation types: Preliminary Evaluations (PE), Engineering Analyses (EA), Defect Petitions (DP), Recall Queries (RQ), Audit Queries (AQ), and additional ODI codes (SQ, EQ, RP, and others)
- Free-text search across investigation IDs, subjects, and summaries, plus structured make, model, and component filters
nhtsaIdfetches one investigation by its exact ID — the reverse of the recall link, closing the campaign-to-investigation round trip- Sourced from NHTSA's ODI bulk file (
FLAT_INV.zip) — the first query downloads and parses it (~10s), subsequent queries use the cached index (24h TTL, matching the file's daily refresh) - Returns up to 25 investigations per page; the response echoes
offset/limitand the offset for the next page
nhtsa_search_complaints
Search consumer safety complaints filed with NHTSA.
- Component breakdown with crash, fire, injury, and death counts
- Optional component filter (e.g., "ENGINE", "AIR BAGS")
- Returns up to 50 most recent complaints sorted by filing date
- An incident date the complaint's own filing date or model year rules out is disclosed as
unreliableIncidentDaterather than served as the incident date
nhtsa_get_safety_ratings
NCAP crash test ratings and ADAS feature data.
- Frontal crash, side crash (barrier + pole), and rollover ratings
- ADAS features: ESC, forward collision warning, lane departure warning
- Accepts either make/model/year or a follow-up
vehicleIdfrom earlier NCAP results - Counts of complaints, recalls, and investigations on file
nhtsa_lookup_vehicles
Reference lookups against NHTSA's VPIC database.
- Four operations:
makes,models,vehicle_types,manufacturer makessupportslimitandoffsetpagination for the full VPIC catalog- Use to resolve ambiguous vehicle names or verify correct spelling
- Models can be filtered by year; manufacturers support partial match
manufacturerpages VPIC up to a 500-record ceiling and discloses when a broad partial name hits it
Features
Built on @cyanheads/mcp-ts-core:
- Declarative tool definitions — single file per tool, framework handles registration and validation
- Unified error handling across all tools
- Pluggable auth (
none,jwt,oauth) - Swappable storage backends:
in-memory,filesystem,Supabase,Cloudflare KV/R2/D1 - Structured logging with optional OpenTelemetry tracing
- Runs locally (stdio/HTTP) from the same codebase
NHTSA-specific:
- Type-safe client wrapping four NHTSA JSON APIs with retry logic and sparse-field normalization, plus a streaming parser for the ODI investigations bulk file
- Investigation index caching (24h TTL) for fast repeated queries
- No API key required — all NHTSA APIs are public
Getting started
Public Hosted Instance
A public instance is available at https://nhtsa.caseyjhand.com/mcp — no installation required. Point any MCP client at it via Streamable HTTP:
{
"mcpServers": {
"nhtsa-vehicle-safety-mcp-server": {
"type": "streamable-http",
"url": "https://nhtsa.caseyjhand.com/mcp"
}
}
}
Self-Hosted / Local
Add the following to your MCP client configuration file:
{
"mcpServers": {
"nhtsa-vehicle-safety-mcp-server": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/nhtsa-vehicle-safety-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}
Or with npx (no Bun required):
{
"mcpServers": {
"nhtsa-vehicle-safety-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cyanheads/nhtsa-vehicle-safety-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}
Or with Docker:
{
"mcpServers": {
"nhtsa-vehicle-safety-mcp-server": {
"type": "stdio",
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/nhtsa-vehicle-safety-mcp-server:latest"]
}
}
}
For Streamable HTTP, set the transport and start the server:
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http
# Server listens at http://localhost:3010/mcp
Prerequisites
- Bun v1.3.2 or higher (or Node.js >= 24.0.0)
Installation
- Clone the repository:
git clone https://github.com/cyanheads/nhtsa-vehicle-safety-mcp-server.git
- Navigate into the directory:
cd nhtsa-vehicle-safety-mcp-server
- Install dependencies:
bun install
Configuration
No API keys required — all NHTSA APIs are public.
| Variable | Description | Default |
|---|---|---|
MCP_TRANSPORT_TYPE |
Transport: stdio or http. |
stdio |
MCP_HTTP_HOST |
HTTP server host. | 127.0.0.1 |
MCP_HTTP_PORT |
HTTP server port. | 3010 |
MCP_HTTP_ENDPOINT_PATH |
HTTP endpoint path. | /mcp |
MCP_AUTH_MODE |
Auth mode: none, jwt, or oauth. |
none |
MCP_LOG_LEVEL |
Log level (RFC 5424). | info |
Data sources
All data comes from NHTSA's public APIs and bulk files:
- Recalls API —
api.nhtsa.gov/recalls - Complaints API —
api.nhtsa.gov/complaints - Safety Ratings API —
api.nhtsa.gov/SafetyRatings - Investigations bulk file —
static.nhtsa.gov/odi/ffdd/inv/FLAT_INV.zip - VPIC API —
vpic.nhtsa.dot.gov/api/vehicles
Running the server
Local development
bun run devcheck # Lints, formats, type-checks, and more
bun run test # Runs the test suite
Production
bun run build
bun run start:stdio # Production stdio
bun run start:http # Production HTTP
Docker
docker build -t nhtsa-vehicle-safety-mcp-server .
docker run -p 3010:3010 nhtsa-vehicle-safety-mcp-server
Project structure
| Directory | Purpose |
|---|---|
src/index.ts |
Server entry point — createApp() registration. |
src/mcp-server/tools/definitions/ |
Tool definitions (*.tool.ts). |
src/services/nhtsa/ |
NHTSA API client and ODI bulk-file parser with field normalization. |
Development guide
See CLAUDE.md for development guidelines and architectural rules. The short version:
- Handlers throw, framework catches — no
try/catchin tool logic - Use
ctx.logfor logging - One tool per file,
nhtsa_prefix for all tool names
Contributing
Issues and pull requests are welcome. Run checks before submitting:
bun run devcheck
bun run test
License
Apache-2.0 — see LICENSE for details.
Install
Add nhtsa vehicle safety mcp server to your client. Pick the one you use.
{
"servers": {
"nhtsa-vehicle-safety-mcp-server": {
"type": "http",
"url": "https://nhtsa.caseyjhand.com/mcp"
}
}
}Add to `.vscode/mcp.json` in your workspace.
claude mcp add nhtsa-vehicle-safety-mcp-server -- npx -y @cyanheads/nhtsa-vehicle-safety-mcp-servercodex mcp add nhtsa-vehicle-safety-mcp-server -- npx -y @cyanheads/nhtsa-vehicle-safety-mcp-serveramp mcp add nhtsa-vehicle-safety-mcp-server -- npx -y @cyanheads/nhtsa-vehicle-safety-mcp-server{
"mcpServers": {
"nhtsa-vehicle-safety-mcp-server": {
"command": "npx",
"args": [
"-y",
"@cyanheads/nhtsa-vehicle-safety-mcp-server"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"nhtsa-vehicle-safety-mcp-server": {
"command": "npx",
"args": [
"-y",
"@cyanheads/nhtsa-vehicle-safety-mcp-server"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
{
"mcpServers": {
"nhtsa-vehicle-safety-mcp-server": {
"command": "npx",
"args": [
"-y",
"@cyanheads/nhtsa-vehicle-safety-mcp-server"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"nhtsa-vehicle-safety-mcp-server": {
"command": "npx",
"args": [
"-y",
"@cyanheads/nhtsa-vehicle-safety-mcp-server"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"nhtsa-vehicle-safety-mcp-server": {
"command": "npx",
"args": [
"-y",
"@cyanheads/nhtsa-vehicle-safety-mcp-server"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"nhtsa-vehicle-safety-mcp-server": {
"type": "local",
"command": "npx",
"args": [
"-y",
"@cyanheads/nhtsa-vehicle-safety-mcp-server"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"nhtsa-vehicle-safety-mcp-server": {
"command": {
"path": "npx",
"args": [
"-y",
"@cyanheads/nhtsa-vehicle-safety-mcp-server"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y @cyanheads/nhtsa-vehicle-safety-mcp-serverRun `goose configure`, choose **Add Extension → Command-line Extension**, and paste this command.
7 tools
nhtsa vehicle safety mcp server exposes 7 tools to a connected agent.
- nhtsa_get_vehicle_safety
- Comprehensive safety profile combining crash test ratings, recalls, and complaint summary with per-section availability status.
- nhtsa_search_recalls
- Search recall campaigns by vehicle or campaign number with optional date filtering.
- nhtsa_search_complaints
- Consumer safety complaints with component breakdown and severity stats.
- nhtsa_get_safety_ratings
- NCAP crash test ratings and ADAS feature availability.
- nhtsa_decode_vin
- Decode VINs for make, model, year, engine, safety equipment (single or batch up to 50).
- nhtsa_search_investigations
- Search NHTSA defect investigations (PE, EA, DP, RQ, AQ, and more) with cached index.
- nhtsa_lookup_vehicles
- Look up valid makes, models, vehicle types, and manufacturer details from VPIC.
Score
84 / 100
Excellent
- Documentation25/25
- Maintenance25/25
- Trust13/20
- Capability6/15
- Install experience15/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 10 days ago
- Has a release history
- Repository is not archived
- Licensed Apache-2.0
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 7 tool(s) documented
- Provides prompt templates
- Provides resources
- 18 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint — no local install
Version history
| Versions | Published |
|---|---|
| 0.9.5Latest | Aug 21, 2026 |
| 0.9.4 | Jul 30, 2026 |
| 0.9.3 | Jul 30, 2026 |
| 0.9.2 | Jul 30, 2026 |
| 0.9.1 | Jul 30, 2026 |
| 0.9.0 | Jul 30, 2026 |
| 0.8.4 | Jun 20, 2026 |
| 0.8.3 | Jun 13, 2026 |
| 0.8.2 | Jun 2, 2026 |
| 0.8.1 | Jun 1, 2026 |
| 0.8.0 | May 30, 2026 |
| 0.7.6 | May 30, 2026 |
| 0.7.5 | May 29, 2026 |
| 0.7.4 | May 23, 2026 |
| 0.7.3 | May 16, 2026 |
| 0.7.2 | May 8, 2026 |
| 0.7.1 | Apr 24, 2026 |
| 0.7.0 | Apr 23, 2026 |
| 0.6.1 | Apr 21, 2026 |
| 0.6.0 | Apr 19, 2026 |
| 0.5.0 | Apr 15, 2026 |
| 0.4.1 | Apr 8, 2026 |
| 0.4.0 | Apr 4, 2026 |
| 0.3.2 | Apr 4, 2026 |
| 0.3.1 | Apr 3, 2026 |