Skip to main content
Glama
connected-car-mcp

connected-car-mcp

by somusathya

connected-car-mcp

합성 커넥티드 차량 플릿(fleet)을 위한 MCP(Model Context Protocol) 서버입니다. 텔레메트리(telemetry), 규칙 기반 이상 탐지, 유지보수 권장 사항을 하나의 개방형 쿼리 인터페이스 대신 다섯 개의 좁은 도구로 노출합니다.

특정 설계 습관을 보여주기 위한 작고 자족적인 예시로 만들어졌습니다: 무엇이 도구 경계 뒤에 속하는지 결정하고, 그 경계를 넘는 모든 호출을 로깅하는 습관입니다. 전적으로 로컬에서 생성된 합성 데이터로 실행됩니다 — 외부 API도, 계정도, 독점 소스도 없습니다.

왜 이런 형태인가

전체 데이터셋을 단일 run_query(sql: str) 도구로 노출할 수도 있습니다. 하지만 이는 에이전트가 안정적으로 호출하기에 잘못된 형태입니다. 호출 시점에 모델이 스키마를 학습하도록 강제하고, 기능별로 "무엇을 질문할 수 있는지"를 범위 지정하거나 감사(audit)할 방법이 없기 때문입니다. 대신:

도구

계약

list_vehicles

플릿 열거

get_vehicle_telemetry

단일 차량의 원시 측정값, 시간 범위 제한

fleet_health_summary

최신 스냅샷 + 플릿 평균

detect_anomalies

규칙 기반 플래그: 과열, 배터리 저전압, 고장 코드, 급격한 운전

get_maintenance_recommendations

단일 차량에 대한 우선순위 조치

모델은 원시 행에 대해 자유 형식 쿼리를 작성하는 대신, 이 도구들을 조합합니다 — 요약 → 플래그된 차량 선택 → 텔레메트리 가져오기 → 권장 사항 얻기. 또한 감사(audit) 스토리를 단순하게 만듭니다. 로깅할 잘 정의된 호출이 다섯 개뿐이므로, audit_log.jsonl( connected_car_mcp/audit.py 참조)은 호출당 한 줄 — 타임스탬프, 도구, 인자, 지속 시간, 성공/실패 — 이며 도구별 커스텀 로직이 없습니다. 프로덕션 배포에서는 로컬 파일 대신 MCPServer의 middleware 훅(모든 JSON-RPC 호출, 도구 또는 리소스를 볼 수 있음)을 통해 동일한 레코드를 구조화된 로그로 내보낼 수 있습니다. 여기서의 데코레이터는 추가 인프라 없이 데모를 실행 가능하게 유지합니다.

이상 임계값은 의도적으로 단순하고 설명 가능합니다(engine_temp_c >= 110, 훈련된 모델이 아님) — 플릿 모니터의 플래그는 정확하기만 하면 안 되고, 사람이 감사할 수 있어야 합니다.

Related MCP server: mcp-live-telemetry

데이터

data/generate_telemetry.py는 결정적(고정 시드)이고 완전히 합성된 데이터셋을 생성합니다: 12대의 차량, 3일 동안 10분 간격의 측정값. 일부 차량에는 고장이 시드되어 이상 탐지기가 실제 신호를 찾을 수 있게 합니다:

  • CCV-004 — 엔진 온도가 임계 범위로 상승(냉각 시스템 고장)

  • CCV-009 — 배터리 전압이 시간에 따라 저하(배터리/알터네이터 고장)

  • CCV-002, CCV-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 참조.

Available Tools

5 tools
detect_anomaliesA

List rule-based anomalies (overheating, low battery, fault codes, harsh driving) across the fleet, or for a single vehicle_id if given.

NameRequiredDescriptionDefault
vehicle_idNo

Output Schema

NameRequiredDescription
resultYes

TDQS

