Home / Market / OPC UA MCP Server

OPC UA MCP Server

Connect AI assistants to industrial OPC UA: browse, read, history, subscriptions, events and alarms.

mcp★ 049 dlmcp-registryMIT configuration; upstream service license appliesInstall in CosmosUpstream Source

Documentation & Preview

{ "mcpServers": { "mcp-opcua-41b9812c70aba06510ae": { "command": "npx", "args": [ "-y", "--package", "opcua-mcp-server@0.6.0", "opcua-mcp-server" ], "env": { "OPCUA_SERVER_URL": "${ENV_OPCUA_SERVER_URL}", "OPCUA_PYTHON_BACKEND": "${ENV_OPCUA_PYTHON_BACKEND}", "OPCUA_SECURITY_POLICY": "${ENV_OPCUA_SECURITY_POLICY}", "OPCUA_SECURITY_MODE": "${ENV_OPCUA_SECURITY_MODE}", "OPCUA_CLIENT_CERT": "${ENV_OPCUA_CLIENT_CERT}", "OPCUA_CLIENT_KEY": "${ENV_OPCUA_CLIENT_KEY}", "OPCUA_APPLICATION_URI": "${ENV_OPCUA_APPLICATION_URI}", "OPCUA_SERVER_CERT": "${ENV_OPCUA_SERVER_CERT}", "OPCUA_SERVER_TRUST_STORE": "${ENV_OPCUA_SERVER_TRUST_STORE}", "OPCUA_SERVER_APPLICATION_URI": "${ENV_OPCUA_SERVER_APPLICATION_URI}", "OPCUA_USERNAME": "${ENV_OPCUA_USERNAME}", "OPCUA_PASSWORD": "${ENV_OPCUA_PASSWORD}", "OPCUA_USER_CERT": "${ENV_OPCUA_USER_CERT}", "OPCUA_USER_KEY": "${ENV_OPCUA_USER_KEY}", "OPCUA_PROFILE": "${ENV_OPCUA_PROFILE}", "OPCUA_POLICY_FILE": "${ENV_OPCUA_POLICY_FILE}", "OPCUA_ALLOWED_TOOLS": "${ENV_OPCUA_ALLOWED_TOOLS}", "OPCUA_ALLOWED_WRITE_NODES": "${ENV_OPCUA_ALLOWED_WRITE_NODES}", "OPCUA_ALLOWED_METHODS": "${ENV_OPCUA_ALLOWED_METHODS}", "OPCUA_ALLOW_ACKNOWLEDGE_ALARMS": "${ENV_OPCUA_ALLOW_ACKNOWLEDGE_ALARMS}", "OPCUA_ALLOW_INSECURE_CONTROL": "${ENV_OPCUA_ALLOW_INSECURE_CONTROL}", "OPCUA_ALLOW_UNVERIFIED_SERVER_CONTROL": "${ENV_OPCUA_ALLOW_UNVERIFIED_SERVER_CONTROL}", "OPCUA_ALLOW_OUT_OF_RANGE_WRITES": "${ENV_OPCUA_ALLOW_OUT_OF_RANGE_WRITES}", "OPCUA_AUDIT_FILE": "${ENV_OPCUA_AUDIT_FILE}", "OPCUA_AUDIT_FSYNC": "${ENV_OPCUA_AUDIT_FSYNC}", "OPCUA_AUDIT_CHAIN": "${ENV_OPCUA_AUDIT_CHAIN}", "OPCUA_AUDIT_CHAIN_KEY_FILE": "${ENV_OPCUA_AUDIT_CHAIN_KEY_FILE}", "OPCUA_OPERATOR_ID": "${ENV_OPCUA_OPERATOR_ID}", "OPCUA_RECONNECT_INITIAL_DELAY_MS": "${ENV_OPCUA_RECONNECT_INITIAL_DELAY_MS}", "OPCUA_RECONNECT_MAX_DELAY_MS": "${ENV_OPCUA_RECONNECT_MAX_DELAY_MS}", "OPCUA_RECONNECT_MAX_RETRY": "${ENV_OPCUA_RECONNECT_MAX_RETRY}", "OPCUA_SESSION_TIMEOUT_MS": "${ENV_OPCUA_SESSION_TIMEOUT_MS}" } } }, "setup": { "fields": [ { "id": "ENV_OPCUA_SERVER_URL", "label": "OPCUA_SERVER_URL", "description": "URL of the OPC UA server to connect to, including any path the server expects. Read once at startup: one process serves one endpoint. Verify who answers with an exact server certificate pin or a configured CA trust store.", "required": true, "secret": false, "default": "opc.tcp://localhost:4840" }, { "id": "ENV_OPCUA_PYTHON_BACKEND", "label": "OPCUA_PYTHON_BACKEND", "description": "Select the Python client implementation. The maintained asyncua client is the default; legacy provides the one-release rollback path for uncovered vendor incompatibilities. This setting affects the Python server only.", "required": false, "secret": false, "default": "asyncua" }, { "id": "ENV_OPCUA_SECURITY_POLICY", "label": "OPCUA_SECURITY_POLICY", "description": "Encryption suite to negotiate for the secure channel. Anything other than None needs a client certificate and key. The two AES suites are Node-only: the Python runtime refuses them at startup rather than downgrading. None is unencrypted and unauthenticated, and keeps control tools blocked unless insecure control is explicitly allowed. An unknown policy stops the server at startup.", "required": false, "secret": false, "default": "None" }, { "id": "ENV_OPCUA_SECURITY_MODE", "label": "OPCUA_SECURITY_MODE", "description": "Message security mode for the secure channel. Sign authenticates messages without encrypting them. A policy with mode None, or a mode without a policy, stops the server at startup; leaving it blank never downgrades a policy to signing only. Leave blank for SignAndEncrypt once a security policy is set, otherwise None.", "required": false, "secret": false, "default": "" }, { "id": "ENV_OPCUA_CLIENT_CERT", "label": "OPCUA_CLIENT_CERT", "description": "Path to the certificate (PEM or DER) this client presents as its application identity. Required by any security policy other than None. A path that does not exist stops the server at startup.", "required": false, "secret": false, "default": "" }, { "id": "ENV_OPCUA_CLIENT_KEY", "label": "OPCUA_CLIENT_KEY", "description": "Path to the private key matching the client certificate. A path, never key material. Whoever can read the file can impersonate this client: keep it readable only by the account running the server. A path that does not exist stops the server at startup.", "required": false, "secret": true, "default": "" }, { "id": "ENV_OPCUA_APPLICATION_URI", "label": "OPCUA_APPLICATION_URI", "description": "Application URI announced to the server. Set it only for a certificate that carries no URI of its own. A configured URI that conflicts with the certificate is refused before connecting. Leave blank for the subjectAltName URI of the client certificate.", "required": false, "secret": false, "default": "" }, { "id": "ENV_OPCUA_SERVER_CERT", "label": "OPCUA_SERVER_CERT", "description": "Path to the OPC UA server's own certificate (PEM or DER), pinned: a server presenting any other certificate cannot complete the handshake. Control tools (writes, method calls, alarm actions) require it, or OPCUA_SERVER_TRUST_STORE instead. Requires a security policy other than None. Unset, encryption protects against eavesdropping but not against an impostor endpoint, so control tools are refused unless OPCUA_SERVER_TRUST_STORE validates the server or OPCUA_ALLOW_UNVERIFIED_SERVER_CONTROL is set. Set without a security policy, it stops the server at startup rather than pinning nothing; a pinned certificate that has expired or is not yet valid refuses to connect.", "required": false, "secret": false, "default": "" }, { "id": "ENV_OPCUA_SERVER_TRUST_STORE", "label": "OPCUA_SERVER_TRUST_STORE", "description": "Directory with trusted/certs root CAs, issuers/certs intermediate CAs, and trusted/crl plus issuers/crl signed current revocation lists. Authenticate the OPC UA peer by its validated chain and expected server URI. Requires secured channel and OPCUA_SERVER_APPLICATION_URI; Python requires the maintained asyncua backend. Missing, stale, forged or revoked trust material refuses connection. Cannot be combined with an exact server certificate pin.", "required": false, "secret": false, "default": "" }, { "id": "ENV_OPCUA_SERVER_APPLICATION_URI", "label": "OPCUA_SERVER_APPLICATION_URI", "description": "ApplicationUri of the intended OPC UA server. Must match the peer certificate URI SAN and advertised application identity. Required with OPCUA_SERVER_TRUST_STORE.", "required": false, "secret": false, "default": "" }, { "id": "ENV_OPCUA_USERNAME", "label": "OPCUA_USERNAME", "description": "OPC UA username. The session is anonymous when unset. Cannot be combined with a user certificate. Requires a password; either one alone stops the server at startup.", "required": false, "secret": false, "default": "" }, { "id": "ENV_OPCUA_PASSWORD", "label": "OPCUA_PASSWORD", "description": "Password for the username. Without a security policy it crosses the network in clear text. Supply it through the client's secret storage, never on a command line.", "required": false, "secret": true, "default": "" }, { "id": "ENV_OPCUA_USER_CERT", "label": "OPCUA_USER_CERT", "description": "Path to the certificate identifying the user, for X.509 user authentication: a different key pair from the client certificate, which secures the channel. Requires the user key and a security policy other than None; cannot be combined with a username. Any of those combinations broken stops the server at startup.", "required": false, "secret": false, "default": "" }, { "id": "ENV_OPCUA_USER_KEY", "label": "OPCUA_USER_KEY", "description": "Path to the private key for the user certificate. It signs the server's challenge and is never sent. Whoever can read the file can log in as this user: keep it readable only by the account running the server.", "required": false, "secret": true, "default": "" }, { "id": "ENV_OPCUA_PROFILE", "label": "OPCUA_PROFILE", "description": "Which tools are offered. observe reads, browses, reads history and monitors; operator adds explicitly allowlisted writes, method calls and alarm actions; full exposes every tool and is meant only for a tightly scoped OPC UA account. Unset fails closed to observe; an unknown profile stops the server at startup.", "required": true, "secret": false, "default": "observe" }, { "id": "ENV_OPCUA_POLICY_FILE", "label": "OPCUA_POLICY_FILE", "description": "Path to a version-1 JSON policy file, the only place per-node value bounds, writable_subtrees, preconditions, the alarm scope and deny_read can be set. Every policy variable that is set overrides what the file says. An unreadable or invalid file stops the server at startup.", "required": false, "secret": false, "default": "" }, { "id": "ENV_OPCUA_ALLOWED_TOOLS", "label": "OPCUA_ALLOWED_TOOLS", "description": "Comma-separated tool allowlist. It can only narrow the selected profile, never widen it. An unknown tool name stops the server at startup.", "required": false, "secret": false, "default": "" }, { "id": "ENV_OPCUA_ALLOWED_WRITE_NODES", "label": "OPCUA_ALLOWED_WRITE_NODES", "description": "Comma-separated exact node IDs the operator profile may write, as ns=2;i=5 or, stable across a server restart, nsu=<namespace-uri>;i=5 or a browse path from the Root folder such as /Objects/Line1/Setpoint. Setting it replaces the policy file's list, bounds included. Empty fails closed: operator can write nothing. A batch write with any target outside the list is refused before it reaches OPC UA.", "required": false, "secret": false, "default": "" }, { "id": "ENV_OPCUA_ALLOWED_METHODS", "label": "OPCUA_ALLOWED_METHODS", "description": "Comma-separated object_node_id|method_node_id pairs the operator profile may call. Either half may be a browse path from the Root folder. Empty fails closed: operator can call nothing. An entry without | stops the server at startup.", "required": false, "secret": false, "default": "" }, { "id": "ENV_OPCUA_ALLOW_ACKNOWLEDGE_ALARMS", "label": "OPCUA_ALLOW_ACKNOWLEDGE_ALARMS", "description": "Let the operator profile act on alarms: acknowledge_alarm and every act_on_alarm action.", "required": false, "secret": false, "default": "false" }, { "id": "ENV_OPCUA_ALLOW_INSECURE_CONTROL", "label": "OPCUA_ALLOW_INSECURE_CONTROL", "description": "Permit control tools on an OPC UA channel with no security policy (None). Does not cov