DohyeonKong/mes-mcp-server
If you are the rightful owner of mes-mcp-server 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.
An educational Model Context Protocol (MCP) server for Manufacturing Execution System (MES) data analysis focused on footwear manufacturing.
MES MCP Server
An educational Model Context Protocol (MCP) server for Manufacturing Execution System (MES) data analysis focused on footwear manufacturing.
Overview
This project demonstrates how to build a custom MCP server that analyzes real-world footwear manufacturing data. It's designed for educational purposes to help students learn:
- What MCP is and how it works
- How to define resources (documents, PDFs, and data)
- How to implement tools for data analysis
- Real-world manufacturing KPIs (Build to Schedule metrics)
- Manufacturing process understanding (Injection Phylon operations)
Features
Resources
The server exposes two types of resources:
Documents (Markdown and PDF files):
mes://documents/kpi-definitions- BTSv and BTSm KPI formulas and descriptionsmes://documents/data-schema- Documentation of footwear production data structuremes://documents/report-templates- Available report configurationsmes://documents/injection-phylon-operation- IP manufacturing process overviewmes://documents/manufacturing-process- Complete footwear manufacturing process diagram (PDF)
Data (CSV files):
mes://data/production-plan- Scheduled production by model, color, and shoe size (3,395 records)mes://data/production-results- Actual production with MCA02 machine degradation scenario
Tools
The server provides four main tools:
- calculate_kpi - Calculate BTSv or BTSm for specific zones, machines, or shifts
- calculate_all_kpis - Calculate all KPIs for a dashboard view
- analyze_kpi_trend - Analyze KPI trends over time (identify machine degradation)
- generate_kpi_report - Generate formatted reports with analysis
Supported KPIs
-
BTSv (Build to Schedule - Volume) -
(Total Units Produced / Total Units Planned) × 100%- Measures whether total production volume matches the plan
-
BTSm (Build to Schedule - Mix) -
(Matched Production / Total Units Planned) × 100%- Measures whether the right products (model, color, size) were produced
- Matched Production = sum of min(actual, planned) for each item
Project Structure
mes-mcp-server/
├── src/
│ └── index.js # Main MCP server implementation
├── docs/ # Document resources
│ ├── kpi-definitions.md # BTSv and BTSm KPI definitions
│ ├── data-schema.md # Footwear production data schema
│ ├── report-templates.md # Report templates
│ ├── injection-phylon-operation.md # IP process documentation
│ └── manufacturing-process.pdf # Manufacturing process diagram
├── data/ # Data resources (CSV)
│ ├── production-plan.csv # 3,395 production plan records
│ └── production-results.csv # Results with MCA02 degradation
├── tests/ # Test files (to be implemented)
├── package.json
└── README.md
Installation
-
Prerequisites:
- Node.js 18 or higher
- npm or yarn
-
Install dependencies:
cd mes-mcp-server npm install -
Test the server:
npm start
Usage with Claude Desktop
To use this MCP server with Claude Desktop, add it to your Claude configuration:
On macOS: Edit ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: Edit %APPDATA%\Claude\claude_desktop_config.json
Add the following configuration:
{
"mcpServers": {
"mes": {
"command": "node",
"args": ["/absolute/path/to/mes-mcp-server/src/index.js"]
}
}
}
Replace /absolute/path/to with your actual project path.
After updating the configuration, restart Claude Desktop.
Example Usage
Once connected to Claude Desktop, you can:
View KPI definitions:
Can you show me the BTSv and BTSm KPI definitions?
Calculate KPIs:
Calculate BTSv and BTSm for machine MCA02 on 2025-10-08
Analyze machine degradation:
Show me the BTSv trend for machine MCA02 over all dates
Generate reports:
Generate a machine deep dive report for MCA02
Access data directly:
Show me the production plan for ZONE 1
Learn about manufacturing process:
Explain the Injection Phylon operation process
For Students: Learning Activities
Activity 1: Explore Resources
- Use Claude to read all document resources
- Understand the KPI formulas and how they're calculated
- Review the data schema
Activity 2: Calculate KPIs
- Calculate BTSv and BTSm for different zones and machines
- Compare KPIs across different shifts (Shift2, Shift3-1)
- Analyze which machines and zones perform best
Activity 3: Trend Analysis
- Analyze BTSv and BTSm trends over the past week
- Identify machine degradation patterns (e.g., MCA02)
- Find correlations between volume and mix performance
Activity 4: Generate Reports
- Generate different report types
- Compare daily vs. weekly reports
- Understand how reports aggregate data
Activity 5: Modify and Extend
- Add a new KPI definition to
docs/kpi-definitions.md - Add sample data to the CSV files
- Implement a new tool in
src/index.js - Create a custom report template
Data Format
Production Plan CSV
date,shift,zone,machine_id,model_name,mcs_code,color,shoe_size,quantity
2025-10-01,Shift2,ZONE 1,MCA01,AIR MAX BOLT (PS),IU 007,WHITE,8,58
Production Results CSV
date,shift,zone,machine_id,model_name,mcs_code,color,shoe_size,planned_quantity,actual_quantity
2025-10-01,Shift2,ZONE 1,MCA01,AIR MAX BOLT (PS),IU 007,WHITE,8,58,57
Data Scenario:
- Dates: 2025-10-01 to 2025-10-08
- Machine MCA02 degrades from 98% to 40% performance
- Other machines maintain ~98% performance
- Demonstrates BTSv and BTSm anomaly detection
Extension Ideas
Students can extend this project by:
-
Adding Google Sheets Integration:
- Replace CSV files with Google Sheets API
- Learn about OAuth2 authentication
- Handle real-time data updates
-
Adding New KPIs:
- MTBF (Mean Time Between Failures)
- MTTR (Mean Time To Repair)
- TEEP (Total Effective Equipment Performance)
-
Enhanced Reporting:
- Generate actual chart images using charting libraries
- Add AI-generated insights and recommendations
- Export reports to PDF
-
Data Visualization:
- Create a web dashboard
- Add real-time monitoring
- Implement alerts for threshold violations
-
Advanced Analytics:
- Predict equipment failures using historical data
- Optimize production schedules
- Identify root causes of quality issues
Troubleshooting
Server won't start:
- Check that Node.js 18+ is installed:
node --version - Ensure dependencies are installed:
npm install - Check for syntax errors in
src/index.js
Claude can't connect:
- Verify the path in
claude_desktop_config.jsonis correct - Use absolute paths, not relative paths
- Restart Claude Desktop after config changes
- Check Claude logs for error messages
No data returned:
- Verify CSV files exist in the
data/directory - Check CSV format matches the schema
- Ensure date formats are correct (YYYY-MM-DD)
Learning Resources
License
MIT License - Free for educational use
Contributing
This is an educational project. Students are encouraged to:
- Fork the repository
- Add new features
- Share improvements
- Create teaching materials
Happy Learning! 🏭📊
For questions or issues, please refer to the MCP documentation or consult your instructor.