A3.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full responsibility for disclosing behavioral traits. It does not mention whether the operation is read-only, has side effects, requires specific permissions, or any rate limits. The verb 'list' implies read-only but it is not explicit, and no additional behavioral context is given.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, well-structured sentence that front-loads the core action and resource, then immediately adds clarifying parameters and examples. Every element earns its place; there is no redundancy or fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with one optional parameter and an output schema present, the description covers purpose, parameter semantics, and scope. It does not explicitly address integration with siblings or pagination, but the presence of an output schema reduces the need to describe return format. Overall, it is adequately complete for its complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate. It does so by explaining that the optional vehicle_id parameter, if provided, scopes the anomaly listing to a single vehicle; otherwise, it returns fleet-wide anomalies. This clarifies the default behavior (null) and adds meaning beyond the bare schema declaration.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool lists rule-based anomalies, enumerates specific types (overheating, low battery, fault codes, harsh driving), and specifies the scope as fleet-wide or single-vehicle via an optional parameter. This is a specific verb-resource pairing that distinguishes it from sibling tools by its unique focus on anomalies.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for anomaly detection but provides no explicit guidance on when to choose it over alternatives like fleet_health_summary or get_vehicle_telemetry. It does not mention when not to use it or name any sibling. The usage context is implied by the purpose, but there is no direct comparison or exclusionary statement.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

fleet_health_summaryA

Get a fleet-wide snapshot: latest reading per vehicle, fleet averages, and which vehicles currently have an active anomaly flag.

NameRequiredDescriptionDefault

No parameters

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description carries the full burden. It fully describes the return content and implies a read-only operation ('Get'), which is accurate. It doesn't mention side effects or latency, but given it's a summary tool with no parameters, this is adequate. No contradiction with annotations (which are absent).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single, front-loaded sentence that states the purpose and the three key outputs. Every phrase carries meaning, with no filler or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Without an output schema, the description is responsible for conveying what the tool returns. It covers all essential elements (latest reading, averages, anomaly flags) and is sufficiently complete for an agent to decide when and how to use it. No gaps are apparent for a simple fleet-summary tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With zero parameters, the baseline is 4. The description doesn't need to add parameter details, and it doesn't. It correctly implies that no inputs are required.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Get') and resource ('fleet-wide snapshot'), and explicitly lists what it returns (latest reading per vehicle, fleet averages, active anomaly flags). This clearly distinguishes it from siblings like list_vehicles and get_vehicle_telemetry which target individual entities.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for fleet-wide overviews without stating when not to use it. It doesn't name alternatives explicitly, but the clear scope makes it obvious this is the go-to for aggregated fleet health. A minor omission is the lack of explicit exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_maintenance_recommendationsB

Get prioritized maintenance recommendations for one vehicle, combining service-interval mileage with any active anomaly flags.

NameRequiredDescriptionDefault
vehicle_idYes

Output Schema

NameRequiredDescription
resultYes

TDQS

B3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must carry the burden of behavioral disclosure. It explains the operation combines service-interval mileage and active anomaly flags and returns prioritized results, which is useful. However, it does not clarify read-only nature, prerequisites (e.g., vehicle must exist), error conditions, or what happens if no anomalies exist, leaving gaps in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single sentence that front-loads the tool's purpose ('Get prioritized maintenance recommendations for one vehicle') and then specifies the inputs. No fluff, reads naturally, and is appropriately sized for the tool's simplicity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no annotations and zero parameter schema descriptions, the description leaves out critical details: what the output format is, how prioritization is determined, whether it requires prior anomaly detection, and how to ensure the vehicle ID is valid. While an output schema exists, its content is unknown, so the description should explain enough for an agent to call it confidently, which it does not.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage for parameters is 0%, and the description provides no additional meaning for vehicle_id beyond the schema's type/name. It does not specify that vehicle_id is the unique identifier of the vehicle, how to obtain a valid value, or any format hints. Since the description is the only source of param semantics, it is insufficient.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns 'prioritized maintenance recommendations' for 'one vehicle', combining two data sources. The 'one vehicle' scope implicitly distinguishes it from fleet-level tools like fleet_health_summary, but it does not explicitly name the alternatives, so it's clear but not maximally differentiated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance is given on when to use this tool versus siblings (e.g., list_vehicles, get_vehicle_telemetry, detect_anomalies). While 'one vehicle' implies it is not for fleet-level summaries, the description does not state exclusions or recommend alternatives based on use cases, leaving the decision to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_vehicle_telemetryA

Get raw telemetry readings for one vehicle, optionally bounded by an ISO-8601 start/end timestamp. Returns at most limit readings, most recent first within that window.

NameRequiredDescriptionDefault
endNo
limitNo
startNo
vehicle_idYes

Output Schema

