npm package: @smarttechnologyinvestments/drivedecision-mcp
Description: MCP server for DriveDecision vehicle TCO comparison API
Author: Smart Technology Investments
Latest version: 1.0.1

# DriveDecision MCP Server

An MCP (Model Context Protocol) server that connects AI assistants to the DriveDecision vehicle total cost of ownership API. Compare vehicles, calculate TCO, and get data-driven recommendations through any MCP-compatible client like Claude Desktop or Cursor.

## Installation

```bash
npm install @smarttechinvest/drivedecision-mcp
```

Or clone and run locally:

```bash
git clone https://github.com/smarttechinvest/drivedecision-mcp.git
cd drivedecision-mcp
npm install
```

## Configuration

### Get an API Key

Sign up at [drivedecision.smarttechinvest.com/dashboard](https://drivedecision.smarttechinvest.com/dashboard) to get a free API key.

### Claude Desktop

Add to your `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "drivedecision": {
      "command": "npx",
      "args": ["-y", "@smarttechinvest/drivedecision-mcp"],
      "env": {
        "DRIVEDECISION_API_KEY": "your_api_key_here"
      }
    }
  }
}
```

### Cursor

Add to `.cursor/mcp.json` in your project:

```json
{
  "mcpServers": {
    "drivedecision": {
      "command": "npx",
      "args": ["-y", "@smarttechinvest/drivedecision-mcp"],
      "env": {
        "DRIVEDECISION_API_KEY": "your_api_key_here"
      }
    }
  }
}
```

### Local Development

```bash
cp .env.example .env
# Edit .env with your API key
npm run dev
```

## Tools

### `calculate_tco`

Calculate total cost of ownership for a single vehicle.

**Inputs:**
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| year | number | yes | - | Model year (1960-2027) |
| make | string | yes | - | Vehicle make (e.g. Toyota) |
| model | string | yes | - | Vehicle model (e.g. Camry) |
| annual_mileage | number | no | 12000 | Annual miles driven |
| ownership_years | number | no | 5 | Years of ownership |
| state | string | no | California | US state |
| zip_code | string | no | - | ZIP code |
| credit_score | string | no | - | excellent, good, fair, or poor |

**Example:** "What's the 5-year cost of owning a 2024 Toyota Camry in California?"

### `compare_vehicles`

Compare TCO between two vehicles side by side.

**Inputs:**
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| vehicle_a | object | yes | - | {year, make, model} |
| vehicle_b | object | yes | - | {year, make, model} |
| annual_mileage | number | no | 12000 | Annual miles driven |
| ownership_years | number | no | 5 | Years of ownership |
| state | string | no | California | US state |
| zip_code | string | no | - | ZIP code |
| credit_score | string | no | - | excellent, good, fair, or poor |

**Example:** "Compare a 2024 Honda CR-V vs 2024 Toyota RAV4 over 5 years"

### `get_recommendation`

Get a personalized recommendation based on your priorities.

**Inputs:**
| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| vehicle_a | object | yes | - | {year, make, model} |
| vehicle_b | object | yes | - | {year, make, model} |
| priorities | array | yes | - | Ordered list: lowest_cost, best_reliability, fuel_efficiency, lowest_depreciation |
| annual_mileage | number | no | 12000 | Annual miles driven |
| ownership_years | number | no | 5 | Years of ownership |
| state | string | no | California | US state |

**Example:** "I care most about reliability and low cost. Should I get a 2024 Civic or Corolla?"

### `list_makes`

List supported vehicle makes and years.

**Inputs:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| year | number | no | Filter to specific model year |

**Example:** "What car brands does DriveDecision support?"

## Environment Variables

| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| DRIVEDECISION_API_KEY | yes | - | Your API key |
| DRIVEDECISION_API_URL | no | https://drivedecision.smarttechinvest.com | API base URL |

## License

MIT