xw-fu/nev-telematics
If you are the rightful owner of nev-telematics and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
A Model Context Protocol (MCP) server for New Energy Vehicle (NEV) telematics data integration and management.
NEV Telematics MCP Server
A Model Context Protocol (MCP) server for New Energy Vehicle (NEV) telematics data integration and management. Built with Deno and TypeScript using the official MCP SDK.
Overview
This MCP server provides a standardized interface for accessing and managing telematics data from New Energy Vehicles (electric vehicles, hybrid vehicles, etc.). It enables seamless integration with Claude Desktop and other MCP-compatible clients to query vehicle data, monitor performance, and analyze telemetry information.
Features
- Real-time vehicle telemetry data access - GPS location, speed, heading, odometer
- Battery health monitoring - State of charge, health percentage, charging status
- SQLite database - Built-in persistent storage using Deno's native SQLite
- MCP Resources - URI-based access to vehicle, telemetry, and battery data
- MCP Tools - Function-based interface for querying vehicle information
- Sample data - Pre-loaded with 3 example vehicles for testing
Prerequisites
- Deno v2.5 or higher
- Claude Desktop (for MCP integration)
Quick Start
1. Install Deno
macOS/Linux:
curl -fsSL https://deno.land/install.sh | sh
Windows:
irm https://deno.land/install.ps1 | iex
2. Setup Environment
cp .env.example .env
3. Run the Server
Development mode (with auto-reload):
deno task dev
Production mode:
deno task start
Type checking:
deno task check
Claude Desktop Integration
Add this server to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"nev-telematics": {
"command": "deno",
"args": [
"run",
"--allow-read",
"--allow-write",
"--allow-env",
"/absolute/path/to/nev-telematics/src/index.ts"
]
}
}
}
Restart Claude Desktop after updating the configuration.
MCP Integration
This server implements the Model Context Protocol specification with stdio transport.
Available Resources
Resources are accessible via URI schemes:
vehicle://{vehicle_id}- Complete vehicle information and metadatatelemetry://{vehicle_id}- Real-time telemetry data (location, speed, odometer)battery://{vehicle_id}- Battery status, health, and charging information
Available Tools
Function-based tools for querying data:
list_vehicles- List all vehicles in the systemget_vehicle_status- Retrieve current vehicle status and locationget_battery_info- Get battery health and charging informationget_location- Fetch current vehicle GPS location and speed
Sample Data
The database initializes with three sample vehicles:
| Vehicle ID | Model | Year | VIN |
|---|---|---|---|
| NEV001 | Tesla Model 3 | 2023 | TESLA2023001 |
| NEV002 | BYD Seal | 2024 | BYD2024001 |
| NEV003 | NIO ET5 | 2023 | NIO2023001 |
Database
Uses SQLite with Deno's built-in node:sqlite module:
- vehicles - Vehicle registry (ID, model, year, VIN, status)
- telemetry - Location and movement data (GPS, speed, heading, odometer)
- battery_status - Battery metrics (level, health, charging, range)
Database file: telematics.db (auto-created on first run)
Project Structure
nev-telematics/
├── src/
│ ├── index.ts # Main MCP server with stdio transport
│ ├── db.ts # SQLite database layer and queries
│ └── schema.sql # Database schema reference
├── deno.json # Deno configuration and dependencies
├── .env.example # Environment variables template
├── .gitignore # Git ignore patterns
├── SETUP.md # Detailed setup instructions
└── README.md # This file
Development
Adding New Tools
Edit src/index.ts and add handlers in the CallToolRequestSchema section:
case "your_new_tool": {
// Implementation
return {
content: [{ type: "text", text: "result" }]
};
}
Adding Database Functions
Add new query functions in src/db.ts:
export async function yourNewQuery(): Promise<YourType> {
if (!db) throw new Error("Database not initialized");
const stmt = db.prepare("SELECT * FROM ...");
return stmt.all() as YourType[];
}
Testing with Claude Desktop
After configuration, try these prompts in Claude Desktop:
Can you list all vehicles in the telematics system?
Show me the battery status for vehicle NEV001
What's the current location and speed of vehicle NEV002?
Give me a complete status report for all vehicles
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT
Support
For questions or issues, please open an issue on the GitHub repository.