{"_id":"@einsteincoder/nhtsa-mcp-server","name":"@einsteincoder/nhtsa-mcp-server","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@einsteincoder/nhtsa-mcp-server","version":"1.0.0","description":"Model Context Protocol (MCP) server for the NHTSA API","main":"dist/index.js","type":"module","bin":{"nhtsa-mcp":"dist/index.js"},"scripts":{"build":"tsc","start":"node dist/index.js","dev":"nodemon --watch 'src/**/*.ts' --exec 'ts-node --esm' src/index.ts","test":"echo \"Error: no test specified\" && exit 1"},"keywords":["mcp","modelcontextprotocol","nhtsa","api","vehicles"],"author":"","license":"MIT","dependencies":{"@modelcontextprotocol/sdk":"^1.11.1","@types/express":"^4.17.21","@types/node":"^20.11.10","axios":"^1.6.5","dotenv":"^16.3.1","express":"^4.18.2","ts-node":"^10.9.2","typescript":"^5.3.3"},"devDependencies":{"nodemon":"^3.0.3"},"extends":"./tsconfig.json","ts-node":{"esm":true,"experimentalSpecifierResolution":"node"},"_id":"@einsteincoder/nhtsa-mcp-server@1.0.0","gitHead":"19aa834b20a9ce449a391aafc204c0db2a0ca059","_nodeVersion":"22.14.0","_npmVersion":"11.3.0","dist":{"integrity":"sha512-WxP1ONCIwLYuGyAS/78jy5YkZJR6InCWHB5wf4k8fuTa5RGUwxUXIk0uibcSWD6F1Z83VXfsd64xJJlgt6G/IA==","shasum":"0ff7b346a0f897d7f8f57a060c25e2b44b7edf82","tarball":"https://registry.npmjs.org/@einsteincoder/nhtsa-mcp-server/-/nhtsa-mcp-server-1.0.0.tgz","fileCount":19,"unpackedSize":42288,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEki71RUnARywKynx+wJjjbbC8HeuBqtRKfDhNhM39+lAiEAy1XveDAqXxJjLhMYlrAeAcx8b4jZ10y3Om9jjpFcLqw="}]},"_npmUser":{"name":"einsteincoder","email":"einsteincoder@gmail.com"},"directories":{},"maintainers":[{"name":"einsteincoder","email":"einsteincoder@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nhtsa-mcp-server_1.0.0_1768460132616_0.2877944498705638"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-15T06:55:32.529Z","1.0.0":"2026-01-15T06:55:32.776Z","modified":"2026-01-15T06:55:32.958Z"},"maintainers":[{"name":"einsteincoder","email":"einsteincoder@gmail.com"}],"description":"Model Context Protocol (MCP) server for the NHTSA API","keywords":["mcp","modelcontextprotocol","nhtsa","api","vehicles"],"license":"MIT","readme":"# NHTSA MCP Server\r\n\r\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\r\n\r\nAn MCP (Model Context Protocol) server providing access to the NHTSA (National Highway Traffic Safety Administration) vehicle database APIs. This server allows LLMs (Large Language Models) to interact with vehicle data through a standardized protocol.\r\n\r\n## Overview\r\n\r\nThis project implements an MCP server that wraps the [NHTSA vPIC API](https://vpic.nhtsa.dot.gov/api/), making vehicle data accessible to any MCP-compatible client or LLM. The server provides both resources and tools for querying vehicle information, including:\r\n\r\n- Vehicle Identification Number (VIN) decoding\r\n- Vehicle makes and models\r\n- Manufacturer details\r\n- World Manufacturer Identifiers (WMI)\r\n- Vehicle variables and specifications\r\n- Canadian vehicle specifications\r\n- And more\r\n\r\n## Prerequisites\r\n\r\n- Node.js 18.x or higher\r\n- npm or yarn\r\n\r\n## Installation\r\n\r\n### Option 1: Using Docker (Recommended)\r\n\r\n1. Clone the repository:\r\n   ```bash\r\n   git clone https://github.com/viguza/nhtsa-mcp-server.git\r\n   cd nhtsa-mcp-server\r\n   ```\r\n\r\n2. Build and start the Docker container:\r\n   ```bash\r\n   docker compose up -d\r\n   ```\r\n\r\n3. For development with hot reloading:\r\n   ```bash\r\n   docker compose -f docker-compose.dev.yml up -d\r\n   ```\r\n\r\n### Option 2: Standard Installation\r\n\r\n1. Clone the repository:\r\n   ```bash\r\n   git clone https://github.com/viguza/nhtsa-mcp-server.git\r\n   cd nhtsa-mcp-server\r\n   ```\r\n\r\n2. Install dependencies:\r\n   ```bash\r\n   npm install\r\n   ```\r\n\r\n3. Create a `.env` file in the root directory (or use the defaults):\r\n   ```\r\n   PORT=3000\r\n   NHTSA_API_BASE_URL=https://vpic.nhtsa.dot.gov/api\r\n   NODE_ENV=development\r\n   ```\r\n\r\n4. Build the project:\r\n   ```bash\r\n   npm run build\r\n   ```\r\n\r\n5. Start the server:\r\n   ```bash\r\n   npm start\r\n   ```\r\n\r\nThe server will be available at http://localhost:3000 (or the configured PORT).\r\n\r\n## Usage\r\n\r\n### Connect to the MCP Server\r\n\r\nThe server supports two types of connections:\r\n\r\n#### 1. Standard MCP Connection\r\nTo use the server with an MCP client, connect to the MCP endpoint:\r\n\r\n```\r\nhttp://localhost:3000/mcp\r\n```\r\n\r\n#### 2. Server-Sent Events (SSE) Connection\r\nThe server also supports SSE for streaming communication:\r\n\r\n```\r\nhttp://localhost:3000/sse\r\n```\r\n\r\nSSE provides a persistent connection for real-time updates from the server to the client. Message posting for SSE clients is done via:\r\n\r\n```\r\nhttp://localhost:3000/messages?sessionId=YOUR_SESSION_ID\r\n```\r\n\r\n### Available Tools\r\n\r\nThe server exposes the following tools for LLMs to interact with the NHTSA API:\r\n\r\n#### VIN Decoding\r\n- `decodeVin`: Decode a Vehicle Identification Number\r\n- `decodeVinValues`: Decode a VIN in flat format\r\n- `decodeVinExtended`: Decode a VIN with extended information\r\n- `decodeVinValuesExtended`: Decode a VIN with extended information in flat format\r\n- `decodeVinBatch`: Decode multiple VINs in a batch (max 50)\r\n\r\n#### World Manufacturer Identifier (WMI)\r\n- `decodeWMI`: Decode a World Manufacturer Identifier\r\n- `getWMIsForManufacturer`: Get WMIs for a manufacturer\r\n\r\n#### Makes\r\n- `getAllMakes`: Get all vehicle makes\r\n- `getMakesForManufacturer`: Get makes for a manufacturer\r\n- `getMakesForManufacturerAndYear`: Get makes for a manufacturer in a specific year\r\n- `getMakesForVehicleType`: Get makes for a vehicle type\r\n\r\n#### Models\r\n- `getModelsForMake`: Get models for a make\r\n- `getModelsForMakeId`: Get models for a make by ID\r\n- `getModelsForMakeYear`: Get models for a make and year\r\n- `getModelsForMakeIdYear`: Get models for a make ID and year\r\n- `getModelsForMakeYearType`: Get models for a make, year, and vehicle type\r\n\r\n#### Manufacturers\r\n- `getAllManufacturers`: Get all manufacturers\r\n- `getManufacturerDetails`: Get details for a specific manufacturer\r\n\r\n#### Parts\r\n- `getParts`: Get parts by type and date range\r\n\r\n#### Vehicle Variables\r\n- `getVehicleVariableList`: Get all vehicle variables\r\n- `getVehicleVariableValuesList`: Get values for a specific vehicle variable\r\n\r\n#### Canadian Vehicle Specifications\r\n- `getCanadianVehicleSpecifications`: Get Canadian vehicle specifications\r\n\r\n### Available Resources\r\n\r\nThe server exposes the following resources:\r\n\r\n- `nhtsa://api-info`: API documentation\r\n- `nhtsa://makes`: List of all vehicle makes\r\n- `nhtsa://makes/{make}`: Information about a specific make\r\n- `nhtsa://manufacturers`: List of all manufacturers\r\n- `nhtsa://manufacturers/{manufacturer}`: Information about a specific manufacturer\r\n- `nhtsa://variables`: List of all vehicle variables\r\n\r\n## Example Queries\r\n\r\nHere are some example tool calls an LLM might make:\r\n\r\n### 1. Decode a VIN\r\n\r\n```json\r\n{\r\n  \"name\": \"decodeVin\",\r\n  \"arguments\": {\r\n    \"vin\": \"1FTFW1ET5DFA4527\",\r\n    \"modelYear\": 2013\r\n  }\r\n}\r\n```\r\n\r\n### 2. Get all vehicle makes\r\n\r\n```json\r\n{\r\n  \"name\": \"getAllMakes\",\r\n  \"arguments\": {}\r\n}\r\n```\r\n\r\n### 3. Get models for a specific make and year\r\n\r\n```json\r\n{\r\n  \"name\": \"getModelsForMakeYear\",\r\n  \"arguments\": {\r\n    \"make\": \"Honda\",\r\n    \"year\": 2020\r\n  }\r\n}\r\n```\r\n\r\n### 4. Get manufacturer details\r\n\r\n```json\r\n{\r\n  \"name\": \"getManufacturerDetails\",\r\n  \"arguments\": {\r\n    \"manufacturer\": \"Honda\"\r\n  }\r\n}\r\n```\r\n\r\n## Development\r\n\r\n### Scripts\r\n\r\n- `npm run build` - Build the project\r\n- `npm start` - Start the server\r\n- `npm run dev` - Start the server in development mode with hot reloading\r\n\r\n### Docker Commands\r\n\r\n- `docker compose up -d` - Start the container in detached mode\r\n- `docker compose down` - Stop the container\r\n- `docker compose logs -f` - View logs\r\n- `docker compose -f docker-compose.dev.yml up -d` - Start development container with hot reloading\r\n\r\n## Model Context Protocol (MCP)\r\n\r\nThe Model Context Protocol is an open standard for providing context to LLMs. It allows services to expose data and functionality in a standardized way that any MCP-compatible client can consume.\r\n\r\nKey MCP concepts used in this project:\r\n\r\n- **Tools**: Similar to functions, tools allow LLMs to take actions (e.g., make API calls)\r\n- **Resources**: Similar to documents or files, resources provide data to LLMs\r\n- **Transport**: Communication layer between client and server (this project uses Streamable HTTP and SSE)\r\n\r\nLearn more about MCP at [modelcontextprotocol.io](https://modelcontextprotocol.io).\r\n\r\n## Data Source\r\n\r\nAll data is sourced from the official NHTSA vPIC API at [vpic.nhtsa.dot.gov/api/](https://vpic.nhtsa.dot.gov/api/).\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\r\n\r\n## Acknowledgments\r\n\r\n- [NHTSA](https://www.nhtsa.gov/) for providing the vehicle data API\r\n- [Model Context Protocol](https://modelcontextprotocol.io) for the MCP specification and SDK\r\n","readmeFilename":"README.md","_rev":"1-9816658a653f2ece32b3d3662877c200"}