Skip to content
    Back to BlogAgentic AI

    MCP Servers for Industrial Systems: Connecting AI Agents to SCADA, MES, and ERP

    Digisailor Team 14 min read902 words

    MCP servers are the bridge between AI agents and the industrial systems they need to operate. This guide covers how to build MCP servers for the four most critical manufacturing systems: SCADA, MES, ERP, and CMMS.

    MCP Server Architecture Pattern

    Every industrial MCP server follows the same pattern:

    1. Transport layer -- How the agent connects (HTTP/SSE for remote, stdio for local)
    2. Authentication -- How the agent proves its identity (API keys, OAuth, certificates)
    3. Resources -- Read-only data the agent can access (sensor values, production orders, inventory)
    4. Tools -- Actions the agent can perform (create work order, adjust setpoint, update order status)
    5. Safety layer -- Constraints that prevent dangerous actions (parameter limits, rate limiting)

    MCP Server for SCADA/OPC-UA

    Resources

    • Live sensor values -- Current readings from any OPC-UA node (temperature, pressure, flow, speed)
    • Historical data -- Time-series data from the historian for trend analysis
    • Alarm status -- Current active alarms and alarm history
    • Equipment status -- Running/stopped/faulted state of each machine

    Tools

    • Read node -- Read the current value of any OPC-UA node
    • Read history -- Query historical data with time range and aggregation
    • Write setpoint -- Write a new value to a writable OPC-UA node (with safety validation)
    • Subscribe -- Subscribe to data changes on specified nodes

    Safety Considerations

    • Whitelist writable nodes -- Only expose nodes that agents should be able to modify
    • Value range validation -- Enforce minimum and maximum values for every writable node
    • Rate limiting -- Prevent agents from changing setpoints too frequently
    • Audit logging -- Log every read and write with agent identity and timestamp
    • Separate from safety systems -- Never expose safety PLC nodes through MCP

    MCP Server for MES

    Resources

    • Production orders -- Current and planned production orders with quantities, due dates, and routing
    • Work-in-progress -- Current WIP at each work center
    • Cycle times -- Actual vs planned cycle times per operation
    • Batch records -- Complete batch genealogy and parameter records
    • OEE data -- Availability, performance, and quality metrics

    Tools

    • Query orders -- Search and filter production orders by status, product, date
    • Update order status -- Mark operations as started, completed, or on hold
    • Record production -- Log production quantities (good, rework, scrap)
    • Create deviation -- Log a process deviation or non-conformance

    Integration Patterns

    • REST API wrapper for cloud-based MES (AVEVA, Plex, IQMS)
    • Database connector for on-premise MES with direct DB access
    • Message queue integration for event-driven MES architectures

    MCP Server for ERP

    Resources

    • Inventory -- Current stock levels by item, location, and lot
    • Purchase orders -- Open POs with status, expected delivery, and supplier
    • Bill of materials -- BOM structure for all products
    • Customer orders -- Sales orders with quantities, due dates, and priorities
    • Cost data -- Standard costs, actual costs, and variances

    Tools

    • Check inventory -- Query available stock for a specific item at a location
    • Create requisition -- Generate a purchase requisition for parts or materials
    • Query BOM -- Retrieve the bill of materials for a product
    • Check order status -- Get the current status of a customer or purchase order

    Security

    ERP access requires careful access control: - Read-only access for most agent use cases - Write access (requisitions) requires approval workflows - Financial data should be restricted to authorized agents only - Segregation of duties must be maintained

    MCP Server for CMMS

    Resources

    • Equipment registry -- Master data for all equipment with specifications
    • Work order history -- Past maintenance work orders with diagnosis and resolution
    • Spare parts -- Parts inventory with locations and reorder points
    • PM schedules -- Preventive maintenance schedules and compliance
    • Failure codes -- Standardized failure mode taxonomy

    Tools

    • Create work order -- Generate a new maintenance work order with diagnosis and instructions
    • Query history -- Search maintenance history by equipment, failure mode, or date
    • Check parts -- Verify spare parts availability and location
    • Update PM schedule -- Adjust preventive maintenance intervals based on condition data

    Deployment Architecture

    On-Premises Pattern

    For factories with strict data sovereignty requirements: - MCP servers run on-premises alongside the systems they wrap - Agents connect via the local network - No data leaves the factory network

    Hybrid Pattern

    For factories with cloud-based analytics: - MCP servers for SCADA/MES run on-premises (real-time, safety-critical) - MCP servers for ERP/CMMS can run in the cloud (less latency-sensitive) - Secure gateway manages traffic between on-premises and cloud

    Edge Pattern

    For edge-deployed agents: - Lightweight MCP servers run on edge devices (NVIDIA Jetson, industrial PCs) - Provide local access to nearby sensors and equipment - Synchronize with central systems when connectivity is available

    Best Practices

    1. One MCP server per system -- Do not combine SCADA and ERP in one server
    2. Version your schemas -- As tools and resources evolve, maintain backward compatibility
    3. Health checks -- MCP servers should expose health endpoints for monitoring
    4. Graceful degradation -- If the underlying system is unavailable, the MCP server should return meaningful errors, not crash
    5. Documentation -- Generate OpenAPI-style documentation for every MCP server
    6. Testing -- Unit test every tool with mock data before connecting to real systems

    Frequently Asked Questions

    Ready to transform your factory?

    Talk to our team about implementing these solutions.

    Get in Touch