PR

Predictive Maintenance MCP Server Vibration and Bearing Diagnostics

Optimize uptime with MCP server for AI vibration analysis, bearing diagnostics, ISO 20816-3 compliance and ML anomaly detection on industrial equipment.

Quick Install
npx -y @LGDiMaggio/predictive-maintenance-mcp

Overview

This MCP (Model Context Protocol) server provides an integrated environment for vibration analysis, bearing diagnostics, and anomaly detection targeted at predictive maintenance workflows. It exposes a set of model-backed tools and utilities that support extracting vibration features, running bearing-fault classification, computing ISO 20816-3 banding, and running machine-learning-based anomaly detection on time-series sensor data. The server is designed to be used as a programmatic service that other systems (SCADA, IIoT gateways, analytics pipelines) can call to add automated diagnostics and condition monitoring.

For developers, the server combines off-the-shelf ML models, signal-processing routines, and ISO-compliant evaluation logic behind an MCP-style API so that context-aware model calls and tool invocations are consistent and reproducible. This helps operations teams turn raw accelerometer or velocity signals into actionable insights (e.g., fault type, severity band, anomaly score) while keeping the workflow automatable and auditable.

Features

  • Vibration feature extraction (time- and frequency-domain metrics)
  • Bearing fault classification using pretrained ML models
  • ISO 20816-3 band calculation for severity assessment
  • Unsupervised anomaly detection for continuous monitoring
  • MCP-compatible API for context-rich tool invocation
  • Docker and local deployment options for edge and cloud
  • Example clients and sample datasets for integration testing
  • Structured outputs suitable for dashboarding and alerts

Installation / Configuration

Clone the repository and run with Docker or install dependencies locally.

Clone the repo:

git clone https://github.com/LGDiMaggio/predictive-maintenance-mcp.git
cd predictive-maintenance-mcp

Run with Docker Compose:

docker-compose up --build
# or
docker build -t predictive-mcp .
docker run -p 8080:8080 predictive-mcp

Local Python install (for development):

python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
uvicorn mcp_server.app:app --host 0.0.0.0 --port 8080

Example environment variables / config (config.yml):

server:
  host: 0.0.0.0
  port: 8080

models:
  bearing_classifier: models/bearing_classifier.pt
  anomaly_detector: models/anomaly_detector.pkl

iso:
  standard: "ISO 20816-3"
  reference_levels: data/iso_reference_levels.json

Common environment variables:

  • MCP_PORT: port to run the server (default 8080)
  • MODEL_DIR: directory where model artifacts are stored
  • LOG_LEVEL: server logging verbosity

Available Tools

The server exposes a set of tools (via the MCP API) that map to common tasks in vibration-based predictive maintenance.

Tool namePurposeInputsOutputs
vibration_featuresExtract time/freq domain metricsraw time-series (accel), sampling_ratefeatures JSON (RMS, kurtosis, crest factor, PSD bands)
bearing_classifierPredict bearing fault classfeatures or waveformclass label, confidence
iso_band_calculatorMap levels to ISO 20816-3 severity bandsRMS/velocityseverity band (A/B/C/D), thresholds
anomaly_detectorUnsupervised anomaly scoringstreaming features or windowed waveformanomaly score, alert flag
waveform_preprocessorDenoise / resample / windowraw waveformpreprocessed waveform

Available resources in the repo:

  • sample_datasets/: example vibration recordings (CSV/WAV)
  • notebooks/: demo workflows and visualizations
  • clients/: example Python and curl-based clients to call MCP tools
  • models/: pre-trained model artifacts (if included)

Use Cases

  1. Continuous bearing health monitoring (edge)

    • Deploy the server on an edge gateway that collects accelerometer samples.
    • Every minute, call vibration_features -> anomaly_detector -> iso_band_calculator.
    • If anomaly score or ISO severity crosses threshold, emit an MQTT alert or create a ticket.

    Example (curl):

    curl -X POST http://localhost:8080/mcp/invoke \
      -H "Content-Type: application/json" \
      -d '{
        "tool": "vibration_features",
        "input": {"waveform": [0.001, 0.002, ...], "sampling_rate": 256}
      }'
    
  2. Batch analysis after maintenance

    • Upload bearing run-to-failure logs to the server for post-mortem classification.
    • Run bearing_classifier on feature sets to determine fault root-cause distribution across failures.
  3. ISO-compliant reporting for audits

    • Use iso_band_calculator to convert RMS/velocity measures to ISO 20816-3 bands for standardized reporting.
    • Export results to CSV or PDF for maintenance records.
  4. Hybrid anomaly + supervised classification

    • Use anomaly_detector to surface candidate windows, then run bearing_classifier to get likely fault type only when anomalies are present, reducing compute and false positives.

Getting Help / Next Steps

  • Explore the notebooks/ directory for end-to-end examples.
  • Use the example clients to integrate the server into your pipeline.
  • For extensions, add new tools by implementing the MCP tool interface in the server’s tools/ folder and registering them in the config.

Repository: https://github.com/LGDiMaggio/predictive-maintenance-mcp

Common Issues & Solutions

I see that my project is listed on Spark but I'm unsure how to claim it.

✓ Solution

I ran into this too! Claiming your listing on Spark is straightforward. By following the provided steps, you can verify your maintainer status and gain access to features like editing your listing and viewing analytics. It's a great way to enhance your project's visibility and credibility. Just head to the claim link and follow the instructions to get started! npm install @ChromeDevTools/chrome-devtools-mcp

npm install @ChromeDevTools/chrome-devtools-mcp

The predictive-maintenance-mcp repository is encountering issues that may affect its functionality.

✓ Solution

I ran into this too! It seems like the MCP server isn't handling requests properly due to missing dependencies. Installing `@ChromeDevTools/chrome-devtools-mcp` resolved the problem for me, as it includes necessary tools that enhance the debugging process and streamline the server's performance. Make sure to add it to your package.json to avoid similar issues in the future. npm install @ChromeDevTools/chrome-devtools-mcp

npm install @ChromeDevTools/chrome-devtools-mcp