MCP Integration in OOUAMiddleware

Explore OPC UA Information Models with ChatGPT and MCP Clients

OOUAMiddleware provides OPC UA MCP integration through VpiMcpSrv, a Virtual Protocol Interface hosted by OpenOpcUaCoreServer. This integration enables compatible AI assistants, including ChatGPT, to explore OPC UA information models, navigate objects and references, read process values, and access available historical data.

The OPC UA Information Model remains the foundation of the architecture. MCP provides an additional access interface without requiring a separate representation of the industrial system.

From Industrial Data to Contextual Exploration

Industrial information cannot always be interpreted from individual process variables.

A measurement belongs to an object. That object may represent equipment, a production operation or a manufactured product. Its type defines expected properties and relationships, while its instance contains the information actually available at runtime.

Consider a question such as:

“Which production operations are associated with this stator, and what were the recorded process conditions?”

An MCP client connected to OOUAMiddleware can progressively explore the model:

  1. Identify the stator instance.
  2. Retrieve its ObjectType and declared members.
  3. Follow available references to related production operations.
  4. Identify relevant process variables.
  5. Read their values, status and timestamps.
  6. Retrieve historical samples where configured.

The assistant uses the existing OPC UA AddressSpace. It does not invent relationships or reconstruct the industrial model independently of the server.

The quality of the answer therefore depends on the information actually represented and available in OOUAMiddleware.

VpiMcpSrv: MCP Tools for OPC UA Information Models

The documented VpiMcpSrv implementation exposes 12 MCP tools.

CapabilityMCP tools
Node identification and navigationget_node, browse, get_type
Type and instance explorationfind_instances_of_type, get_type_model, get_object_model
Current value accessread_value, read_values
Variable writingwrite_values
Historical data retrievalread_history_raw
Structural and operational contextvalidate_context, get_operation_context

These tools allow an MCP client to inspect model structure and retrieve the associated runtime information through explicit requests.

Information Model Exploration

The client can navigate OPC UA nodes and references, identify ObjectTypes, examine type declarations and inspect existing object instances.

An important distinction is maintained between the members declared by a type and those actually present on an instance.

This is useful when investigating incomplete equipment representations, comparing objects or examining implementations based on OPC UA Companion Specifications.

The tools support model inspection but do not constitute a complete OPC UA conformance validation system.

Current Data Access

MCP clients can read individual variables or groups of variables.

Returned information can include values, quality indicators and timestamps. These elements are essential when interpreting industrial measurements.

Values may originate from the OOUAMiddleware runtime cache. Multiple reads do not guarantee an atomic snapshot of the underlying process.

Historical Data Access

VpiMcpSrv can retrieve raw historical samples for variables connected to an operational historian.

Historical access uses the persistence infrastructure already configured in OOUAMiddleware.

The documented MCP implementation provides raw historical samples rather than aggregated or interpolated results.

Structural Context Exploration

The context-oriented tools help clients check expected structural paths and collect information associated with an industrial operation.

Relationships are obtained from the configured model.

A reference between objects establishes a modeled relationship, not necessarily a causal relationship. Missing references or incomplete traversal results must be reflected in the assistant’s response.

Architecture: One Industrial Model, Multiple Access Interfaces

OOUAMiddleware separates industrial connectivity, information modeling, runtime execution, persistence and external access interfaces.

The MCP integration follows the same architecture.

MCP Client → MCP Endpoint → VpiMcpSrv → OOUAMiddleware Runtime → Industrial Sources and Persistence

The OPC UA Information Model defines the objects, types and relationships.

OOUAMiddleware manages the runtime representation of this model and provides access to configured industrial sources through its Virtual Protocol Interfaces (VPIs).

Historical information is managed through the configured persistence interfaces (VFIs).

VpiMcpSrv makes selected runtime capabilities available to MCP clients.

The MCP interface does not replace OPC UA Client/Server communication, industrial connectivity or the existing persistence architecture.

Using ChatGPT to Explore an Industrial Model

A documented Windows demonstration connects ChatGPT to an OOUAMiddleware instance through an MCP endpoint exposed using a network tunnel.

Once the connection is configured, the assistant can invoke the available MCP tools to investigate the model.

Typical exploration requests include:

  • “Find all equipment instances derived from this ObjectType.”
  • “Compare the members declared by the type with those present on this instance.”
  • “Identify the measurements associated with this production operation.”
  • “Retrieve available historical samples for this temperature variable.”
  • “Follow the available references to identify the material associated with this manufactured product.”
OPC UA MCP Integration demonstration with ChatGPT exploring stator S001, PressFit temperature and copper material traceability using OOUAMiddleware.

ChatGPT exploring stator S001 through OOUAMiddleware MCP integration, identifying its OPC UA type, production operation and copper traceability.

These requests can combine several MCP tool calls.

The assistant can use results from earlier calls to discover the NodeIds needed for subsequent navigation and data retrieval.

Results must remain grounded in the server responses. Information that is absent, inaccessible or not verified should be identified explicitly.

Security and Operational Boundaries

Industrial MCP access requires explicit consideration of permissions, exposed information and network security.

The documented implementation includes a variable-writing tool, write_values.

For read-only deployments, writing must be restricted by effective server-side authorization or access controls. A prompt instructing an assistant not to write is not a security mechanism.

Other implementation boundaries include:

  • No MCP subscription capability in the documented implementation.
  • No JSON-RPC batch request support.
  • No complete interactive OAuth authorization flow.
  • Raw historical reads without aggregation or interpolation.
  • Navigation and context exploration limits that may result in incomplete responses.
  • Non-transactional write operations subject to variable permissions.

The documented demonstration is not, by itself, a validated production security architecture.

Authentication, client compatibility, network exposure and authorization must be reviewed before connecting an MCP client to industrial information.

Evaluate MCP with Your Industrial Information Model

An initial evaluation can be limited to read-only exploration of a selected part of an existing OPC UA information model.

This provides a practical way to verify how a compatible MCP client interprets object types, instances, references and process values.

Where an appropriate historian is configured, the evaluation can also cover historical data retrieval.

4CE Industry provides technical assistance for OOUAMiddleware configuration, OPC UA information modeling and MCP integration.

Existing OOUAMiddleware users can also request information about current versions and integration support.

Discuss your project with 4CE Industry