Calculator MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Calculator MCP Servercalculate 2 plus 2"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
FactoryLens MCP
FactoryLens is a Model Context Protocol (MCP) server for smart factory operations. It exposes machine telemetry, maintenance records, equipment manuals, and production schedules as structured MCP tools, resources, and prompts so AI assistants can run a full equipment failure investigation—from sensor anomaly detection through root cause analysis, business impact estimation, work order creation, and report generation—without switching between spreadsheets, log exports, and PDF manuals.
Built for the Factory MCP Hackathon on the NitroStack SDK.
The Problem
When a machine triggers a telemetry alert, plant operators typically pull data from several disconnected sources: CSV sensor exports, SQLite or ERP maintenance logs, plain-text or PDF manuals, and production scheduling spreadsheets. Each hop adds delay, and it is difficult to connect a temperature spike on the shop floor to a specific production line's revenue exposure.
FactoryLens consolidates that workflow behind a single MCP server. An AI client (Cursor, Claude Desktop, NitroStudio, or any MCP-compatible host) can chain seven investigation tools in sequence, read factory data through four resources, and use role-specific prompts to communicate findings to technicians and managers—all from the chat interface.
Related MCP server: Calculator MCP Server
Key Features
Sensor anomaly analysis — Parses CSV telemetry (
timestamp,temperature,vibration,current,voltage) and flags readings against configurable safety thresholds (65 °C, 2.5 mm/s, 4.0–5.5 A).Maintenance history lookup — Queries SQLite for repair logs by machine ID, ordered by date.
Manual search — Full-text search across machine operating manuals with contextual line snippets (supports MCH-001 through MCH-005).
Root cause synthesis — Combines sensor anomalies, maintenance history, manual excerpts, and live weather from Open-Meteo (factory coordinates: Kerala, India) into a diagnosis with confidence score, evidence, and recommendations.
Business impact prediction — Estimates downtime hours, production loss in INR, and risk level from the production schedule and severity input.
Work order management — Inserts maintenance tickets into SQLite and sets machine status to
criticalfor high or emergency urgency.Investigation reports — Compiles a Markdown failure report returned in the tool response and saved to
uploads/when the filesystem is writable.Interactive widgets — Seven NitroStack widgets (Next.js) render tool output inside MCP ext-apps clients.
Role-specific prompts — Pre-built prompts for field technicians, plant managers, and emergency shutdown advisories.
Demo frontend — A standalone React console that walks through the MCH-004 conveyor failure scenario with charts and a NitroChat-style interface (uses simulated data, not the live MCP server).
Tech Stack
Layer | Technologies |
MCP Server | NitroStack ( |
Language | TypeScript |
Validation | Zod |
Database | SQLite3 ( |
Widgets | Next.js 14, React 18, |
Frontend Demo | React 19, Vite 8, Tailwind CSS v4, Chart.js, Lucide icons |
External Data | Open-Meteo forecast API (weather, no API key required) |
Protocol |
Architecture
Module layout
The server follows NitroStack's NestJS-style module pattern:
AppModule— Root module; registersConfigModule,FactoryModule, andSystemHealthCheck.FactoryModule— Feature module registeringFactoryTools,FactoryResources,FactoryPrompts, andDatabaseService.DatabaseService— Injectable SQLite service that creates tables and seeds demo data on first run.
Investigation workflow
The intended MCP tool chain for a failure event:
analyze_sensor_data— Upload or read sensor CSV; detect threshold breaches.get_maintenance_history— Pull recent repairs for the affected machine.search_machine_manual— Find relevant manual sections (e.g. E101, overheating).analyze_root_cause— Synthesize a diagnosis from the above inputs plus live weather.predict_business_impact— Estimate downtime and revenue loss.create_work_order— Log a maintenance ticket and update machine status.generate_investigation_report— Produce a Markdown report for stakeholders.
The primary demo scenario centers on MCH-004 (Conveyor System, Packaging Line 1). Sample sensor data in database/sensor.csv shows rising temperature, vibration, and current that point to drive belt slippage—the same pattern the rule engine in analyze_root_cause is designed to detect.
Folder Structure
Factory-mcp-Hackathon/
├── src/ # MCP server source (compiled to dist/)
│ ├── index.ts # Server bootstrap (McpApplicationFactory)
│ ├── app.module.ts # Root NitroStack module
│ ├── database/
│ │ └── db.ts # SQLite service, schema, and seed data
│ ├── health/
│ │ └── system.health.ts # Memory and uptime health check
│ ├── modules/factory/
│ │ ├── factory.module.ts # Factory feature module
│ │ ├── factory.tools.ts # MCP tools (7)
│ │ ├── factory.resources.ts # MCP resources (4)
│ │ └── factory.prompts.ts # MCP prompts (3)
│ └── widgets/ # NitroStack interactive widgets (Next.js)
│ ├── app/
│ │ ├── sensor-anomaly-dashboard/
│ │ ├── root-cause-investigation/
│ │ ├── maintenance-history/
│ │ ├── manual-search/
│ │ ├── business-impact/
│ │ ├── work-order/
│ │ └── investigation-report/
│ └── widget-manifest.json
├── frontend/ # Standalone demo React app (simulated workflow)
│ └── src/App.tsx # FactoryLens investigation console
├── database/
│ ├── factory.db # SQLite database (auto-created on first run)
│ └── sensor.csv # Sample telemetry for MCH-004
├── resources/manuals/
│ ├── MCH-001-manual.txt # CNC Milling Machine manual
│ ├── MCH-002-manual.txt # Robotic Welder manual
│ ├── MCH-003-manual.txt # Injection Molder manual
│ ├── MCH-004-manual.txt # CS-400 conveyor maintenance manual
│ └── MCH-005-manual.txt # Hydraulic Press manual
├── uploads/ # Uploaded CSVs and generated reports
├── .env.example # Environment variable template
├── package.json # MCP server dependencies and scripts
├── tsconfig.json # TypeScript config (excludes src/widgets)
└── start-mcp.cmd # Windows production start helperPrerequisites
Node.js 18+ (22 recommended)
npm 9+
Network access for live weather lookups in
analyze_root_cause(falls back to static values if Open-Meteo is unreachable)
Installation
1. Clone the repository
git clone https://github.com/janakir2006/Factory-mcp-Hackathon.git
cd Factory-mcp-Hackathon2. Install MCP server dependencies
npm installOr use the NitroStack installer to pull server and widget dependencies together:
npm run install:all3. Configure environment
cp .env.example .envEdit .env only if you need to change transport mode, port, or log level (see Environment Variables below).
4. (Optional) Frontend demo
cd frontend
npm install
cd ..5. (Optional) Widgets
cd src/widgets
npm install
cd ../..Running the Project
MCP server (development)
Starts the server over STDIO, which is the default for local MCP clients:
npm run devOn first start, SQLite creates database/factory.db and seeds five machines (MCH-001 through MCH-005) with maintenance logs and production schedules.
MCP server (production)
Builds TypeScript to dist/ and starts with dual transport (STDIO + HTTP SSE):
npm run build
npm run start:prodAlternatively:
npm startThis runs build then start:prod in one step.
On Windows, start-mcp.cmd wraps npm run start:prod (update the cd path inside the script to match your local checkout).
Frontend demo console
cd frontend
npm run devOpen the URL Vite prints (typically http://localhost:5173). The frontend runs a simulated investigation flow for MCH-004 with hardcoded telemetry charts and mock tool outputs—it does not call the MCP server directly.
Widgets (for NitroStack / MCP ext-apps)
cd src/widgets
npm run devWidgets serve on port 3001. Each tool that declares a @Widget(...) decorator maps to a page under src/widgets/app/.
Testing with NitroStudio
NitroStudio is the recommended way to exercise tools, resources, prompts, and widgets during development.
Environment Variables
Copy .env.example to .env and adjust as needed:
Variable | Default | Description |
|
| Server log verbosity |
|
| NitroStack app mode |
|
| Transport: |
|
| HTTP port when using HTTP or dual transport |
|
| HTTP bind address |
| — | Enable CORS for HTTP transport |
| — | Set to |
No API keys are required for the core server. All factory data is local (SQLite + text files). Weather data is fetched from Open-Meteo without authentication.
MCP Server Reference
Server name: factory-mcp-server
Version: 1.0.0
Tools and tasks
Tool | Description | Widget |
| Parse sensor CSV and detect anomalies (temp > 65 °C, vibration > 2.5 mm/s, current outside 4.0–5.5 A) |
|
| Fetch maintenance logs for a machine from SQLite |
|
| Search manuals for error codes and troubleshooting text |
|
| Diagnose failure from anomalies, history, manual matches, and live weather |
|
| Estimate downtime, production loss (INR), and risk level |
|
| Insert a maintenance ticket; set machine status to |
|
| Compile and save a Markdown investigation report |
|
Resources
URI | Description |
| Machine operating manual (plain text) |
| Maintenance history (JSON) |
| Active production schedules with machine status |
| Fleet inventory and status |
Prompts
Prompt | Purpose |
| Field advisory with LOTO guidelines and corrective steps |
| Executive summary with downtime, cost, and priority |
| Critical shutdown advisory with safety commands |
Sample data
On first run, SQLite is seeded with five machines, fifteen maintenance log entries, and five production schedules. Sample sensor telemetry lives at database/sensor.csv. Equipment manuals for all five machines are in resources/manuals/.
Connecting an MCP Client
Build the server first, then point your client at the compiled entry point.
Example Cursor MCP config (STDIO):
{
"mcpServers": {
"factory-lens": {
"command": "node",
"args": ["dist/index.js"],
"cwd": "/path/to/Factory-mcp-Hackathon"
}
}
}For development, you can also use npm run dev via your client's preferred command wrapper.
For HTTP transport, set MCP_TRANSPORT_TYPE=http or dual and configure your client to connect to http://localhost:3000 (default port).
Future Improvements
Live frontend ↔ MCP integration — Wire the React demo console to the MCP server over HTTP instead of mock data and
setTimeoutsimulations.Real-time sensor ingestion — Stream telemetry from MQTT or OPC-UA instead of CSV uploads.
LLM-driven root cause analysis — Replace the rule-based diagnosis in
analyze_root_causewith model inference while keeping structured tool outputs.Multi-machine correlation — Detect failures that span production lines or shared utilities.
Authentication and RBAC — Role-based access for operators, engineers, and managers.
Dedicated work order schema — Separate pending work orders from completed maintenance history records.
Alert webhooks — Notify Slack or Teams when anomalies or emergency work orders are created.
Configurable thresholds — Move safety limits (65 °C, 2.5 mm/s, etc.) to environment variables or per-machine specs.
Team
Built for the Factory MCP Hackathon.
Name | GitHub |
Janaki R | |
Mokshitha Yarlagadda | |
Ajalya TM | |
Praneeth Kothamaddi |
Repository: github.com/janakir2006/Factory-mcp-Hackathon
License
MIT License — see project footer in the frontend demo.
🚀 Live Deployment
🌐 NitroChat:
https://nitrochat-factory-metaminds-amrita-university-amritapuri-campus.app.nitrocloud.ai/
⚙️ MCP Server:
https://factory-mcp-6a5a6-metaminds-amrita-university-amritapuri-campus.app.nitrocloud.ai/
Related Links
NitroStudio — MCP testing and debugging
Open-Meteo API — Weather data used in root cause analysis
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityCmaintenanceA minimal template for learning NitroStack with a calculator-focused MCP server and basic widgets.18MIT
- Flicense-qualityCmaintenanceThis MCP server provides calculator tools, resources, and prompts for arithmetic operations, and serves as a minimal template for learning NitroStack fundamentals.
- Alicense-qualityBmaintenanceMinimal template for learning NitroStack fundamentals with a calculator-focused MCP server and basic widgets.5MIT
- Flicense-qualityCmaintenanceA minimal MCP server template for learning NitroStack fundamentals, featuring a calculator module with tools, resources, and prompts.
Related MCP Connectors
Primarily to be used as a template repository for developing MCP servers with FastMCP in Python, P…
This MCP server enables users to perform scientific computations regarding linear algebra and vect…
Educational MCP server with 17 math/stats tools, visualizations, and persistent workspace
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/janakir2006/Factory-mcp-Hackathon'
If you have feedback or need assistance with the MCP directory API, please join our Discord server