Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sample-apps/auto-planner-mcp
Submodule auto-planner-mcp added at 09f6ff
13 changes: 13 additions & 0 deletions sample-apps/my-mcp-server/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# NitroStack Configuration
NITRO_LOG_LEVEL=info
NITROSTACK_APP_MODE=universal

# Server Transport Configuration (Optional)
# =============================================================================
# MCP_TRANSPORT_TYPE: Toggles transport mode. Values: stdio | http | dual.
# Defaults to 'stdio' in development and 'dual' in production/NODE_ENV=production.
# =============================================================================
# MCP_TRANSPORT_TYPE=stdio
# PORT=3000
# HOST=localhost
# ENABLE_CORS=true
65 changes: 65 additions & 0 deletions sample-apps/my-mcp-server/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Dependencies
node_modules/
src/widgets/node_modules/

# Build outputs
dist/
src/widgets/.next/
src/widgets/out/

# Environment files
.env
.env.local
.env.*.local

# IDE
.idea/
.vscode/
*.swp
*.swo
*~

# OS files
.DS_Store
Thumbs.db

# Logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids/
*.pid
*.seed
*.pid.lock

# Coverage
coverage/
.nyc_output/

# Uploads
uploads/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache
.npm/

# Optional eslint cache
.eslintcache

# OAuth tokens/secrets (never commit these!)
*.pem
*.key
tokens.json
.nitrostudio/

# Python
.venv/
__pycache__/
*.pyc
.pytest_cache/

67 changes: 67 additions & 0 deletions sample-apps/my-mcp-server/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# AI Production Planner MCP (`auto-planner-mcp`)

An Industry 4.0 AI Production Planning MCP (Model Context Protocol) Server for automotive manufacturing lines. This system provides unified assembly queue management, intelligent build plan resequencing, Just-In-Sequence (JIS) inventory tracking, Overall Equipment Effectiveness (OEE) analytics, and financial downtime impact calculations.

---

## 📐 System Architecture & Structure

```text
auto-planner-mcp/
├── data/ # Industry 4.0 Mock Datasets
│ ├── assembly_queue.json # Active vehicle assembly queue (VINs, models, seat types)
│ ├── inventory_jit.json # Just-In-Time/Sequence parts inventory & ETA tracking
│ └── station_oee.json # Assembly station efficiency & operational status
├── teammates/ # Core Production Logic Engines
│ ├── dev_a/ # Assembly Queue & Resequencing Module
│ │ ├── __init__.py
│ │ └── logic.py
│ └── dev_b/ # Inventory & OEE Analytics Module
│ ├── __init__.py
│ └── logic.py
├── package.json # NitroStack MCP server configuration
└── tsconfig.json # TypeScript configuration
```

---

## ✨ Features & Production Tools

### 🚘 Assembly Queue & Resequencing Module
- **`get_assembly_sequence(shift_id: str, line_id: str)`**
- Retrieves the active build queue for a specified shift and assembly line.
- **`resequence_build_plan(delay_reason: str, missing_option: str)`**
- Dynamically resequences the assembly line schedule when part shortages occur (e.g., missing seat trims) by prioritizing available vehicle configurations and shifting delayed VINs to the end of the queue.

### 🏭 Inventory & Equipment Analytics Module
- **`check_jis_inventory(part_number: str, vin_sequence: str = None)`**
- Checks stock levels, supplier ETAs, and shortage indicators for required JIS automotive components.
- **`calculate_station_oee(station_id: str)`**
- Calculates Overall Equipment Effectiveness ($OEE = Availability \times Performance \times Quality$) for assembly stations (e.g., `STATION_WELDING`).
- **`estimate_downtime_cost(stopped_station_id: str)`**
- Computes estimated financial losses based on station downtime duration (assumes $\$22,000/\text{min}$ for non-running stations).

---

## 📊 Data Schemas

| Dataset | File Path | Key Attributes |
| :--- | :--- | :--- |
| **Assembly Queue** | `data/assembly_queue.json` | `vin`, `model`, `trim`, `seat_type`, `status` |
| **JIT Inventory** | `data/inventory_jit.json` | `stock`, `supplier_eta`, `shortage` |
| **Station OEE** | `data/station_oee.json` | `availability`, `performance`, `quality`, `status` |

---

## 🚀 Running the MCP Server

```bash
# Start in development mode
npm run dev

# Build the project
npm run build

# Start production server
npm start
```
5 changes: 5 additions & 0 deletions sample-apps/my-mcp-server/data/assembly_queue.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[
{ "vin": "VIN-101", "model": "SUV-LX", "trim": "Luxury", "seat_type": "RED_LEATHER", "status": "QUEUED" },
{ "vin": "VIN-102", "model": "SEDAN-SE", "trim": "Standard", "seat_type": "BLACK_FABRIC", "status": "QUEUED" },
{ "vin": "VIN-103", "model": "SUV-LX", "trim": "Luxury", "seat_type": "RED_LEATHER", "status": "QUEUED" }
]
4 changes: 4 additions & 0 deletions sample-apps/my-mcp-server/data/inventory_jit.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"RED_LEATHER": { "stock": 0, "supplier_eta": "14:00 IST", "shortage": true },
"BLACK_FABRIC": { "stock": 50, "supplier_eta": "AVAILABLE", "shortage": false }
}
4 changes: 4 additions & 0 deletions sample-apps/my-mcp-server/data/station_oee.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"STATION_WELDING": { "availability": 0.95, "performance": 0.88, "quality": 0.99, "status": "RUNNING" },
"STATION_PAINT": { "availability": 0.00, "performance": 0.00, "quality": 0.00, "status": "MAINTENANCE" }
}
Loading