Skip to main content
Glama
somusathya

connected-car-mcp

by somusathya

connected-car-mcp

合成コネクテッドビークルフリート上のMCP(Model Context Protocol)サーバー:テレメトリ、ルールベースの異常検知、メンテナンス推奨を、単一のオープンエンドなクエリインターフェースではなく、5つの狭いツールとして公開します。

特定の設計習慣の小さな自己完結型の実例として構築されています:ツール境界の背後に何を置くかを決定し、その境界を越えるすべての呼び出しをログに記録します。完全にローカルで生成された合成データで動作し、外部API、アカウント、独自ソースは一切ありません。

なぜこの形なのか

データセット全体を単一の run_query(sql: str) ツールで公開することもできます。しかし、それはエージェントが確実に呼び出すには間違った形です。呼び出し時にスキーマ学習をモデルに押し付け、機能ごとに「何を尋ねられるか」をスコープしたり監査したりする方法がありません。代わりに:

Tool

Contract

list_vehicles

フリートを列挙する

get_vehicle_telemetry

1台の車両の生の読み取り値(時間制限付き)

fleet_health_summary

最新スナップショット + フリート平均

detect_anomalies

ルールベースのフラグ:過熱、バッテリー低下、故障コード、急激な運転

get_maintenance_recommendations

1台の車両に対する優先順位付きアクション

モデルはこれらを組み合わせます — サマリー → フラグ付き車両を選択 → そのテレメトリを取得 → 推奨を取得 — 生の行に対する自由形式のクエリを書くのではなく。また、監査の話も簡単になります。ログに記録する明確に定義された呼び出しは5つだけなので、audit_log.jsonlconnected_car_mcp/audit.py を参照)は呼び出しごとに1行 — タイムスタンプ、ツール、引数、所要時間、成功/失敗 — で、ツールごとのカスタムロジックはありません。本番環境では、ローカルファイルではなく、MCPServermiddleware フック(すべてのJSON-RPC呼び出し、ツール、リソースを認識)を介して構造化ログとして同じレコードを出力します。ここでのデコレータは、追加のインフラストラクチャなしでデモを実行可能に保ちます。

異常検知のしきい値は意図的にシンプルで説明可能です(engine_temp_c >= 110、訓練されたモデルではありません)— フリートモニターのフラグは、正確であるだけでなく、人間が監査できる必要があります。

Related MCP server: mcp-live-telemetry

データ

data/generate_telemetry.py は、決定論的(固定シード)で完全に合成のデータセットを生成します:12台の車両、3日間にわたって10分ごとの読み取り値。いくつかの車両には障害がシードされており、異常検知器が実際に検出するシグナルがあります:

  • CCV-004 — エンジン温度が危険域に達する(冷却システムの故障)

  • CCV-009 — バッテリー電圧が時間とともに低下する(バッテリー/オルタネーターの故障)

  • CCV-002CCV-011 — 断続的なDTC故障コード

  • CCV-006 — 時折の急激な運転による速度スパイク

data/telemetry.csv はリポジトリがすぐに実行できるようにコミットされています。再生成するには:

python data/generate_telemetry.py

実行方法

python -m venv .venv
.venv/Scripts/activate        # .venv/bin/activate on macOS/Linux
pip install -r requirements.txt

python -m connected_car_mcp.server   # starts the MCP server over stdio

Claude Desktop や他のMCPクライアントから試すには、cwd をリポジトリルートに設定してモジュールを指定します。例:claude_desktop_config.json 内:

{
  "mcpServers": {
    "connected-car-fleet": {
      "command": "python",
      "args": ["-m", "connected_car_mcp.server"],
      "cwd": "/path/to/connected-car-mcp"
    }
  }
}

次に、「現在フリート内のどの車両が注意を必要としていますか、そしてその理由は?」 のような質問をします。モデルは fleet_health_summary を呼び出し、フラグ付き車両に対して detect_anomalies をフォローアップし、get_maintenance_recommendations を呼び出して次のアクションに変換できます。

テスト

pip install pytest
pytest tests/

データレイヤーを直接カバーします(フリートサイズ、未知の車両の処理、シードされた障害が実際にフラグ付けされること)— MCPプロトコルレイヤーを経由するのではなく。

プロジェクト構成

connected_car_mcp/
  server.py       MCP tool + resource definitions
  data_store.py   Query layer over the telemetry CSV (pandas)
  audit.py        Per-call audit log decorator
data/
  generate_telemetry.py   Synthetic dataset generator
  telemetry.csv            Generated dataset (committed)
tests/
  test_data_store.py

ライセンス

MIT — LICENSE を参照してください。

Install Server
A
license - permissive license
A
quality
C
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
    A
    quality
    B
    maintenance
    Exposes live industrial IoT telemetry to any MCP client, streaming simulated sensor data from a fleet of machines and detecting anomalies, with the ability to inject faults on demand.
    4
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    MCP server exposing distributed industrial asset data (battery storage, EV chargers, solar arrays) with tools for asset status, geospatial search, alerts, anomaly explanation, and load simulation.
    1,014
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables incident detection and analysis by identifying anomalies in metric time series and surfacing root-cause candidates and recommended actions. Supports both mock (synthetic) and VictoriaMetrics backends with identical MCP tool contracts for seamless development-to-production switching.
    MIT

View all related MCP servers

Related MCP Connectors

  • A paid remote MCP for AI SDK eval dashboard, built to return verdicts, receipts, usage logs, and aud

  • Hosted MCP endpoint with realistic fake data for prototyping agents. 12 tools, no setup.

  • Free MCP tools: the only MCP linter, health checks, cost estimation, and trust evaluation.

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/somusathya/connected-car-mcp'

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