Skip to main content
Glama
mahmutcanborann

MCP EV Digital Twin Agent

๐Ÿ”‹ MCP-Based EV Digital Twin Agent

Python MCP Docker Streamlit License


๐Ÿ‘จโ€๐Ÿ’ป Author

Mahmut Can Boran

AI Engineer | Automotive Software Enthusiast | Computer Engineer

Passionate about Agentic AI, Model Context Protocol (MCP), Large Language Models, Digital Twins, and Intelligent Automotive Software Systems.


Related MCP server: GridWatch MCP

๐Ÿš€ Overview

An AI-powered EV Digital Twin platform that combines battery health prediction, fleet analytics, intelligent tool orchestration through the Model Context Protocol (MCP), and LLM-powered reasoning to monitor, analyze, and explain electric vehicle battery behavior.

Unlike a traditional dashboard, this project dynamically discovers available MCP tools, selects the most appropriate tool using an LLM, executes engineering analyses, injects fleet-aware context, and generates structured battery health reports through multi-step reasoning.


๐Ÿš€ Features

๐Ÿ”‹ Battery Digital Twin

  • Battery State of Health (SOH) Prediction

  • Remaining Useful Life (RUL) Estimation

  • Estimated Driving Range Prediction

  • Battery Health Classification

  • Digital Twin Timeline Visualization

  • What-if Scenario Simulation


๐Ÿš— Fleet Intelligence

  • Fleet-wide Battery Comparison

  • Fleet Health Ranking

  • Fleet Anomaly Detection (Isolation Forest)

  • Battery Outlier Identification

  • Data Drift Monitoring


๐Ÿค– Agentic AI

  • Model Context Protocol (MCP) Integration

  • Dynamic MCP Tool Discovery

  • Automatic Tool Selection with Gemma

  • Multi-Step Reasoning

  • Fleet-aware Context Injection

  • Engineering Report Generation

  • Intelligent Tool Orchestration


๐Ÿ“š Battery Knowledge Base

The agent combines numerical battery predictions with engineering knowledge to explain:

  • Battery degradation

  • State of Health (SOH) interpretation

  • Charging recommendations

  • Battery maintenance suggestions

  • Risk assessment

  • Engineering-oriented battery reports


โš™๏ธ Deployment

  • Streamlit Dashboard

  • Dockerized Deployment

  • Hugging Face Spaces

  • Git LFS Model Management


๐Ÿ—๏ธ System Architecture

                     User Question
                           โ”‚
                           โ–ผ
               Discovery MCP Agent
                           โ”‚
                           โ–ผ
                Dynamic Tool Discovery
                           โ”‚
                           โ–ผ
              Gemma Tool Selection
                           โ”‚
                           โ–ผ
                    MCP Tool Server
                           โ”‚
      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
      โ–ผ              โ–ผ              โ–ผ
 Battery Twin   Fleet Analytics   Driving Analytics
      โ”‚              โ”‚              โ”‚
      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                     โ–ผ
             Engineering Reasoning
                     โ–ผ
           Battery Health Report

๐Ÿ“Š Current Capabilities

Module

Status

Battery SOH Prediction

โœ…

Remaining Useful Life (RUL)

โœ…

Driving Range Estimation

โœ…

Battery Digital Twin

โœ…

Digital Twin Timeline

โœ…

What-if Scenario Simulation

โœ…

Fleet Analytics

โœ…

Fleet Anomaly Detection

โœ…

Data Drift Detection

โœ…

MCP Tool Calling

โœ…

Dynamic Tool Discovery

โœ…

Multi-Step Reasoning

โœ…

Battery Knowledge Base

โœ…

Docker Deployment

โœ…

Hugging Face Deployment

โœ…


๐Ÿ› ๏ธ Tech Stack

AI / Machine Learning

  • Scikit-learn

  • Random Forest

  • Isolation Forest

  • Gemma LLM

  • Ollama

Agent Framework

  • Model Context Protocol (MCP)

  • FastMCP

  • Dynamic Tool Discovery

  • Agentic AI

Backend

  • Python

  • Pandas

  • NumPy

  • Joblib

Frontend

  • Streamlit

  • Plotly

Deployment

  • Docker

  • Hugging Face Spaces

  • Git LFS


๐Ÿ“ธ Demo

Battery Digital Twin


Fleet Intelligence


Agentic AI Assistant


๐Ÿ”ฎ Roadmap

  • Multi-Agent EV Architecture

  • Vector Database Integration

  • Retrieval-Augmented Generation (RAG)

  • Real-Time Vehicle Telemetry Integration

  • Predictive Maintenance Scheduling

  • Fleet Decision Support System


โญ Why this project?

This project demonstrates how Model Context Protocol (MCP), Agentic AI, LLMs, and predictive battery analytics can be combined to build an intelligent EV Digital Twin capable of autonomous tool discovery, engineering reasoning, and fleet-level battery monitoring.

The project was designed to explore modern AI agent architectures while addressing real-world battery monitoring challenges in electric vehicles.


๐Ÿ“ฌ Contact

Mahmut Can Boran

If you're interested in Agentic AI, MCP, Digital Twins, Battery Analytics, or Automotive Software Engineering, feel free to connect or reach out.

Related MCP Connectors

Related MCP Servers

  • 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.
    734 npm
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    MCP server that enables AI-powered EV charging station management, including live session tracking, automatic battery state detection, remote cable unlock, and RAG-based technical support from OCPP documentation.
    1
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    AI-powered MCP server for automotive functional safety engineering. Enables generation of HARA, FMEA, safety requirements, and compliance checks grounded in ISO 26262 standards.
    16
    MIT