subscribe_opcua_nodes
Watch OPC UA nodes for value changes pushed by the server instead of polling them, buffering each update for later retrieval. Stops missed changes and repeated read round trips.
Instructions
Watch one or more OPC UA nodes for value changes instead of polling them. The OPC UA server pushes each new value into a buffer this MCP server keeps; collect them with list_subscriptions or the 'opcua://subscriptions' resource. This is the right way to answer 'tell me when this changes' or 'what has this been doing' over a short window — repeatedly calling read_opcua_nodes both misses changes between calls and costs a round trip each time. Each node gets its own subscription record and its own ID; cancel them with unsubscribe_opcua_nodes. Subscriptions are re-established automatically if the connection drops.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| node_ids | Yes | The OPC UA node IDs to monitor. Example: ['ns=2;i=3']. A single node is a one-element list. Each gets its own OPC UA subscription, and this server holds at most 200 at a time. | |
| buffer_size | No | How many of the most recent changes to retain per subscription; older ones are discarded. Default 20, clamped to 1..1000. | |
| deadband_type | No | Filter out changes too small to be worth reporting (OPC UA Part 4 §7.22). 'none' (the default) reports every change the server samples, which on a noisy analogue tag fills the buffer with sensor jitter in about a second. 'absolute' compares against `deadband_value` in the node's own engineering units. 'percent' reads `deadband_value` as a percentage of the node's EURange, and needs the node to publish one. | |
| deadband_value | No | How far the value must move to be reported, in engineering units for 'absolute' and in percent of EURange for 'percent'. Ignored when `deadband_type` is 'none' or unset; required when it is not. | |
| sampling_interval | No | How often (ms) the OPC UA server samples each node. 0 (the default) means sample at `publishing_interval`; a shorter interval queues several readings per publish. | |
| data_change_trigger | No | What counts as a change. 'statusValue' (the default) reports a change of value or of OPC UA status. 'status' reports only status transitions — useful for watching a tag go bad without caring what it reads. 'statusValueTimestamp' also reports a re-sample that changed nothing but the timestamp, which is how to tell 'the value is steady' from 'the value stopped updating'. | |
| publishing_interval | No | How often (ms) the OPC UA server publishes queued changes. Default 1000. Clamped to at least 50. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | ||
| completeness | Yes |