OPC-UA MCP Server

v1.0.0
io.github.mwieczorkiewicz/opcua-mcp Checked 14 hours ago Published 3 months ago

Read, write, browse, search, and subscribe to live data on an OPC-UA industrial automation server.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

opcua_browse

Browse OPC-UA node hierarchy

ParameterTypeDescription
node_idstringNode ID to browse from (defaults to root)

opcua_browse_nodes

Browse through OPC-UA nodes starting from a specific node

ParameterTypeDescription
max_depthnumberMaximum depth to browse (defaults to 3)
node_idstringNode ID to start browsing from (defaults to Objects folder)

opcua_connect

Connect to OPC-UA server

opcua_disconnect

Disconnect from OPC-UA server

opcua_discovery_stats

Get discovery service statistics

opcua_ensure_server_nodes

Ensure critical Server nodes are properly indexed

opcua_find_similar_nodes

Find nodes with similar browse names

ParameterTypeDescription
browse_name *stringBrowse name to search for similar nodes
max_resultsnumberMaximum number of results to return (defaults to 10)

opcua_force_discovery

Force an immediate discovery refresh

opcua_get_value

Get value of a variable by node ID

ParameterTypeDescription
node_id *stringNode ID of the variable to read

opcua_get_value_by_name

Get value of a variable by its browse name

ParameterTypeDescription
browse_name *stringBrowse name of the variable to read

opcua_list_subscriptions

List all active push-based subscriptions, reflecting persisted intent even immediately after a server restart, before re-subscription completes.

opcua_node_info

Get information about an OPC-UA node

ParameterTypeDescription
node_id *stringNode ID to get information for

opcua_read

Read values from OPC-UA nodes now. Subscribed nodes (see opcua_subscribe) are always served from the live push-based cache; others go live unless max_age_ms allows a cached value.

ParameterTypeDescription
node_ids *stringNode IDs to read. Supports multiple formats: single node (i=85), comma-separated (i=85,i=86), or JSON array (["i=85","i=86"])
max_age_msnumberMaximum acceptable age (milliseconds) of a cached value before falling back to a live read. 0 (default) means always live for non-subscribed nodes; subscribed nodes are always served fresh regardless…

opcua_server_info

Get OPC-UA server information

opcua_subscribe

Subscribe to push-based live updates for one or more OPC-UA nodes. Subscriptions persist across server restarts and are automatically re-established on startup.

ParameterTypeDescription
interval_ms *numberPublishing interval in milliseconds
node_ids *stringNode IDs to subscribe to. Supports the same formats as opcua_read: single node, comma-separated, or JSON array

opcua_unsubscribe

Cancel an active subscription, either by its subscription_id or by naming one or more of its subscribed node_ids (removes the entire subscription group those nodes belong to - subscriptions cannot be partially cancelled).

ParameterTypeDescription
node_idsstringNode IDs whose subscription group(s) should be cancelled - provide this or subscription_id, not both
subscription_idstringSubscription ID to cancel

opcua_write

Write values to OPC-UA nodes with automatic type validation. The tool reads the node's data type first and validates that the provided value is compatible before attempting to write.

ParameterTypeDescription
node_id *stringNode ID to write to
value *stringValue to write (JSON format). Supports: booleans (true/false), integers, floats, strings, arrays, and DateTime values