Skip to main content
Glama
Puru20Srini

FactoryMind AI

by Puru20Srini
README.md
# šŸ­ FactoryMind AI

> An AI-powered Smart Manufacturing Assistant built with **NitroStack** and the **Model Context Protocol (MCP)**.

FactoryMind AI enables engineers, plant managers, and maintenance teams to interact with factory systems using natural language. It connects AI with manufacturing data to provide real-time insights, automate maintenance workflows, and improve operational efficiency in Industry 4.0 environments.

---

## ✨ Features

- šŸ¤– AI-powered manufacturing assistant
- šŸ”§ Machine health analysis
- šŸ“ˆ Executive KPI dashboard
- āš ļø Predictive maintenance recommendations
- šŸ“¦ Spare part availability checking
- šŸ‘Øā€šŸ”§ Automatic technician assignment
- šŸŽ« Maintenance ticket creation
- šŸ­ Factory production monitoring
- šŸ’¬ Natural language interaction with factory systems using MCP

---

## šŸ›  Tech Stack

- **NitroStack**
- **Model Context Protocol (MCP)**
- TypeScript
- Node.js
- OpenAI
- REST APIs

---

## šŸ“ Project Structure

```
FactoryMind-AI/
│
ā”œā”€ā”€ src/
│   ā”œā”€ā”€ prompts/
│   ā”œā”€ā”€ tools/
│   ā”œā”€ā”€ services/
│   ā”œā”€ā”€ workflows/
│   └── index.ts
│
ā”œā”€ā”€ .env.example
ā”œā”€ā”€ package.json
ā”œā”€ā”€ README.md
└── LICENSE
```

---

## šŸš€ Getting Started

### 1. Clone the Repository

```bash
git clone https://github.com/<your-username>/FactoryMind-AI.git

cd FactoryMind-AI
```

### 2. Install Dependencies

```bash
npm install
```

### 3. Configure Environment Variables

Create a `.env` file from `.env.example`.

Example:

```env
OPENAI_API_KEY=your_api_key
FACTORY_API_URL=http://localhost:3000
FACTORY_API_TOKEN=your_token
```

---

## ā–¶ļø Run the Project

Development

```bash
npm run dev
```

Production

```bash
npm run build
npm start
```

---

# MCP Setup

FactoryMind AI is built on the **Model Context Protocol (MCP)** using **NitroStack**.

Configure your MCP server and register the available tools before starting the application.

Example MCP configuration:

```json
{
  "mcpServers": {
    "factorymind": {
      "command": "npm",
      "args": ["run", "start"]
    }
  }
}
```

Once connected, the assistant can invoke manufacturing tools through MCP.

---

# Example Prompts

```
Analyze machine M-102.
```

```
Show the factory dashboard.
```

```
Show executive KPI dashboard.
```

```
Check spare part availability for machine M-102.
```

```
Assign the appropriate technician for machine M-102.
```

```
Create a maintenance ticket for machine M-102.
```

```
Analyze machine M-102, check spare part availability,
assign a technician, and create a maintenance ticket.
```

---

# Example Workflow

```
User
   │
   ā–¼
FactoryMind AI
   │
   ā–¼
NitroStack
   │
   ā–¼
Model Context Protocol (MCP)
   │
   ā”œā”€ā”€ Machine Health Tool
   ā”œā”€ā”€ Production Dashboard Tool
   ā”œā”€ā”€ Spare Parts Tool
   ā”œā”€ā”€ Technician Assignment Tool
   └── Maintenance Ticket Tool
   │
   ā–¼
Factory Systems / APIs
```

---

## šŸ”’ Security

- Never commit API keys or secrets.
- Use environment variables.
- Keep sensitive configuration inside `.env`.
- The repository includes `.env.example` for reference.

---

## šŸ“„ License

This project is licensed under the **MIT License**.

---

## šŸ¤ Contributing

Contributions are welcome!

1. Fork the repository
2. Create a feature branch

```bash
git checkout -b feature/new-feature
```

3. Commit your changes

```bash
git commit -m "Add new feature"
```

4. Push to GitHub

```bash
git push origin feature/new-feature
```

5. Open a Pull Request

---

## šŸ‘Øā€šŸ’» Author

**Advaith K S**

Built for smart manufacturing using **NitroStack** and the **Model Context Protocol (MCP)** to simplify factory operations through AI.