carsearch-mcp
carsearch — カナダの中古車検索・監視・市場分析プラットフォーム
carsearch はカナダのマーケットプレイス掲載情報を永続的で検索可能な履歴データベースに変換し、MCP経由でClaude Code(または任意のエージェント)に公開します。さらに完全なCLIも備えています。AutoTrader.caから実際の掲載情報を収集し(他のプロバイダーもプラグイン可能)、価格・ステータスのすべての変更を履歴として保持し、掲載間で物理的な車両の重複を排除し、適切にジオコーディングし(実際の距離)、説明文からリスクシグナルを抽出し、比較可能な価格統計を計算し、設定可能なプロファイルでプロジェクトカーをスコアリングし、お得な情報を検出し、保存済み検索をスケジュールで再実行してアラートを発生させます。
Claudeに次のようなことを尋ねられます:
トロントから800km以内、$8,000未満のマニュアルBMW E90 328iをすべて見つけて。個人売主を優先し、錆だらけのは除外し、プロジェクトカーとしての価値でランク付けして。
過去48時間にオンタリオで登場した$7k未満の興味深いプロジェクトカーは?
この$6,200のAudi TTは、これまで観測した類似の掲載と比べて本当に安いですか?
今週の10%超の値下げをすべて表示して。 / 30日以上掲載されていて、売主がすでに2回値下げしたクルマ。
フェーズごとのステータス、テスト済みコマンド、既知の問題: PROJECT_STATUS.md。
アーキテクチャ(概要)
providers/ (autotrader ✓, cargurus/kijiji/facebook interface+probe) → VehicleListing (canonical)
→ collectors/ (checkpointed ProviderRun, ingest w/ snapshots+events, raw payloads)
→ dedupe/ (VIN → weighted soft signals → vehicles + candidates) → geo/ (geocode, haversine)
→ SQLite/PostgreSQL (SQLAlchemy) → search/ analysis/ (description, comps, deals, market)
→ scoring/ (profiles + model knowledge JSON) → monitoring/ (saved searches, scheduler) → notifications/
→ cli/ (carsearch …) and mcp/ (23 tools)詳細: docs/architecture.md、docs/providers.md、docs/schema.md。
インストール
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]" # add ".[postgres]" for PostgreSQL
cp .env.example .env # optional; SQLite in ./data works out of the box
carsearch db-init # creates/upgrades data/carsearch.dbPython ≥ 3.11(開発は3.14)。ブラウザ不要、AutoTraderにAPIキーは不要。
データベース設定
デフォルト:
sqlite:///./data/carsearch.db(WAL)。何もする必要はありません。PostgreSQL:
.env内のCARSEARCH_DATABASE_URL=postgresql+psycopg://user:pass@host/carsearch、pip install -e ".[postgres]"、carsearch db-init。スキーマ/マイグレーションはsrc/carsearch/database/にあります(バージョン管理され、schema_migrationsに記録されます)。
クローリング(実データの収集)
# targeted, with detail pages for new listings (VIN, exact coordinates, drivetrain, created date)
carsearch crawl autotrader --make BMW --model "3 Series" --transmission manual --max-price 8000 --min-year 2006 --max-year 2013 --details new
# regional bulk (20 listings/page, ~1.5 s/page, no detail pages)
carsearch crawl autotrader --max-price 7000 --location Toronto --radius-km 500 --max-pages 200 --details none
# province scope (centroid + covering radius server-side, exact province locally)
carsearch crawl autotrader --province ON --transmission manual --max-price 6000 --seller-type private
# incremental refresh: stop after 3 consecutive pages with nothing new/changed
carsearch crawl autotrader --transmission manual --max-price 8000 --stop-when-seen 3
# resume an interrupted run
carsearch crawl autotrader --resume 12
# re-check listings not seen for 3 days (marks removed on 404); fetch missing detail pages; geocode backfill
carsearch refresh autotrader --older-than-days 3 --limit 200
carsearch details autotrader --limit 200
carsearch geocode --limit 60
scripts/bootstrap_crawl.sh # example multi-band bootstrap used to seed the DBAutoTraderは1クエリを200ページ(4,000件)に制限します → 完全なカバレッジを得るには価格帯/地域で分割します(実行サマリーのtruncated=Trueがそのタイミングを示します)。
検索
carsearch search --make BMW --model 328i --max-price 7000 --transmission manual --location Toronto --radius-km 800 --seller-type private
carsearch search --generation E90 --keywords '"one owner" -salvage' --province ON,QC --sort price_asc
carsearch new --since 48h --province ON --max-price 7000
carsearch price-drops --min 10 --since 7d
carsearch deals --province ON --max-price 7000 --profile project_car_enthusiast
carsearch deals --location Toronto --radius-km 500 --transmission manual --max-price 7000 --since 7d \
--profile project_car_enthusiast --sort-by project --exclude-flags salvage_title,frame_rust,doesnt_run # "best project cars" ranking
carsearch listing 42 # full record + price history + description flags
carsearch history 42 # snapshots + change events
carsearch comps 42 # comparable-price analysis with methodology
carsearch score 42 --profile project_car_enthusiast
carsearch analyze 42 # everything above + deal signals in one JSON
carsearch market --metric manual_premium --make Subaru --model WRX
carsearch market --metric price_by_mileage --generation E90 --province ON
carsearch market --metric cheapening --days 90
carsearch status [--check-providers] · carsearch runs · carsearch alertsすべてのコマンドは機械可読出力のための--jsonを受け付けます。
モニタリング / 保存済み検索 / アラート
carsearch saved seed # the four example searches from the brief
carsearch saved create "manual E90 328i under $8k" '{"make":"BMW","model":"3 Series","min_year":2006,"max_year":2011,"max_price":8000,"transmission":"manual"}' \
--interval-minutes 240 --alert-rules '{"price_drop_pct":10,"target_price":6500,"min_deal_score":65}' --profile project_car_enthusiast
carsearch saved run "manual E90 328i under $8k" # incremental crawl → new listings + alerts
carsearch schedule # long-running loop: runs due searches, maintenance
carsearch schedule --once # one pass (cron-friendly)アラートはコンソール、data/alerts.jsonl、オプションのウェブフック(CARSEARCH_WEBHOOK_URL)に送信されます。
新しいシンク = notifications.alerts.AlertSink のサブクラス。すべてのアラートにはreasons[](およびリスク)が含まれます。
MCPサーバー
carsearch serve-mcp # stdio (default) | --transport streamable-http --port 8765ツール: search_cars、search_live_marketplace、get_listing、get_vehicle、
get_new_listings、get_price_history、get_listing_changes、get_comparables、
compare_cars、find_deals、find_price_drops、find_long_sitting_listings、
analyze_listing、score_listing、analyze_market、list_saved_searches、
create_saved_search、run_saved_search、delete_saved_search、get_alerts、
get_status、get_generation_codes、analyze_listing_images。すべてが
ページネーション(limit/offset/next_offset)付きの構造化JSONを返します。重いフィールド
(description、photos、raw)はオプトインです。
Claude Codeに接続
claude mcp add carsearch -- /ABSOLUTE/PATH/autotrader/.venv/bin/carsearch serve-mcp
# or in .mcp.json:
{ "mcpServers": { "carsearch": { "command": "/ABSOLUTE/PATH/autotrader/.venv/bin/carsearch", "args": ["serve-mcp"] } } }次に: "先週登場した、トロントから500km以内、$7,000 CAD未満の最高のマニュアルプロジェクトカーを見つけてください。それらを過去の価格と比較し、掲載情報から主要な機械的/錆のリスクをフラグ付けし、上位10件をランク付けしてください。" —
Claudeは通常、search_cars/get_new_listings(または新しいデータにはsearch_live_marketplace)を呼び出し、次にanalyze_listing/compare_carsを呼び出します。
チェックポイントの仕組み
各クロールはprovider_runs行です。すべてのページの後にリストがコミットされ、last_checkpoint.next_pageが進みます。個別リストの失敗はerrorsに記録されスキップされます。詳細エンリッチメントはリストごとにコミットされます(detail_fetched_at)。停止した実行はfailed/interruptedとなり、carsearch crawl --resume <id>はnext_pageから続行します(取得済みのページはローカルのhttp_cacheから取得されます)。保存済み検索の状態はDBに格納されます。docs/architecture.mdを参照してください。
プロバイダーの追加方法
src/carsearch/providers/<name>/にBaseProviderを実装し、parser.pyでVehicleListingにマッピングし(rawは保持)、登録し、フィクスチャ + テストを追加し、docs/providers.mdに文書化します。他に変更するものはありません。
テスト
pytest -q # 42 tests: normalization, parser fixtures, ingest/price history, dedupe,
# geo/search, analysis (flags/comps/scoring/deals/market), crawler checkpoints, MCP toolsネットワークに触れるテストはありません(実際のペイロードフィクスチャ + フェイクプロバイダーを使用)。
既知の制限事項
プロバイダー: 収集できるのはAutoTrader.caのみ。CarGurus(DataDome)、Kijiji(edge 403 / kijijiautos.ca 消滅)、Facebook(ログイン)はライブヘルスプローブ付きのインターフェースです。アンチボット回避やログイン回避は試みていません(
docs/providers.md参照)。提示価格であり、成約価格ではありません。 掲載の消失 ≠ 売却。
not_observed/removedを記録します。カバレッジ はクロール内容に依存します(クエリごとの200ページ上限、バンドで分割)。「過去N日間に登場」は、既知の場合はマーケットプレイスの作成日(詳細ページ)を使用し、それ以外は当方の最初の観測日を使用します。
座標: 詳細ページがある掲載は正確。それ以外は市区町村レベル(シードテーブル / 学習済みセントロイド / マーケットプレイスリゾルバ)。距離フィルタは座標のない掲載をスキップします。
スコアリング、フラグ、ディールスコアはヒューリスティックであり、明示された根拠と設定可能なルール(
src/carsearch/config/*.json)に基づきます。これらは推論への入力であり、判定ではありません。正規表現フラグは変わった言い回しで誤動作することがあります(根拠は常に返されます)。比較対象は段階的な緩和を使用します。サンプルが少ない場合はフラグが立てられます(
warnings、confidence)。画像分析はハッシュ化/キャッシュとプラグ可能なビジョンフックを同梱します(Anthropicバックエンド込み、デフォルトではオフ)。設定しない限りビジョンモデルは実行されません。
SQLiteは数十万件の掲載で十分です。同時書き込みにはPostgreSQLに切り替えてください。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server for CarsXE vehicle data: VIN, specs, history, images, recalls, and OBD codes.
MCP server for AI job search — find jobs, track applications, get alerts. Claude, ChatGPT, Cursor.
An MCP server for deep research or task groups
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/Lironktf/carsearch'
If you have feedback or need assistance with the MCP directory API, please join our Discord server