{
  "markdown": "<div align=\"center\">\n  <h1>@cyanheads/nhtsa-vehicle-safety-mcp-server</h1>\n  <p><b>Decode VINs, search recalls, complaints, crash ratings, and investigations via MCP. STDIO or Streamable HTTP.</b>\n  <div>7 Tools</div>\n  </p>\n</div>\n\n<div align=\"center\">\n\n[![Version](https://img.shields.io/badge/Version-0.9.5-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/nhtsa-vehicle-safety-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-2.0.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/nhtsa-vehicle-safety-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/nhtsa-vehicle-safety-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^7.0.2-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.4.0-blueviolet.svg?style=flat-square)](https://bun.sh/)\n\n</div>\n\n<div align=\"center\">\n\n[![Install in Claude Desktop](https://img.shields.io/badge/Install_in-Claude_Desktop-D97757?style=for-the-badge&logo=anthropic&logoColor=white)](https://github.com/cyanheads/nhtsa-vehicle-safety-mcp-server/releases/latest/download/nhtsa-vehicle-safety-mcp-server.mcpb) [![Install in Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=nhtsa-vehicle-safety-mcp-server&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBjeWFuaGVhZHMvbmh0c2EtdmVoaWNsZS1zYWZldHktbWNwLXNlcnZlciJdfQ==) [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_Server-0098FF?style=for-the-badge&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect?url=vscode:mcp/install?%7B%22name%22%3A%22nhtsa-vehicle-safety-mcp-server%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40cyanheads/nhtsa-vehicle-safety-mcp-server%22%5D%7D)\n\n[![Framework](https://img.shields.io/badge/Built%20on-@cyanheads/mcp--ts--core-67E8F9?style=flat-square)](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)\n\n</div>\n\n<div align=\"center\">\n\n**Public Hosted Server:** [https://nhtsa.caseyjhand.com/mcp](https://nhtsa.caseyjhand.com/mcp)\n\n</div>\n\n---\n\n## Tools\n\nSeven tools for querying NHTSA vehicle safety data:\n\n| Tool Name | Description |\n|:----------|:------------|\n| `nhtsa_get_vehicle_safety` | Comprehensive safety profile combining crash test ratings, recalls, and complaint summary with per-section availability status. |\n| `nhtsa_search_recalls` | Search recall campaigns by vehicle or campaign number with optional date filtering. |\n| `nhtsa_search_complaints` | Consumer safety complaints with component breakdown and severity stats. |\n| `nhtsa_get_safety_ratings` | NCAP crash test ratings and ADAS feature availability. |\n| `nhtsa_decode_vin` | Decode VINs for make, model, year, engine, safety equipment (single or batch up to 50). |\n| `nhtsa_search_investigations` | Search NHTSA defect investigations (PE, EA, DP, RQ, AQ, and more) with cached index. |\n| `nhtsa_lookup_vehicles` | Look up valid makes, models, vehicle types, and manufacturer details from VPIC. |\n\n### `nhtsa_get_vehicle_safety`\n\nComposite safety profile — the default tool when asked about vehicle safety, reliability, or purchase decisions.\n\n- Combines NCAP crash test ratings, recall history, and complaint summary in a single response\n- Frontal crash, side crash, and rollover ratings per vehicle variant\n- Recall consequence text plus the do-not-drive, park-outside, and over-the-air-update advisories\n- Complaint breakdown by component with crash, fire, injury, and death counts\n- Returns `sectionStatus` plus warnings so upstream outages are not mistaken for a clean record\n\n---\n\n### `nhtsa_search_recalls`\n\nSearch recall campaigns by vehicle or campaign number.\n\n- Look up by make/model/year or by specific NHTSA campaign number\n- Campaign lookups return every make/model the campaign covers, plus the ODI investigation that preceded it\n- Optional date range filtering (ISO 8601)\n- Includes do-not-drive advisories, park-outside warnings, and OTA update availability\n\n---\n\n### `nhtsa_decode_vin`\n\nDecode Vehicle Identification Numbers for manufacturing and safety details.\n\n- Single VIN or batch decode up to 50 VINs\n- Partial VINs accepted — use `*` for unknown positions\n- Preserves sparse VPIC fields instead of filling missing data with empty placeholders\n\n---\n\n### `nhtsa_search_investigations`\n\nSearch NHTSA defect investigations.\n\n- 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)\n- Free-text search across investigation IDs, subjects, and summaries, plus structured make, model, and component filters\n- `nhtsaId` fetches one investigation by its exact ID — the reverse of the recall link, closing the campaign-to-investigation round trip\n- 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)\n- Returns up to 25 investigations per page; the response echoes `offset`/`limit` and the offset for the next page\n\n---\n\n### `nhtsa_search_complaints`\n\nSearch consumer safety complaints filed with NHTSA.\n\n- Component breakdown with crash, fire, injury, and death counts\n- Optional component filter (e.g., \"ENGINE\", \"AIR BAGS\")\n- Returns up to 50 most recent complaints sorted by filing date\n- An incident date the complaint's own filing date or model year rules out is disclosed as `unreliableIncidentDate` rather than served as the incident date\n\n---\n\n### `nhtsa_get_safety_ratings`\n\nNCAP crash test ratings and ADAS feature data.\n\n- Frontal crash, side crash (barrier + pole), and rollover ratings\n- ADAS features: ESC, forward collision warning, lane departure warning\n- Accepts either make/model/year or a follow-up `vehicleId` from earlier NCAP results\n- Counts of complaints, recalls, and investigations on file\n\n---\n\n### `nhtsa_lookup_vehicles`\n\nReference lookups against NHTSA's VPIC database.\n\n- Four operations: `makes`, `models`, `vehicle_types`, `manufacturer`\n- `makes` supports `limit` and `offset` pagination for the full VPIC catalog\n- Use to resolve ambiguous vehicle names or verify correct spelling\n- Models can be filtered by year; manufacturers support partial match\n- `manufacturer` pages VPIC up to a 500-record ceiling and discloses when a broad partial name hits it\n\n## Features\n\nBuilt on [`@cyanheads/mcp-ts-core`](https://github.com/cyanheads/mcp-ts-core):\n\n- Declarative tool definitions — single file per tool, framework handles registration and validation\n- Unified error handling across all tools\n- Pluggable auth (`none`, `jwt`, `oauth`)\n- Swappable storage backends: `in-memory`, `filesystem`, `Supabase`, `Cloudflare KV/R2/D1`\n- Structured logging with optional OpenTelemetry tracing\n- Runs locally (stdio/HTTP) from the same codebase\n\nNHTSA-specific:\n\n- 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\n- Investigation index caching (24h TTL) for fast repeated queries\n- No API key required — all NHTSA APIs are public\n\n## Getting started\n\n### Public Hosted Instance\n\nA public instance is available at `https://nhtsa.caseyjhand.com/mcp` — no installation required. Point any MCP client at it via Streamable HTTP:\n\n```json\n{\n  \"mcpServers\": {\n    \"nhtsa-vehicle-safety-mcp-server\": {\n      \"type\": \"streamable-http\",\n      \"url\": \"https://nhtsa.caseyjhand.com/mcp\"\n    }\n  }\n}\n```\n\n### Self-Hosted / Local\n\nAdd the following to your MCP client configuration file:\n\n```json\n{\n  \"mcpServers\": {\n    \"nhtsa-vehicle-safety-mcp-server\": {\n      \"type\": \"stdio\",\n      \"command\": \"bunx\",\n      \"args\": [\"@cyanheads/nhtsa-vehicle-safety-mcp-server@latest\"],\n      \"env\": {\n        \"MCP_TRANSPORT_TYPE\": \"stdio\",\n        \"MCP_LOG_LEVEL\": \"info\"\n      }\n    }\n  }\n}\n```\n\nOr with npx (no Bun required):\n\n```json\n{\n  \"mcpServers\": {\n    \"nhtsa-vehicle-safety-mcp-server\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@cyanheads/nhtsa-vehicle-safety-mcp-server@latest\"],\n      \"env\": {\n        \"MCP_TRANSPORT_TYPE\": \"stdio\",\n        \"MCP_LOG_LEVEL\": \"info\"\n      }\n    }\n  }\n}\n```\n\nOr with Docker:\n\n```json\n{\n  \"mcpServers\": {\n    \"nhtsa-vehicle-safety-mcp-server\": {\n      \"type\": \"stdio\",\n      \"command\": \"docker\",\n      \"args\": [\"run\", \"-i\", \"--rm\", \"-e\", \"MCP_TRANSPORT_TYPE=stdio\", \"ghcr.io/cyanheads/nhtsa-vehicle-safety-mcp-server:latest\"]\n    }\n  }\n}\n```\n\nFor Streamable HTTP, set the transport and start the server:\n\n```sh\nMCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http\n# Server listens at http://localhost:3010/mcp\n```\n\n### Prerequisites\n\n- [Bun v1.3.2](https://bun.sh/) or higher (or Node.js >= 24.0.0)\n\n### Installation\n\n1. **Clone the repository:**\n\n```sh\ngit clone https://github.com/cyanheads/nhtsa-vehicle-safety-mcp-server.git\n```\n\n2. **Navigate into the directory:**\n\n```sh\ncd nhtsa-vehicle-safety-mcp-server\n```\n\n3. **Install dependencies:**\n\n```sh\nbun install\n```\n\n## Configuration\n\nNo API keys required — all NHTSA APIs are public.\n\n| Variable | Description | Default |\n|:---------|:------------|:--------|\n| `MCP_TRANSPORT_TYPE` | Transport: `stdio` or `http`. | `stdio` |\n| `MCP_HTTP_HOST` | HTTP server host. | `127.0.0.1` |\n| `MCP_HTTP_PORT` | HTTP server port. | `3010` |\n| `MCP_HTTP_ENDPOINT_PATH` | HTTP endpoint path. | `/mcp` |\n| `MCP_AUTH_MODE` | Auth mode: `none`, `jwt`, or `oauth`. | `none` |\n| `MCP_LOG_LEVEL` | Log level (RFC 5424). | `info` |\n\n## Data sources\n\nAll data comes from NHTSA's public APIs and bulk files:\n\n- **Recalls API** — `api.nhtsa.gov/recalls`\n- **Complaints API** — `api.nhtsa.gov/complaints`\n- **Safety Ratings API** — `api.nhtsa.gov/SafetyRatings`\n- **Investigations bulk file** — `static.nhtsa.gov/odi/ffdd/inv/FLAT_INV.zip`\n- **VPIC API** — `vpic.nhtsa.dot.gov/api/vehicles`\n\n## Running the server\n\n### Local development\n\n```sh\nbun run devcheck  # Lints, formats, type-checks, and more\nbun run test      # Runs the test suite\n```\n\n### Production\n\n```sh\nbun run build\nbun run start:stdio   # Production stdio\nbun run start:http    # Production HTTP\n```\n\n### Docker\n\n```sh\ndocker build -t nhtsa-vehicle-safety-mcp-server .\ndocker run -p 3010:3010 nhtsa-vehicle-safety-mcp-server\n```\n\n## Project structure\n\n| Directory | Purpose |\n|:----------|:--------|\n| `src/index.ts` | Server entry point — `createApp()` registration. |\n| `src/mcp-server/tools/definitions/` | Tool definitions (`*.tool.ts`). |\n| `src/services/nhtsa/` | NHTSA API client and ODI bulk-file parser with field normalization. |\n\n## Development guide\n\nSee [`CLAUDE.md`](./CLAUDE.md) for development guidelines and architectural rules. The short version:\n\n- Handlers throw, framework catches — no `try/catch` in tool logic\n- Use `ctx.log` for logging\n- One tool per file, `nhtsa_` prefix for all tool names\n\n## Contributing\n\nIssues and pull requests are welcome. Run checks before submitting:\n\n```sh\nbun run devcheck\nbun run test\n```\n\n## License\n\nApache-2.0 — see [LICENSE](LICENSE) for details.\n",
  "bytes": 11438,
  "sha": "f3f5ff35f54e503c8533a34241ac1eeae0c8b81d828c87d02118d1cf5710e7c4",
  "repo_slug": "cyanheads/nhtsa-vehicle-safety-mcp-server",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_cyanheads_nhtsa_vehicle_safety_a1fb8408/readme"
}