Skip to main content
Glama
joakes90

vin-decode-mcp

by joakes90

vin-decode-mcp

VIN をデコードし、厳選された NHTSA vPIC データベースから車両データを照会 — Model Context Protocol を搭載。

LLM が NHTSA's vPIC のデータを使用して車両識別番号(VIN)をデコードし、メーカー、モデル、車両仕様を検索するための、スタンドアロン・オフライン対応の MCP サーバーです。

pip install vin-decode-mcp
vin-decode-mcp  # Start the MCP server

なぜ?

  • オフライン: インターネット接続なしで動作します。厳選された SQLite データベース(約4.5 MB)は自己完結型です。

  • レート制限なし: vPIC API を直接呼び出すのとは異なり、ローカルクエリは無制限です。

  • 高速: SQLite データベースに対するパターンマッチングはマイクロ秒で完了します。

  • LLM ネイティブ: リッチな docstring、スキーマリソース、構造化された JSON 出力を備えたツール。

  • オープンデータ: NHTSA vPIC は米国政府のオープンデータ — 無料、API キー不要。

Related MCP server: VIN MCP

データ範囲

  • 米国市場向け車両、モデルイヤー 1981年以降

  • 534メーカー9,175モデル88,140のVINパターン

  • 乗用車、トラック、MPV、オートバイ、オフロード車両

  • 除外:バス、トレーラー、低速車両、未完成車両

仕様情報のみ — このデータベースには、所有権、事故、走行距離計、盗難歴は含まれません (これらは NMVTIS/商用データソースが必要です)。

クイックスタート

インストール

pip install vin-decode-mcp

またはソースから:

git clone https://github.com/<org>/vin-decode-mcp.git
cd vin-decode-mcp
pip install -e .

実行

# Default: stdio transport (for Claude Desktop, Cursor, etc.)
vin-decode-mcp

# HTTP transport
vin-decode-mcp --transport http --port 8765

Claude Desktop での使用

~/.config/claude-desktop/config.json(macOS の場合は ~/Library/Application Support/claude-desktop/config.json)に追加:

{
  "mcpServers": {
    "vin-decode": {
      "command": "vin-decode-mcp"
    }
  }
}

Claude Desktop を再起動します。モデルは会話で VIN デコードツールを使用できるようになります。

利用可能なツール

ツール

説明

decode_vin(vin, model_year?)

VIN をデコード → メーカー、モデル、年式、車両タイプ

decode_partial_vin(pattern, limit?)

*ワイルドカードで部分VIN を照合

get_all_makes()

全車両メーカーを一覧表示

get_models_for_make(make, vehicle_type?)

メーカーのモデルを一覧表示

get_model_years(make, model)

生産年式の範囲を取得

get_wmi_info(wmi)

WMI をデコード → メーカー情報

get_vehicle_types()

利用可能な車両タイプを一覧表示

get_make_vehicle_types(make)

メーカーの車両タイプを一覧表示

>>> decode_vin("1HGCM82633A004352")
{
  "vin": "1HGCM82633A004352",
  "make": "Honda",
  "model": "Accord",
  "year": 2003,
  "vehicle_type": "Passenger Car",
  "wmi": "1HG",
  "confidence": "full"
}

>>> get_model_years("Porsche", "911")
{"year_from": 1981, "year_to": null}

>>> decode_partial_vin("5UXWX7C5*BA")
[{"make": "BMW", "model": "X5", "year": 2011, "confidence": "partial_match"}]

データベース

ダウンロード

コンパイル済みデータベースは Hugging Face でホストされています:

データセット: https://huggingface.co/datasets/vin-decode-mcp/vpic-database 直接ダウンロード: https://huggingface.co/datasets/vin-decode-mcp/vpic-database/resolve/main/vpic_decode.db

カスタムデータベースパス

# Set via environment variable
export VIN_MCP_DB_PATH=/path/to/vpic_decode.db
vin-decode-mcp

# Or via CLI flag
vin-decode-mcp --db-path /path/to/vpic_decode.db

再構築

データベースは NHTSA のスタンドアロン PostgreSQL データベースから約6〜12か月ごとに再構築されます:

# Requires PostgreSQL installed (pg_restore, psql)
bash tools/rebuild.sh

# Or step by step:
# 1. Download NHTSA data: https://vpic.nhtsa.dot.gov/Downloads/
# 2. Convert to SQLite
python3 tools/convert_to_sqlite.py --input dump.sql --output vpic_lite.db
# 3. Build curated database
python3 tools/build_db.py --source vpic_lite.db --output vpic_decode.db

Hugging Face のセットアップ手順については、docs/hf-setup.md を参照してください。

データソースと帰属

