Skip to main content
Glama
Abinash009

iso26262-agent

by Abinash009

iso26262-agent

AI-powered ISO 26262 Functional Safety Agent for Automotive

An MCP (Model Context Protocol) server that provides AI-assisted functional safety engineering tools for automotive ECU development. Generates HARA, FMEA, safety requirements, and compliance checks using RAG + LLM β€” grounded in ISO 26262 standards.

Built for engineers working on safety-critical systems: inverters, motor controllers, TCUs, ADAS, autonomous drive platforms, and battery management systems.


🎯 What It Does

Tool

Input

Output

HARA Generator

System/function description

Hazard events + ASIL classification (A/B/C/D)

FMEA Generator

Component description

Full FMEA table (Failure Mode, S, O, D, RPN, Actions)

Safety Requirements

Function + ASIL level

ISO 26262-compliant FSR/TSR/SWSR requirements

Compliance Checker

Your existing requirements

Gap analysis vs ISO 26262 with clause references


Related MCP server: runsec

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              MCP Client (IDE/CLI)            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                   β”‚ MCP Protocol
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚           iso26262-agent (MCP Server)        β”‚
β”‚                                              β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚  HARA   β”‚ β”‚  FMEA   β”‚ β”‚ Requirements β”‚  β”‚
β”‚  β”‚Generatorβ”‚ β”‚Generatorβ”‚ β”‚  Generator   β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚       β”‚            β”‚             β”‚           β”‚
β”‚  β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚         RAG Pipeline                    β”‚ β”‚
β”‚  β”‚  Query β†’ Embed β†’ Search β†’ Context      β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚                   β”‚                          β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚         LLM (Gemini API)               β”‚ β”‚
β”‚  β”‚  Context + Prompt β†’ Structured Output  β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                   β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚          Knowledge Base (194 chunks)         β”‚
β”‚                                              β”‚
β”‚  β€’ ISO 26262 Parts 1-12 concepts            β”‚
β”‚  β€’ ASIL determination tables (S/E/C β†’ ASIL) β”‚
β”‚  β€’ Automotive failure mode patterns          β”‚
β”‚  β€’ Safety requirement templates              β”‚
β”‚  β€’ HARA methodology & examples              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ› οΈ Tech Stack

  • Python 3.11+

  • MCP Protocol β€” Model Context Protocol server (standardized AI tool interface)

  • Gemini API β€” LLM for reasoning and generation

  • RAG Pipeline β€” Semantic embeddings + vector search (with TF-IDF fallback)

  • Pydantic β€” Structured data models and validation

  • Rich β€” Formatted CLI output


πŸš€ Quick Start

1. Clone & Install

git clone https://github.com/Abinash009/iso26262-agent.git
cd iso26262-agent
pip install -r requirements.txt

2. Set API Key

export GOOGLE_API_KEY=your_gemini_api_key_here

Or create a .env file:

GOOGLE_API_KEY=your_key_here

3. Run Demo

python3 demo.py

This runs all 3 tools with example automotive inputs and shows formatted output.

4. Run as MCP Server

python3 src/server.py

πŸ“‹ Usage Examples

HARA Generator

Input: "Torque control function in traction inverter for electric truck"

Output:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”
β”‚ Hazard                                                       β”‚ ASIL β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€
β”‚ Unintended forward over-torque while vehicle is stationary   β”‚ D    β”‚
β”‚ Unintended excessive negative torque (regen braking)         β”‚ C    β”‚
β”‚ Sudden total loss of drive torque during overtaking           β”‚ B    β”‚
β”‚ Unintended reverse torque while forward gear engaged         β”‚ D    β”‚
β”‚ Unintended forward motion when reverse gear engaged          β”‚ A    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”˜

FMEA Generator

Input: "DC-DC converter 800V to 12V for auxiliary systems"

