Proof of Concept: AI-Powered Predictive Maintenance & Fault Diagnosis MCP Server - Industrial machinery condition monitoring, vibration analysis, bearing diagnostics, and ML-based anomaly detection through Model Context Protocol
Project description
๐ญ Predictive Maintenance MCP Server
Transform raw vibration data into actionable maintenance insights through natural conversation with AI.
A Model Context Protocol server that brings industrial machinery diagnostics directly to LLMs like Claude, enabling AI-powered vibration analysis, bearing fault detection, and predictive maintenance workflows โ all through natural language.
๐ฏ Our Mission
Predictive maintenance is critical for Industry 4.0, yet expert-level machinery diagnostics remains inaccessible to most engineers. Complex diagnostic workflows โ FFT spectrum analysis, envelope demodulation, ISO severity assessment โ require years of specialized training.
We believe that AI can democratize this expertise.
By combining the reasoning capabilities of Large Language Models with specialized diagnostic tools through the Model Context Protocol (MCP), we create a bridge: engineers can describe a problem in plain language and receive professional-grade analysis. No signal processing PhD required.
This project is an open-source framework that proves this vision works. It's a foundation โ a set of building blocks โ that the community can extend, customize, and deploy for any industrial diagnostics scenario.
๐ Read the full story: Building an AI-Powered Predictive Maintenance System with MCP and Claude
๐๏ธ Ecosystem Architecture
This project is built around the Model Context Protocol (MCP) โ an open standard that lets you package any software tool and make it instantly queryable by an LLM. Think of it as a USB port for AI: plug in a tool, and the LLM immediately knows how to use it.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ YOU (Natural Language) โ
โ "Is this bearing failing? Show me the envelope analysis." โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ LLM (Claude, GPT, local models...) โ
โ Understands your question, selects the right tools โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Model Context Protocol (MCP)
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ PREDICTIVE MAINTENANCE MCP SERVER โ
โ โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โ
โ โ FFT Analysis โ โ Envelope โ โ ISO 20816-3 โ โ
โ โ & Reporting โ โ Demodulation โ โ Compliance โ โ
โ โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โ
โ โ ML Anomaly โ โ Manual/PDF โ โ Bearing โ โ
โ โ Detection โ โ Reader โ โ Catalog โ โ
โ โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โ
โ โ RAG Document โ โ DOCX Report โ โ
โ โ Search (FAISS) โ โ Generation โ โ
โ โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ YOUR DATA (raw files stay on your machine) โ
โ Vibration signals ยท Equipment manuals ยท Trained models โ
โ โ
โ โ ๏ธ Analysis results (peaks, RMS, diagnoses) flow back โ
โ to the LLM provider. Use a local LLM for full air-gap. โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Key insight: The LLM doesn't know signal processing. It knows how to call tools that do signal processing. MCP is the standard that makes this plug-and-play โ you can add new diagnostic tools without changing the LLM.
What This Means For You
- ๐ Plug-and-play โ Add new analysis tools (thermography, oil analysis, acoustics) as simple Python functions โ the LLM discovers them automatically
- ๐ Local processing โ Raw signals never leave your machine; only computed results (peaks, RMS, diagnoses) flow to the LLM. Use a local LLM for full air-gapped privacy
- ๐ค LLM-agnostic โ Works with Claude, ChatGPT, or any MCP-compatible client
- ๐งฑ Modular โ Use only the tools you need, extend with your own
๐ Table of Contents
- ๐ฏ Our Mission
- ๐๏ธ Ecosystem Architecture
- ๐ช Choose Your Path
- โจ What Makes This Special
- ๐ฌ Quick Examples
- ๐ Installation
- โ๏ธ Configuration
- ๐ง Available Tools & Resources
- ๐ค Copilot Skills
- ๐ Detailed Architecture
- ๐ Sample Dataset
- ๐ก Usage Examples
- ๐ Professional Reports
- ๐ Documentation
- ๐งช Testing
- ๐ ๏ธ Development
- ๐ Roadmap
- ๐ค Contributing
- ๐ License
- ๐ Citation
- ๐ Acknowledgments
๐ช Choose Your Path
This project serves two audiences. Pick the door that fits you:
๐ง I'm a Maintenance / Reliability Engineer"I want to use AI for my vibration analysis and diagnostics." You don't need to write code. This tool turns your vibration data into professional reports through simple conversation. What you'll get:
โก๏ธ Start here: Quickstart for Engineers |
๐ป I'm an AI / Software Developer"I want to understand MCP, extend this server, or build my own." The code is your playground. Learn how MCP works, add new diagnostic tools, or use this as a template for your own domain-specific server. What you'll learn:
โก๏ธ Start here: Quickstart for Developers |
๐ก Don't fit either profile? That's fine โ read on for the full documentation, or jump to Quick Examples to see the server in action.
โจ What Makes This Special
-
๐ฏ Real Bearing Fault Data Included โ 20 production-quality vibration signals from real machinery tests (3 healthy, 17 faulty)
-
๐ Professional HTML Reports โ Interactive Plotly visualizations with automatic peak detection and frequency markers
-
๐ค ML Anomaly Detection โ Train unsupervised/semi-supervised models (OneClassSVM/LOF) on healthy baselines with optional hyperparameter tuning
-
๐ ISO 20816-3 Compliance โ Industry-standard vibration severity assessment built-in
-
๐ Advanced Diagnostics โ FFT spectrum analysis, envelope analysis for bearing faults, time-domain feature extraction
Example analysis
-
๐ Multi-Format Support โ Load signals from CSV, MAT (MATLAB), WAV, NPY, and Parquet files
-
๐ RAG Document Search โ Vector search (FAISS + sentence-transformers) with TF-IDF fallback over machine manuals and bearing catalogs. Auto-cached.
-
๐ DOCX Reports โ Generate structured Word diagnostic reports alongside interactive HTML (requires
python-docx) -
๐ OCR for Scanned PDFs โ Automatic OCR fallback (Tesseract) for image-based equipment manuals
-
โก LLM-Optimised Output โ Tool responses return compact summaries (top peaks, statistics) instead of raw arrays, keeping LLM context windows lean
-
๏ฟฝ๐ Zero Configuration โ Works out of the box with sample data, auto-detects sampling rates from metadata
๐ฌ Quick Examples
Example 1: Bearing Fault Detection
Generate envelope report for real_train/OuterRaceFault_1.csv
Result: AI automatically:
- Detects sampling rate from metadata (97,656 Hz)
- Applies bandpass filter (500-5000 Hz)
- Generates interactive HTML report with bearing fault frequencies marked
- Identifies outer race fault at ~81 Hz with harmonics
- Saves report to
reports/envelope_OuterRaceFault_1_*.html
Example 2: ISO 20816-3 Vibration Assessment
Evaluate real_train/OuterRaceFault_1.csv against ISO 20816-3 standard
Result:
- RMS velocity: 4.5 mm/s โ Zone B (Acceptable for long-term operation)
- Interactive HTML report with zone visualization
- Compliance assessment and recommendations
Example 3: Machine Manual Integration + Diagnosis
1. Extract specifications from test_pump_manual.pdf
2. Calculate bearing frequencies for SKF 6205-2RS at 1475 RPM
3. Diagnose bearing fault in signal_from_pump.csv using calculated frequencies
Result: Complete zero-knowledge diagnosis:
- Extracts: Drive end bearing SKF 6205-2RS, operating speed 1475 RPM
- Calculates: BPFO=85.20 Hz, BPFI=136.05 Hz, BSF=101.32 Hz
- Diagnoses: Outer race fault detected with 3 harmonics
๐ More examples: See Usage Examples section below or EXAMPLES.md for complete workflows
๐ Installation
Option A โ PyPI (recommended)
pip install predictive-maintenance-mcp
Then configure your MCP client (see Configuration below) and point it to the installed server.
Option B โ From Source (development)
git clone https://github.com/LGDiMaggio/predictive-maintenance-mcp.git
cd predictive-maintenance-mcp
pip install -e .
Run the Server
# Via module (works with both pip install and editable install)
python -m predictive_maintenance_mcp
# Via console script (after pip install)
predictive-maintenance-mcp
๐ Detailed Installation Guide: See INSTALL.md for troubleshooting and advanced setup.
โ๏ธ Configuration
Claude Desktop
Add to your Claude Desktop config:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
If installed via pip (recommended):
{
"mcpServers": {
"predictive-maintenance": {
"command": "predictive-maintenance-mcp"
}
}
}
If running from source (local dev):
{
"mcpServers": {
"predictive-maintenance": {
"command": "C:/path/to/predictive-maintenance-mcp/.venv/Scripts/python.exe",
"args": ["-m", "predictive_maintenance_mcp"],
"env": {
"PDM_PROJECT_DIR": "C:/path/to/predictive-maintenance-mcp"
}
}
}
}
Important Notes:
- Replace
C:/path/to/predictive-maintenance-mcpwith your actual project path- Use absolute paths โ forward slashes (
/) work on all platforms, including Windows- On macOS/Linux, use
.venv/bin/pythoninstead of.venv/Scripts/python.exe- The
PDM_PROJECT_DIRenv var tells the server where to finddata/,models/, andreports/
After configuration, restart Claude Desktop completely.
VS Code
Add to your MCP configuration (.vscode/mcp.json or user settings):
If installed via pip (recommended):
{
"servers": {
"predictive-maintenance": {
"type": "stdio",
"command": "predictive-maintenance-mcp"
}
}
}
If running from source (local dev):
{
"servers": {
"predictive-maintenance": {
"type": "stdio",
"command": "/path/to/predictive-maintenance-mcp/.venv/bin/python",
"args": ["-m", "predictive_maintenance_mcp"],
"env": {
"PDM_PROJECT_DIR": "/path/to/predictive-maintenance-mcp"
}
}
}
}
Use
.venv/Scripts/python.exeon Windows. ThePDM_PROJECT_DIRenv var tells the server where to finddata/,models/, andreports/.
๐ง Available Tools & Resources
MCP Resources (Direct Data Access)
Resources provide direct read access for Claude to examine data:
๐ Vibration Signals
signal://listโ Browse all available signal files with metadatasignal://read/{filename}โ Read signal data directly (supports CSV, MAT, WAV, NPY, Parquet)
Usage: Claude can directly read signals without calling tools first.
๐ Machine Manuals
manual://listโ Browse available equipment manuals (PDF/TXT)manual://read/{filename}โ Read manual text (first 20 pages)
Usage: Claude can answer ANY question about manual content by reading directly.
MCP Tools (Analysis & Processing)
Tools perform computations and generate outputs:
๐ Analysis & Diagnostics
analyze_fftโ FFT spectrum analysis with automatic peak detectionanalyze_envelopeโ Envelope analysis for bearing fault detectionanalyze_statisticsโ Time-domain statistical indicators (RMS, Crest Factor, Kurtosis, etc.)evaluate_iso_20816โ ISO 20816-3 vibration severity assessmentdiagnose_bearingโ Guided 6-step bearing diagnostic workflowdiagnose_gearโ Evidence-based gear fault diagnostic workflow
๐ค Machine Learning
extract_features_from_signalโ Extract 17+ statistical features from vibration datatrain_anomaly_modelโ Train novelty detection models (OneClassSVM/LOF) on healthy data only, with optional semi-supervised hyperparameter tuningpredict_anomaliesโ Detect anomalies in new signals with confidence scores
๐ Professional Report Generation
generate_fft_reportโ Interactive FFT spectrum HTML report with peak tablegenerate_envelope_reportโ Envelope analysis report with bearing fault markersgenerate_iso_reportโ ISO 20816-3 evaluation with zone visualizationgenerate_diagnostic_report_docxโ Structured Word (.docx) diagnostic report (requirespython-docx)generate_pca_visualization_reportโ 2D/3D PCA projection report for anomaly explorationgenerate_feature_comparison_reportโ Feature-level comparison report across signals/classeslist_html_reportsโ List all generated reports with metadataget_report_infoโ Get report details without loading full HTML
๐ก HTML reports are interactive Plotly visualizations saved to
reports/. DOCX reports are structured Word documents for stakeholders.
๐ Machine Documentation Reader
list_machine_manualsโ List available equipment manuals (PDF/TXT)extract_manual_specsโ Extract bearings, RPM, power from manual (with caching)calculate_bearing_characteristic_frequenciesโ Calculate BPFO/BPFI/BSF/FTF from geometryread_manual_excerptโ Read manual text excerpt (configurable page limit)search_bearing_catalogโ Search bearing geometry in local catalog (20+ common bearings)search_documentationโ Semantic search across machine manuals and bearing catalogs (FAISS vector search or TF-IDF fallback)
MCP Resources:
manual://listโ Browse available manualsmanual://read/{filename}โ Read manual for LLM context
๐ฏ Upload pump manual โ Extract bearing specs โ Auto-calculate frequencies โ Diagnose signal
๐ Data Management & Visualization
list_signalsโ Browse available signal files with metadatagenerate_test_signalโ Create synthetic signals for testingplot_signalโ Generate time-domain signal plotplot_spectrumโ Generate FFT spectrum plotplot_envelopeโ Generate envelope spectrum plot
Copilot Skills (Guided Workflows)
The skills/ directory contains pre-built guided workflows that orchestrate multiple MCP tools into structured diagnostic procedures:
| Skill | Steps | Description |
|---|---|---|
| bearing-diagnosis | 8 | Complete bearing fault detection: statistics โ FFT โ envelope โ frequency matching โ ISO severity โ report |
| quick-screening | 5 | Fast health screening with clear Healthy/Suspicious/Critical classification |
| report-generation | 6 | Professional HTML report generation with composite multi-report option |
โ ๏ธ Skills are Claude / GitHub Copilot-specific. They use SKILL.md with YAML frontmatter, a convention recognised by Claude.ai, Claude Code, and Copilot agents. Other LLM clients can still read them as plain markdown, but automatic skill invocation requires a Claude or Copilot-compatible host.
MCP tools, resources, and HTML reports are LLM-agnostic โ they work with any MCP-compatible client (ChatGPT, Ollama, LM Studio, etc.).
๐ Detailed Architecture
The system follows a hybrid MCP architecture combining Resources (direct data access) and Tools (computational processing):
Detailed Structure
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ CLAUDE / LLM CLIENT โ
โโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ MCP SERVER (FastMCP) โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ RESOURCES (Direct Data Access) โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โ โ Vibration Signals โ โ โ
โ โ โ โข signal://list โ โ โ
โ โ โ โข signal://read/{filename} โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โ โ Machine Manuals โ โ โ
โ โ โ โข manual://list โ โ โ
โ โ โ โข manual://read/{filename} โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ TOOLS (Analysis & Processing) โ โ
โ โ โข FFT, Envelope, ISO 20816-3 โ โ
โ โ โข ML Anomaly Detection โ โ
โ โ โข Report Generation (HTML + DOCX) โ โ
โ โ โข Manual Spec Extraction โ โ
โ โ โข Bearing Frequency Calculation โ โ
โ โ โข Bearing Catalog Search โ โ
โ โ โข RAG Document Search (FAISS / TF-IDF) โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโดโโโโโโโโโโโโโ
โผ โผ
โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ SIGNAL ANALYSIS โ โ DOCUMENT READER MODULE โ
โ MODULE โ โ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโ โ
โ โข FFT Engine โ โ โ PDF Extractโ โ ISO Formulasโ โ
โ โข Envelope โ โ โ (pypdf) โ โ BPFO/BPFI โ โ
โ โข Filters โ โ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโ โ
โ โข Statistics โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โข ML Models โ โ โ Bearing Catalog DB โ โ
โ โข Plotly Charts โ โ โ โข 20+ ISO bearings โ โ
โ โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโฌโโโโโโโโโโ โโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
โผ โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ LOCAL FILE SYSTEM โ
โ โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ data/signals/ โ โ resources/ โ โ
โ โ โโโ real_train/ โ โ โโโ machine_manuals/ โ โ
โ โ โโโ real_test/ โ โ โโโ bearing_catalogs/ โ โ
โ โ โโโ samples/ โ โ โโโ datasheets/ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโ โ โโโ cache/ (auto) โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ reports/ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โข FFT reports โ โ models/ โ โ
โ โ โข Envelope reports โ โ โข Trained ML models โ โ
โ โ โข ISO reports โ โ โข Scalers, PCA โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Key Features:
- โ 4 MCP Resources โ Direct read access to signals and manuals
- โ 27 MCP Tools โ Complete diagnostic workflow (analysis, plotting, ML, reporting incl. DOCX, manuals, RAG search)
- โ 3 Copilot Skills โ Guided diagnostic workflows (Claude / Copilot-specific)
- โ Hybrid Architecture โ Resources for reading, Tools for processing
- โ Local-First โ All data stays on your machine (privacy-preserving)
๐ Sample Dataset
The server includes 20 real bearing vibration signals from production machinery:
Training Set (14 signals):
- โ 2 Healthy Baselines โ Normal operation data
- ๐ด 7 Inner Race Faults โ Variable load conditions
- โ ๏ธ 5 Outer Race Faults โ Various severity levels
Test Set (6 signals):
- โ 1 Healthy Baseline โ Validation data
- ๐ด 2 Inner Race Faults โ Test conditions
- โ ๏ธ 3 Outer Race Faults โ Test conditions
Note: Sampling rates and durations vary by signal (48.8-97.7 kHz, 3-6 seconds). All parameters auto-detected from metadata files.
๐ Full dataset documentation: data/README.md
๐ก Usage Examples
Quick Fault Detection
Diagnose bearing fault in real_train/OuterRaceFault_1.csv
BPFO=81.13 Hz, BPFI=118.88 Hz, BSF=63.91 Hz, FTF=14.84 Hz
Result: โ Outer race fault detected at ~81 Hz with harmonics
Generate Professional Report
Generate envelope report for real_train/OuterRaceFault_1.csv
Result: Interactive HTML saved to reports/ with bearing fault markers
Train ML Anomaly Detector
Train anomaly model on baseline_1.csv and baseline_2.csv
Validate on OuterRaceFault_1.csv
Result: Model detects fault with 95%+ confidence
๐ More examples: EXAMPLES.md for complete diagnostic workflows
๐ Professional Reports
All analysis tools generate interactive HTML reports with Plotly visualizations:
Why HTML Reports?
โ
Universal โ Works with any LLM (Claude, ChatGPT, local models)
โ
Zero tokens โ Files saved locally, not in chat
โ
Interactive โ Pan, zoom, hover for details
โ
Professional โ Publication-ready visualizations
โ
Persistent โ Save for documentation and sharing
Report Types
| Report | Tool | Contents |
|---|---|---|
| ๐ FFT Spectrum | generate_fft_report() |
Frequency analysis, peak detection, harmonic markers |
| ๐ฏ Envelope Analysis | generate_envelope_report() |
Bearing fault frequencies, modulation detection |
| ๐ ISO 20816-3 | generate_iso_report() |
Vibration severity zones, compliance assessment |
| ๐ Diagnostic DOCX | generate_diagnostic_report_docx() |
Word document with stats, peaks, ISO, diagnosis |
All reports include:
- Interactive Plotly charts (pan/zoom/hover)
- Automatic peak detection with frequency tables
- Metadata (signal info, analysis parameters)
- Timestamp and file references
Usage:
Generate FFT report for baseline_1.csv
โ Opens reports/fft_spectrum_baseline_1_20251111_143022.html in browser
๐ Documentation
| Document | Audience | Description |
|---|---|---|
| Quickstart for Engineers | ๐ง Engineers | Get results fast, no coding required |
| Quickstart for Developers | ๐ป Developers | Understand MCP, extend the server |
| EXAMPLES.md | Everyone | Complete diagnostic workflows with step-by-step tutorials |
| INSTALL.md | Everyone | Detailed installation and troubleshooting guide |
| CONTRIBUTING.md | Contributors | How to contribute (for every skill level) |
| Ollama Guide | Engineers | Use with local LLMs (fully air-gapped) |
| CHANGELOG.md | Everyone | Version history |
| data/README.md | Everyone | Dataset documentation |
| skills/ | ๐ค Claude / Copilot | Copilot Skills โ guided diagnostic workflows (bearing, screening, reporting) |
๐งช Testing
This project includes a comprehensive test suite covering all analysis tools:
# Run all tests
pytest
# Run with coverage report
pytest --cov=src --cov-report=html
# Run specific test file
pytest tests/test_fft_analysis.py
# Run with verbose output
pytest -v
Test coverage includes:
- โ FFT analysis and peak detection
- โ Envelope analysis and bearing fault detection
- โ ISO 20816-3 evaluation and zone classification
- โ ML tools (feature extraction, training, prediction)
- โ Report generation system (HTML outputs)
- โ Real bearing fault data validation
See tests/README.md for detailed testing documentation.
๐ ๏ธ Development
Install Development Dependencies
pip install -e ".[dev]"
Code Quality
# Format code
black src/
# Type checking
mypy src/
# Linting
flake8 src/
Debugging
Use MCP Inspector for interactive testing:
npx @modelcontextprotocol/inspector npx predictive-maintenance-mcp
Or from source (with venv active):
npx @modelcontextprotocol/inspector python -m predictive_maintenance_mcp
๐ Roadmap
โจ Recent: v0.7.0 โ Vector Search, OCR & DOCX Reports
- ๐ FAISS vector search โ Semantic document retrieval with sentence-transformers (TF-IDF fallback when not installed)
- ๐ OCR for scanned PDFs โ Automatic Tesseract OCR fallback for image-based equipment manuals
- ๐ DOCX diagnostic reports โ Structured Word documents with statistics, peaks, ISO evaluation, and diagnostic summary
- โก Compact FFT output โ Top-20 peaks + RMS/stats instead of full arrays (~200 KB โ ~2 KB)
๐ฎ Planned Enhancements
Each item below links to an open issue where you can discuss, contribute, or claim the task:
| Priority | Enhancement | Status | Get Involved |
|---|---|---|---|
| โ Done | Parquet/MAT/WAV/NPY data format support | v0.5.0 | โ |
| ๐ด High | Customizable ISO report thresholds | Open | Good First Issue |
| ๐ด High | Docker image for zero-install setup | Open | Help Wanted |
| โ Done | Vector search for large documents (FAISS + sentence-transformers) | v0.7.0 | โ |
| โ Done | OCR for scanned PDF manuals (Tesseract) | v0.7.0 | โ |
| โ Done | DOCX diagnostic reports (python-docx) | v0.7.0 | โ |
| ๐ก Medium | Multi-signal trending โ Compare historical data | Planned | Discuss |
| ๐ข Future | Real-time streaming โ Live vibration monitoring | Concept | โ |
| ๐ข Future | Dashboard โ Multi-asset fleet monitoring | Concept | โ |
| ๐ข Future | Online bearing catalog โ Web search for unknown bearings | Concept | โ |
| ๐ข Future | Multimodal fusion โ Vibration + temperature + acoustic | Concept | โ |
๐ก Have ideas? Open a discussion or create an issue!
๐ค Contributing
We welcome contributions from everyone โ not just programmers. See our full CONTRIBUTING.md guide, which includes specific paths for:
- ๐ง Domain experts โ Validate signals, add datasets, review diagnostic logic
- ๐ป Developers โ Add tools, fix bugs, improve architecture
- ๐ Technical writers โ Improve docs, add tutorials, translate content
- ๐งช Testers โ Edge cases, validation with ground truth data
Quick Start for Contributors
- Browse Issues โ look for
good first issueorhelp wantedlabels - Comment on the issue to claim it
- Fork โ Branch โ Code โ Test โ PR
See CONTRIBUTING.md for detailed setup and guidelines.
๐ License
This project is licensed under the MIT License โ see the LICENSE file for details.
Note: Sample data is licensed CC BY-NC-SA 4.0 (non-commercial). For commercial use, replace with your own machinery data.
๐ Citation
If you use this server in your research or projects, please cite:
@software{dimaggio_predictive_maintenance_mcp_2025,
title = {Predictive Maintenance MCP Server: An open-source framework for integrating Large Language Models with predictive maintenance and fault diagnosis workflows},
author = {Di Maggio, Luigi Gianpio},
year = {2025},
version = {0.7.0},
url = {https://github.com/LGDiMaggio/predictive-maintenance-mcp},
doi = {10.5281/zenodo.17611542}
}
๐ Acknowledgments
- FastMCP framework by @jlowin
- Model Context Protocol by Anthropic
- Sample Data from MathWorks
- Development Assistance: Core codebase and demonstration examples were developed with assistance from Claude by Anthropic to rapidly prototype and demonstrate the Model Context Protocol (MCP) concept for predictive maintenance applications.
โ ๏ธ Development Notice: This codebase was generated using Claude AI under human supervision to explore and validate MCP-based approaches for industrial diagnostics and predictive maintenance workflows. While the implementation demonstrates the potential of AI-assisted development for specialized engineering domains, thorough testing and validation are required before any production or safety-critical use.
๐ฌ Support
- Issues: https://github.com/LGDiMaggio/predictive-maintenance-mcp/issues
- Discussions: https://github.com/LGDiMaggio/predictive-maintenance-mcp/discussions
- Blog post: Building an AI-Powered Predictive Maintenance System with MCP and Claude
Built with โค๏ธ for condition monitoring professionals and the open-source community
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file predictive_maintenance_mcp-0.7.0.tar.gz.
File metadata
- Download URL: predictive_maintenance_mcp-0.7.0.tar.gz
- Upload date:
- Size: 66.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e501d03a6cf2fbdf4cb94160ad95ddc946b6d79d2d14a5be5df788806a324b9
|
|
| MD5 |
93df1181fba34d614be3927df07b000c
|
|
| BLAKE2b-256 |
e917f0ba12bdae2a712b0adb0489bfd3e344d9c5edbc6fdd8f27c57ab0a7d672
|
Provenance
The following attestation bundles were made for predictive_maintenance_mcp-0.7.0.tar.gz:
Publisher:
publish.yml on LGDiMaggio/predictive-maintenance-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
predictive_maintenance_mcp-0.7.0.tar.gz -
Subject digest:
2e501d03a6cf2fbdf4cb94160ad95ddc946b6d79d2d14a5be5df788806a324b9 - Sigstore transparency entry: 1077177909
- Sigstore integration time:
-
Permalink:
LGDiMaggio/predictive-maintenance-mcp@715d7241c8863820e0b5f5aaccc7d16d7030df38 -
Branch / Tag:
refs/tags/v0.7.0 - Owner: https://github.com/LGDiMaggio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@715d7241c8863820e0b5f5aaccc7d16d7030df38 -
Trigger Event:
push
-
Statement type:
File details
Details for the file predictive_maintenance_mcp-0.7.0-py3-none-any.whl.
File metadata
- Download URL: predictive_maintenance_mcp-0.7.0-py3-none-any.whl
- Upload date:
- Size: 89.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
39b193f4d834544dde0f3d9d9d8763297f0ffdbb211f4f7e2b0d33f4921af7a4
|
|
| MD5 |
999cae82e8eb99e23aa4fe1a5d504b39
|
|
| BLAKE2b-256 |
91d5ff51ee4f022fb019bb1282f0b279019be8c650cd92b099911d91bd35df27
|
Provenance
The following attestation bundles were made for predictive_maintenance_mcp-0.7.0-py3-none-any.whl:
Publisher:
publish.yml on LGDiMaggio/predictive-maintenance-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
predictive_maintenance_mcp-0.7.0-py3-none-any.whl -
Subject digest:
39b193f4d834544dde0f3d9d9d8763297f0ffdbb211f4f7e2b0d33f4921af7a4 - Sigstore transparency entry: 1077177931
- Sigstore integration time:
-
Permalink:
LGDiMaggio/predictive-maintenance-mcp@715d7241c8863820e0b5f5aaccc7d16d7030df38 -
Branch / Tag:
refs/tags/v0.7.0 - Owner: https://github.com/LGDiMaggio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@715d7241c8863820e0b5f5aaccc7d16d7030df38 -
Trigger Event:
push
-
Statement type: