MES MCP Server — work orders & routing, scheduling, production runs with OEE, factory test yield, and material genealogy / recall traceability
MES MCP Server
A Manufacturing Execution System for ADK-Rust Enterprise electronics, food & beverage, and manufacturing agents. 24 MCP tools spanning work orders & routing, scheduling, shop-floor execution, OEE, factory test yield, and material genealogy / recall traceability.
What It Does
The spine of a MES is work orders executing through routing operations on work centers, producing logged output — and the OEE, yield, and traceability that flow from that execution data.
| Domain | Agents this server backs | |--------|--------------------------| | Electronics | Factory Test Yield Monitor | | Food & Beverage | Batch Quality Release Agent | | Manufacturing | Digital Work Instructions · OEE Analyst · Production Line Monitor · Production Schedule Optimizer · Recall Traceability · Work Order Planner |
Architecture
Work Order Lifecycle
draft → scheduled → released → in_progress → completed → closed
(any active) → cancelled
- Release is gated — must be scheduled to a line, have a routing, and every operation must have a work center assigned. Release assigns the output lot code.
- Operations carry digital work instructions; completing all of them moves the order to
completed. - Close is gated — only a completed order with recorded good output can be closed.
OEE
get_oee computes Availability × Performance × Quality for a run:
- Availability = run time ÷ planned production time (planned downtime excluded, unplanned subtracted)
- Performance = (ideal cycle × total count) ÷ run time
- Quality = good ÷ total
Tools (24)
Work Centers (4)
create_work_center · get_work_center · list_work_centers · set_work_center_status (gated)
Work Orders & Routing (10)
create_work_order · get_work_order · search_work_orders · schedule_work_order · release_work_order (gated) · start_operation · complete_operation · record_output · close_work_order (gated) · cancel_work_order (gated)
Production Runs & OEE (5)
start_run · log_run_output · log_downtime · end_run · get_oee
Test Yield (2)
record_test · yield_report (first-pass yield + defect Pareto)
Traceability (3)
consume_material · trace_forward (recall: where-used) · trace_backward (genealogy)
Example
> create_work_center(name: "CNC-1", line: "LX", ideal_cycle_secs: 60)
> create_work_order(product: "Bracket", product_sku: "BR-9", quantity: 100, priority: 7,
routing: [{name: "Mill", work_center_id: "WC-…", std_time_secs: 60}])
> release_work_order(id: "WO-…") → Error: Can only release a Scheduled work order
> schedule_work_order(id: "WO-…", line: "LX", hours: 2)
> release_work_order(id: "WO-…") → released · lot LOT-BR-9-…
> consume_material(work_order_id: "WO-…", component_lot: "STEEL-LOT-7", component_name: "Steel bar", quantity: "500kg")
> start_run(work_order_id: "WO-…", work_center_id: "WC-…", planned_minutes: 100)
> log_downtime(run_id: "RUN-…", reason: "tool change", minutes: 10)
> log_run_output(run_id: "RUN-…", good: 80, scrap: 5)
> get_oee(run_id: "RUN-…") → A 0.9 · P 0.944 · Q 0.941 · OEE 0.8
> trace_forward(component_lot: "STEEL-LOT-7") → which work orders / output lots used this lot (recall)
Installation
1. Build
git clone https://github.com/zavora-ai/mcp-mes
cd mcp-mes
cargo build --release
2. Add to your MCP client
Claude Desktop / Kiro / Cursor / Windsurf:
{
"mcpServers": {
"mes": {
"command": "/path/to/mcp-mes"
}
}
}
3. Use it
> list_work_centers(line: "L1")
> search_work_orders(status: "in_progress")
> yield_report(work_order_id: "WO-…")
Governance & Data Handling
- Gated floor-control writes — work order release/close/cancel and work center status changes require approval in production; reports and traces are
read_only. - Interlocked lifecycle — release and close rules prevent invalid state transitions.
- Work order audit trail — every state change is recorded.
- Integration scaffold — the in-memory store is for development; back it with your real MES of record and bind actors to authenticated identities in production.
MCP Server Manifest
server_id = "mcp_mes"
display_name = "Manufacturing Execution System"
version = "1.0.0"
domain = "manufacturing"
risk_level = "medium"
writes_allowed = "gated"
transports = ["stdio"]
Contributors
| 
James Karanja Maina |
|:---:|
License
Apache-2.0 — see LICENSE for details.
Part of the ADK-Rust Enterprise MCP server ecosystem.
Registry Compliance
This server implements the ADK MCP SDK contract:
- HealthCheck — async health probe for registry monitoring
- mcp-server.toml — manifest declaring tools, risk classes, and approval gates
- Structured tracing —
RUST_LOGenv-filter for observability