車両データは NHTSA's vPIC — National Highway Traffic Safety Administration の Vehicle Product Information Catalog and Vehicle Listing — から取得しています。NHTSA は米国政府機関です。

  • データライセンス: 米国政府の著作物(パブリックドメイン)

  • API: キーや登録は不要

  • 更新頻度: 約6〜12か月

  • エラーの報告: NHTSA Manufacturer Helpdesk(manufacturerinfo@dot.gov)または 1-888-399-3277 までご連絡ください

アーキテクチャ

User / LLM Agent
       │
       ▼  MCP (stdio / HTTP)
┌──────────────────┐
│  vin-decode-mcp  │  pip install vin-decode-mcp
│  (FastMCP server)│  env: VIN_MCP_DB_PATH=/path/to/vpic_decode.db
└────────┬─────────┘
         │  sqlite3 (mode=ro)
         ▼
┌──────────────────┐
│ vpic_decode.db     │  ~4.5 MB, curated
│  (Hugging Face)  │  makes + models + WMI + VIN patterns
└──────────────────┘
         ▲
         │  rebuilds from
┌──────────────────┐
│ NHTSA vPIC PG DB │  69 MB, official
│ (NHTSA website)  │  refreshed 2x/year
└──────────────────┘

プロジェクト構造

vin-decode-mcp/
├── src/vin_decode_mcp/
│   ├── __init__.py              # Package init
│   ├── server.py                # FastMCP server with all tools
│   ├── database.py              # SQLite layer + VIN decoder
│   └── cli.py                   # CLI entry point
├── tools/
│   ├── build_db.py              # Pipeline orchestrator
│   ├── convert_to_sqlite.py     # PG → SQLite converter
│   ├── rebuild.sh               # Full rebuild script
│   ├── build_db.py              # Curated DB builder (orchestrator for the pipeline)
│   ├── curation.json            # Make/model curation rules
│   ├── overlay.json             # Grey-import classic additions
│   └── README.md                # Rebuild instructions
├── tests/
│   ├── conftest.py              # Test fixtures
│   ├── test_decode.py           # VIN decode canary tests
│   ├── test_server.py           # Bulk lookup tests
│   └── fixtures/
│       ├── build_test_db.py     # Test database builder
│       └── test_vpic.db         # Minimal test database
├── .github/workflows/
│   ├── ci.yml                   # CI: test + lint
│   └── rebuild-db.yml           # Scheduled DB rebuild
├── docs/
│   └── hf-setup.md              # Hugging Face setup guide
├── pyproject.toml
├── LICENSE
├── README.md
└── vpic_pare_down.py            # Pare-down pipeline (original)

開発

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
python -m pytest tests/ -v

# Lint
python -m ruff check src/ tests/

# Format
python -m ruff format src/ tests/

他のソリューションとの比較

vin-decode-mcp

NHTSA vPIC API

vin-mcp (NLMA)

トランスポート

ローカル SQLite

HTTP REST

HTTP REST

オフライン

レート制限

なし

あり

あり

データサイズ

約4.5 MB

N/A

N/A

VIN フィールド

メーカー + モデル + 年式

約130フィールド

約130フィールド

メーカー/モデル

✅ 534/9,175

✅ 全カタログ

✅ 全カタログ

インストール

pip install

不要

pip install

ライセンス

MIT ライセンス — コードは MIT。データは米国政府のパブリックドメイン。

詳細は LICENSE を参照してください。

コントリビューション

コントリビューション歓迎!以下の手順でお願いします:

  1. フォークしてフィーチャーブランチを作成

  2. 新し機機能のテスをト追加

  3. CI が通ることを確認

  4. プルリクエスをト提出

大きな変更の場合は、先に issue を開いてアプローチを検討してください。

A
license - permissive license
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Servers

  • A
    license
    C
    quality
    D
    maintenance
    Enables access to comprehensive vehicle information including VIN decoding, license plate OCR, vehicle history checks (theft, title, salvage records), market valuations, specifications, and warranty data for vehicles across North America and Europe.
    6
    61
    1
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides comprehensive vehicle reports by aggregating data from multiple public sources to decode VINs, check recalls, and view safety ratings. It enables users to validate VINs locally and retrieve technical specifications, fuel economy, and vehicle photos without requiring API keys.
    18
    MIT
  • F
    license
    A
    quality
    C
    maintenance
    Exposes a connected-vehicle OBD-II/telematics platform to AI agents, enabling vehicle health scoring, live data queries, DTC decoding, maintenance prediction, and gated remote commands via a pluggable data layer.
    9

View all related MCP servers

Related MCP Connectors

  • Machine-readable utilities and datasets for AI agents.

  • Neutral freight reference + validation layer for AI agents: ADR, HS, UN/LOCODE, freight math

  • 500+ deterministic tools for AI agents: math, conversion, validation, hashing, encoding, date/time.

View all MCP Connectors

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/joakes90/vin-decode-mcp'

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