maintenance-mcp

jbandu/maintenance-mcp

3.2

If you are the rightful owner of maintenance-mcp 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.

The Maintenance & MRO Intelligence MCP Server is a comprehensive solution for airline operations, focusing on predictive maintenance, parts optimization, and compliance tracking.

Tools
10
Resources
0
Prompts
0

Maintenance & MRO Intelligence MCP Server

Predictive Maintenance, Parts Optimization & Compliance Tracking for Airlines

Part of the Number Labs Airline Agentic Operating System


🎯 Overview

The Maintenance & MRO Intelligence MCP Server provides comprehensive maintenance intelligence for airline operations, including:

  • Predictive Maintenance - ML-powered failure prediction to prevent AOG events
  • Parts Inventory Optimization - AI-driven demand forecasting and inventory management
  • Compliance Tracking - Automated AD and regulatory compliance monitoring
  • Reliability Analysis - Fleet reliability metrics and trend analysis
  • Cost Forecasting - Maintenance cost projections and budget planning
  • MEL Management - Intelligent tracking and prioritization of deferred defects
  • Component Lineage - Complete lifecycle tracking via Neo4j graph database

🚀 Quick Start

Prerequisites

  • Node.js 18+
  • PostgreSQL 14+
  • (Optional) Neo4j 5+ for component lineage tracking
  • (Optional) Python 3.9+ for ML models

Installation

# Install dependencies
npm install

# Copy environment file
cp .env.example .env

# Edit .env with your database credentials
nano .env

# Set up database
npm run db:migrate
npm run db:seed

# Build the project
npm run build

# Run in development mode
npm run dev

Database Setup

  1. Create PostgreSQL database:
createdb aircraft_db
  1. Run schema:
psql aircraft_db < database/schema.sql
  1. (Optional) Set up Neo4j:
# Start Neo4j
neo4j start

# Load schema
cypher-shell < database/neo4j-schema.cypher

📊 MCP Tools

1. get-aircraft-maintenance-status

Get comprehensive maintenance status for an aircraft.

{
  tail_number: "N12345",
  include_components: true,
  include_history: false,
  history_days: 30
}

Returns: Current status, MEL items, scheduled maintenance, critical alerts, component health

2. predict-component-failures

ML-powered prediction of component failures across the fleet.

{
  aircraft_type: "B737-800",
  component_type: "ENGINE",
  prediction_horizon_days: 90,
  min_confidence: 0.7
}

Returns: Predicted failures with confidence scores, risk assessment, recommended actions

3. optimize-parts-inventory

Optimize spare parts inventory levels using demand forecasting.

{
  stock_location: "DFW",
  optimization_objective: "balanced",
  planning_horizon_months: 12
}

Returns: Current vs optimized inventory, reorder recommendations, cost-benefit analysis

4. track-ad-compliance

Monitor Airworthiness Directive compliance across the fleet.

{
  aircraft_type: "B737-800",
  days_until_due: 90
}

Returns: Compliance summary, overdue ADs, upcoming deadlines, cost projections

5. schedule-maintenance-optimization

Optimize maintenance scheduling to minimize operational disruption.

{
  planning_horizon_days: 90,
  optimization_objective: "maximize_fleet_availability"
}

Returns: Optimized schedule, capacity utilization, fleet availability forecast

6. analyze-reliability-trends

Analyze fleet reliability metrics and identify improvement opportunities.

{
  aircraft_type: "A320",
  analysis_period_days: 180,
  metrics: ["dispatch_reliability", "mtbf", "aog_events"]
}

Returns: Reliability trends, problem aircraft, recurring issues, benchmarks

7. manage-mel-items

Track and manage MEL/CDL items with intelligent prioritization.

{
  tail_number: "all",
  status: ["OPEN", "EXPIRING_SOON"],
  days_expiring: 7
}

Returns: MEL summary, expiring items, repair prioritization

8. get-component-history

Get complete lifecycle history of a component.

{
  serial_number: "SN-12345",
  include_related: true
}

Returns: Component history, installations, failures, performance metrics

9. forecast-maintenance-costs

Generate maintenance cost forecasts with scenario analysis.

{
  forecast_horizon_months: 12,
  include_scenarios: true
}

Returns: Cost forecasts by month and category, major events, budget recommendations

10. generate-maintenance-report

Generate executive or detailed maintenance reports.

{
  report_type: "executive_summary",
  period_start: "2024-01-01",
  period_end: "2024-12-31",
  format: "json"
}

Returns: Comprehensive report with KPIs, trends, recommendations

🏗️ Architecture