NameRequiredDescription
resultYes

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of behavioral disclosure. It reveals that results are capped by 'limit' and ordered 'most recent first', which is valuable. However, it does not mention error handling (e.g., unknown vehicle, empty results) or whether the operation is read-only, though 'Get' implies non-mutating. It could go further.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences with no redundancy. The purpose is stated first, then the limit and ordering are added efficiently. Every clause earns its place, and the wording is clean and direct.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the core call requirements: vehicle_id is implied, optional time bounds are explained, and the result cap is specified. The presence of an output schema covers return details. It lacks explicit alternative routing (e.g., 'for fleet summaries use fleet_health_summary'), but the sibling names are self-explanatory and the tool's purpose is clear.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must explain parameter meaning. It clarifies that 'start' and 'end' are ISO-8601 timestamps and that 'limit' caps the number of readings. vehicle_id is self-evident from its name and the singular 'one vehicle'. This adds meaning beyond the schema for 3 of 4 parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb 'Get' and a clear resource 'raw telemetry readings for one vehicle', and distinguishes it from sibling tools like fleet_health_summary (summaries) and detect_anomalies (anomaly detection). The term 'raw' signals it's the underlying data, not derived artifacts.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use it (when raw per-vehicle readings are needed) and provides optional parameters (start/end, limit), but it does not explicitly compare to siblings or state when not to use it. The alternatives are inferable from their names, so usage guidance is adequate but implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_vehiclesA

List every vehicle in the fleet with its first/last telemetry timestamp.

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription
resultYes

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden of behavioral disclosure. It states what the tool returns (vehicles with first/last telemetry timestamp), which gives some transparency. However, it does not disclose whether the operation is read-only (likely but not stated), any performance implications, rate limits, or pagination behavior. For a simple list operation this is partially sufficient but not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single clear sentence that front-loads the primary action ('List every vehicle') and then specifies the key output detail. There is no redundant wording or filler. It is optimally concise for the information conveyed.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The presence of an output schema means the return value structure is already defined, so the description need not explain it. The description adds the key detail of including first/last telemetry timestamps, which is useful for selection. However, it omits any mention of ordering, pagination, or limits, which could matter for large fleets, but for a simple list this is acceptable.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so the schema description coverage is trivially 100%. According to the rubric, zero parameters justify a baseline of 4 because there is nothing for the description to explain about parameters. The description adds no parameter info, but none is needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'List' and the resource 'every vehicle in the fleet', with the added detail of returning 'first/last telemetry timestamp'. This unambiguously distinguishes it from siblings like get_vehicle_telemetry (which targets a single vehicle) and fleet_health_summary (which provides summary metrics).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The description does not mention any exclusions, prerequisites, or context where another sibling would be more appropriate. The agent must infer the use case solely from the purpose, which is a gap in routing decision support.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 5 tool updatesv0.1.0
    • First observeddetect_anomalies
    • First observedfleet_health_summary
    • First observedget_maintenance_recommendations
    • First observedget_vehicle_telemetry
    • First observedlist_vehicles

TDQS

A3.8/5.0

Scored across 5 tools

Disambiguation5/5

Every tool targets a distinct concern: listing vehicles, retrieving raw telemetry, fleet-wide health snapshot, anomaly detection, and maintenance recommendations. The overlap between fleet_health_summary and detect_anomalies is minimal because one is a snapshot and the other is a detailed listing.

Naming Consistency4/5

Most tools follow a clear verb_noun pattern (list_vehicles, get_vehicle_telemetry, detect_anomalies, get_maintenance_recommendations). The exception is fleet_health_summary, which lacks a verb prefix, creating a minor inconsistency in the naming scheme.

Tool Count5/5

Five tools is well-scoped for a connected-car MCP, covering the core operations of vehicle listing, telemetry retrieval, fleet health, anomaly detection, and maintenance recommendations without redundancy or bloat.

Completeness4/5

The set covers the primary read/analysis workflows: listing vehicles, fetching raw data, summarizing health, detecting anomalies, and recommending maintenance. A minor gap is the lack of a tool for direct vehicle metadata (e.g., model, year), but this is not critical for the apparent monitoring/analytics purpose.

Maintenance

ActivityStale
ResponsivenessNo recent community issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    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
    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
  • A
    license
    A
    quality
    C
    maintenance
    Exposes digital twin device data capabilities as MCP tools, allowing MCP clients to query device status, read real-time metrics, fetch time-series data, and check alerts. Includes a simulated PLC driver with a clean interface for connecting real devices via OPC-UA, Modbus, or gateway APIs.
    6
    MIT