Output:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Failure Mode                          β”‚ S β”‚ O β”‚ D β”‚ RPN β”‚ Recommended Action       β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ HV to LV Isolation Breakdown          β”‚10 β”‚ 2 β”‚ 4 β”‚ 80  β”‚ Reinforced galvanic iso  β”‚
β”‚ Loss of Output (Zero Voltage)         β”‚ 9 β”‚ 4 β”‚ 3 β”‚ 108 β”‚ Dual 12V output paths    β”‚
β”‚ Uncontrolled Output Overvoltage       β”‚ 8 β”‚ 3 β”‚ 2 β”‚ 48  β”‚ Redundant OV protection  β”‚
β”‚ Shoot-Through (High/Low Side)         β”‚ 8 β”‚ 3 β”‚ 2 β”‚ 48  β”‚ HW-enforced dead-time    β”‚
β”‚ Excessive Junction Temperature        β”‚ 6 β”‚ 4 β”‚ 2 β”‚ 48  β”‚ Dual NTC sensors         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Safety Requirements Generator

Input: function="Emergency braking torque delivery", ASIL=D

Output:
[FSR-001] [FSR] The system shall prevent unintended emergency braking torque delivery
[FSR-002] [FSR] The system shall deliver requested torque within specified time
[FSR-003] [FSR] The system shall maintain symmetrical braking torque delivery
[TSR-001] [TSR] Dual-channel cross-validation of torque demand signals
[TSR-002] [TSR] Dual independent power supply for hydraulic actuation
[TSR-003] [TSR] Redundant pressure sensors for left/right monitoring

πŸ“ Project Structure

iso26262-agent/
β”œβ”€β”€ README.md                    # This file
β”œβ”€β”€ demo.py                      # Quick demo script (run this!)
β”œβ”€β”€ requirements.txt             # Python dependencies
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ __init__.py              # Package initialization
β”‚   β”œβ”€β”€ server.py                # MCP protocol server + CLI
β”‚   β”œβ”€β”€ tools.py                 # 4 safety tools + SafetyAgent class
β”‚   β”œβ”€β”€ rag.py                   # RAG pipeline (embeddings + search)
β”‚   └── models.py                # Pydantic data models
β”œβ”€β”€ knowledge_base/
β”‚   β”œβ”€β”€ asil_determination.md    # ASIL classification tables
β”‚   β”œβ”€β”€ failure_modes_automotive.md  # ECU failure mode patterns
β”‚   β”œβ”€β”€ hara_methodology.md      # HARA process & examples
β”‚   β”œβ”€β”€ iso26262_overview.md     # ISO 26262 Parts 1-12 summary
β”‚   └── safety_requirements_patterns.md  # Requirement templates
β”œβ”€β”€ tests/
β”‚   └── test_tools.py            # Unit tests
└── docs/

πŸ”‘ Key Design Decisions

Decision

Rationale

MCP Protocol

Standardized AI tool interface β€” works with any MCP client

RAG over fine-tuning

Updatable knowledge base, no retraining needed, source traceability

TF-IDF fallback

Works without API key for demos and testing

Pydantic models

Type-safe, validated, serializable structured output

Automotive-specific KB

Not generic FMEA β€” tailored to ECU failure patterns

Separated concerns

RAG, Tools, Models, Server β€” each independently testable


🎯 Supported Automotive Domains

  • Power Electronics β€” Inverters, DC-DC converters, motor controllers

  • Connectivity β€” TCU, V2X, telematics

  • ADAS / Autonomous Drive β€” Camera, radar, sensor fusion, path planning

  • Battery Management β€” BMS, cell balancing, thermal management

  • Braking / Steering β€” Brake-by-wire, EPS, stability control

  • Body Electronics β€” Lighting, door control, climate


⚠️ Disclaimer

This tool assists engineers in safety analysis β€” it does not replace human judgement for safety-critical decisions. All outputs should be reviewed by qualified functional safety engineers before use in production.


πŸ‘€ Author

Abinash Kumar β€” AI & Automotive Connectivity Engineer


πŸ“„ License

MIT License

A
license - permissive license
-
quality - not tested
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

View all related MCP servers

Related MCP Connectors

  • MCP server for the Fail Modes taxonomy β€” a knowledge base of AI system failure modes

  • MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.

  • MCP server for AI access to SmartBear tools, including BugSnag, Reflect, Swagger, PactFlow, QTM4J.

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/Abinash009/iso26262-agent'

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