┌─────────────────────────────────────────────────────────────┐
│           MAINTENANCE & MRO INTELLIGENCE                    │
│                    MCP SERVER                                │
│                                                              │
│  ┌──────────────┐  ┌──────────────┐  ┌──────────────┐     │
│  │  Predictive  │  │  PostgreSQL  │  │    Neo4j     │     │
│  │    ML        │→ │   Database   │→ │  Component   │     │
│  │   Models     │  │              │  │  Lineage     │     │
│  └──────────────┘  └──────────────┘  └──────────────┘     │
└────────────────────────┬────────────────────────────────────┘
                         │ MCP Tools (10)
            ┌────────────┼────────────────┐
            ↓            ↓                ↓
    ┌──────────────┐ ┌──────────────┐ ┌──────────────┐
    │ Maintenance  │ │   Parts      │ │  Engineering │
    │  Planning    │ │  Management  │ │  Reliability │
    └──────────────┘ └──────────────┘ └──────────────┘

🗄️ Database Schema

Core Tables (12)

  1. aircraft_maintenance_status - Current maintenance status and health
  2. maintenance_events - Historical maintenance events
  3. components_tracking - Major component tracking with hours/cycles
  4. predictive_maintenance_alerts - ML-generated failure predictions
  5. mel_cdl_items - MEL/CDL deferred defects
  6. airworthiness_directives - Master AD list
  7. ad_compliance_tracking - AD compliance by aircraft
  8. parts_inventory - Spare parts inventory
  9. parts_usage_history - Parts consumption history
  10. parts_demand_forecast - ML demand forecasts
  11. reliability_metrics - Daily reliability metrics
  12. maintenance_schedule - Upcoming maintenance schedule

🧠 Machine Learning Models

The server includes ML models for:

  • Failure Prediction - Predicts component failures using historical data, sensor data, and usage patterns
  • Demand Forecasting - Forecasts parts demand using time-series analysis
  • Anomaly Detection - Detects unusual patterns in component behavior

Models are trained on historical fleet data and continuously improved.

🔧 Configuration

Key environment variables:

# Database
POSTGRES_URL=postgresql://localhost:5432/aircraft_db
ENABLE_NEO4J=false

# ML
ML_MODEL_PATH=./ml-models
PREDICTION_THRESHOLD=0.7

# LLM
LLM_MODE=ollama
LLM_MODEL=llama3.2

# Logging
LOG_LEVEL=info

🧪 Testing

# Run all tests
npm test

# Run with coverage
npm run test:coverage

# Watch mode
npm run test:watch

📈 Business Impact

Key Benefits

  • 15-20% reduction in unscheduled maintenance events
  • 10-15% reduction in parts inventory costs
  • 100% AD compliance visibility
  • $2-5M annual savings for mid-size airline

ROI Drivers

  1. Reduced AOG Events - Predictive maintenance catches failures before they ground aircraft
  2. Optimized Inventory - Right parts, right place, right time
  3. Improved Dispatch Reliability - Fewer delays and cancellations
  4. Better Maintenance Planning - Optimized scheduling reduces downtime

🔗 Integration with Other MCPs

This server integrates with:

  • aircraft-database-mcp - Fleet data and utilization
  • crew-mcp - Maintenance crew scheduling
  • routes-mcp - Network optimization for maintenance windows

📝 Development

Project Structure

maintenance-mcp/
├── src/
│   ├── index.ts                 # Main MCP server
│   ├── tools/                   # Tool implementations (10)
│   ├── ml/                      # ML models
│   ├── engines/                 # Business logic engines
│   ├── integrations/            # Other MCP integrations
│   ├── graph/                   # Neo4j component lineage
│   ├── types/                   # TypeScript types
│   ├── db/                      # Database utilities
│   ├── utils/                   # Utilities
│   └── config/                  # Configuration
├── database/                    # SQL schemas and migrations
├── ml-models/                   # Trained ML models
└── tests/                       # Test suites

Adding a New Tool

  1. Create tool file in src/tools/
  2. Define tool schema and handler
  3. Register in src/index.ts
  4. Add validation schema in src/utils/validation.ts
  5. Add types in src/types/mcp.ts
  6. Write tests

🐛 Troubleshooting

Database Connection Issues

# Check PostgreSQL is running
pg_isready

# Test connection
psql $POSTGRES_URL -c "SELECT 1"

Neo4j Issues

# Check Neo4j status
neo4j status

# Test connectivity
cypher-shell "RETURN 1"

MCP Communication Issues

Check logs with increased verbosity:

LOG_LEVEL=debug npm run dev:mcp

📄 License

MIT

🤝 Contributing

Contributions welcome! Please read our contributing guidelines.

📧 Support

For issues and questions, please open an issue on GitHub.


Built by Number Labs | Part of the Airline Agentic Operating System