{"server":{"$schema":"https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json","name":"io.github.midhunxavier/opcua","description":"Connect AI assistants to industrial OPC UA: browse, read, history, subscriptions, events and alarms.","title":"OPC UA MCP Server","repository":{"url":"https://github.com/IndustriAgents/OPCUA-MCP","source":"github"},"version":"0.6.0","websiteUrl":"https://industriagents.com/connect/opcua","packages":[{"registryType":"npm","identifier":"opcua-mcp-server","version":"0.6.0","runtimeHint":"npx","transport":{"type":"stdio"},"environmentVariables":[{"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.","isRequired":true,"format":"string","default":"opc.tcp://localhost:4840","placeholder":"opc.tcp://192.168.0.10:4840","name":"OPCUA_SERVER_URL"},{"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.","format":"string","default":"asyncua","choices":["asyncua","legacy"],"name":"OPCUA_PYTHON_BACKEND"},{"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.","format":"string","default":"None","placeholder":"Basic256Sha256","choices":["None","Basic128Rsa15","Basic256","Basic256Sha256","Aes128_Sha256_RsaOaep","Aes256_Sha256_RsaPss"],"name":"OPCUA_SECURITY_POLICY"},{"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.","format":"string","choices":["None","Sign","SignAndEncrypt"],"name":"OPCUA_SECURITY_MODE"},{"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.","format":"filepath","placeholder":"/etc/opcua/client.pem","name":"OPCUA_CLIENT_CERT"},{"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.","format":"filepath","isSecret":true,"name":"OPCUA_CLIENT_KEY"},{"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.","format":"string","placeholder":"urn:plant-a:opcua-mcp","name":"OPCUA_APPLICATION_URI"},{"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.","format":"filepath","placeholder":"/etc/opcua/server.pem","name":"OPCUA_SERVER_CERT"},{"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.","format":"filepath","placeholder":"/etc/opcua/trust","name":"OPCUA_SERVER_TRUST_STORE"},{"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.","format":"string","placeholder":"urn:factory:line1:server","name":"OPCUA_SERVER_APPLICATION_URI"},{"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.","format":"string","name":"OPCUA_USERNAME"},{"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.","format":"string","isSecret":true,"name":"OPCUA_PASSWORD"},{"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.","format":"filepath","placeholder":"/etc/opcua/user.pem","name":"OPCUA_USER_CERT"},{"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.","format":"filepath","isSecret":true,"name":"OPCUA_USER_KEY"},{"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.","isRequired":true,"format":"string","default":"observe","choices":["observe","operator","full"],"name":"OPCUA_PROFILE"},{"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.","format":"filepath","placeholder":"/etc/opcua/policy.json","name":"OPCUA_POLICY_FILE"},{"description":"Comma-separated tool allowlist. It can only narrow the selected profile, never widen it. An unknown tool name stops the server at startup.","format":"string","placeholder":"read_opcua_nodes,browse_opcua_nodes","name":"OPCUA_ALLOWED_TOOLS"},{"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.","format":"string","placeholder":"nsu=urn:plant-a:line-1;s=Mixer.Setpoint","name":"OPCUA_ALLOWED_WRITE_NODES"},{"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.","format":"string","placeholder":"ns=2;i=20|ns=2;i=31","name":"OPCUA_ALLOWED_METHODS"},{"description":"Let the operator profile act on alarms: acknowledge_alarm and every act_on_alarm action.","format":"boolean","default":"false","name":"OPCUA_ALLOW_ACKNOWLEDGE_ALARMS"},{"description":"Permit control tools on an OPC UA channel with no security policy (None). Does not cover a secured channel to an unverified server; that is OPCUA_ALLOW_UNVERIFIED_SERVER_CONTROL. Fail-open override: writes, method calls and alarm actions then travel unauthenticated and unencrypted. Reported as control=INSECURE-OVERRIDE in the startup line, get_server_status and every audit record. Never enable it against production equipment.","format":"boolean","default":"false","name":"OPCUA_ALLOW_INSECURE_CONTROL"},{"description":"Permit control tools on a secured OPC UA channel whose server is not authenticated: neither pinned with OPCUA_SERVER_CERT nor validated by OPCUA_SERVER_TRUST_STORE. Does not cover a channel with no security policy; that is OPCUA_ALLOW_INSECURE_CONTROL. Fail-open override: writes, method calls and alarm actions are then encrypted to whichever server answered the endpoint, which may be an impostor. Reported as control=UNVERIFIED-OVERRIDE in the startup line, get_server_status and every audit record. Never enable it against production equipment.","format":"boolean","default":"false","name":"OPCUA_ALLOW_UNVERIFIED_SERVER_CONTROL"},{"description":"Allow a write outside the EURange the OPC UA server itself published for the node. A published InstrumentRange still applies. Fail-open override: it discards the only value bound a deployment with no policy file has.","format":"boolean","default":"false","name":"OPCUA_ALLOW_OUT_OF_RANGE_WRITES"},{"description":"Path to an append-only file for the control audit trail, one JSON object per line, written beside stderr. Created owner-only (0600) if it does not exist; reopened when rotated away. A file that cannot be opened, or that is a symlink, not a regular file, another account's, or group/world-writable, stops the server rather than falling back to stderr alone. While set, a control call whose record cannot be written is refused (fail closed); reads continue.","format":"filepath","placeholder":"/var/log/opcua-mcp/audit.jsonl","name":"OPCUA_AUDIT_FILE"},{"description":"When an audit-file record counts as written. always fsyncs each record before the control call proceeds, so it survives a power loss; none leaves it to the operating system, so it survives only a crash of this process. none can lose the records of control calls that already reached the plant if the machine loses power.","format":"string","default":"always","choices":["always","none"],"name":"OPCUA_AUDIT_FSYNC"},{"description":"Adds seq, prev_hash and hash to every audit record so edits, deletions and reordering can be detected with --verify-audit. sha256 catches accidental or naive edits; hmac-sha256 also resists anyone without the key. Requires the audit file. Set without an audit file, or hmac-sha256 without a key file, stops the server. No chain detects a truncated tail.","format":"string","default":"none","choices":["none","sha256","hmac-sha256"],"name":"OPCUA_AUDIT_CHAIN"},{"description":"Path to the HMAC key for the hmac-sha256 audit chain: at least 32 bytes, for example from openssl rand -hex 32. Surrounding whitespace is ignored. Whoever can read the key can forge the chain: a key readable or writable by group or others stops the server. Refused unless the chain is hmac-sha256.","format":"filepath","isSecret":true,"name":"OPCUA_AUDIT_CHAIN_KEY_FILE"},{"description":"Label stamped on every audit record as operator_label, so a shipped log says which deployment a control call came from. Configured, never verified: it is not an identity, and mcp_principal stays null.","format":"string","placeholder":"plant-a-line-1","name":"OPCUA_OPERATOR_ID"},{"description":"Wait before the first attempt to repair a dropped or refused connection, in milliseconds. It doubles with each further attempt.","format":"number","default":"1000","name":"OPCUA_RECONNECT_INITIAL_DELAY_MS"},{"description":"Ceiling for the doubling retry delay, in milliseconds.","format":"number","default":"8000","name":"OPCUA_RECONNECT_MAX_DELAY_MS"},{"description":"Retries after the first attempt, per connection round, before a tool call gives up: a whole number from -1 to 1000. 0 never retries; -1 never stops trying, in bounded rounds of four retries so no single call waits forever.","format":"number","default":"3","name":"OPCUA_RECONNECT_MAX_RETRY"},{"description":"Session lifetime asked of the OPC UA server, in milliseconds. It also sets the keep-alive period, so it decides how quickly an idle connection notices the server has gone.","format":"number","default":"60000","name":"OPCUA_SESSION_TIMEOUT_MS"}]}],"_meta":{"io.modelcontextprotocol.registry/publisher-provided":{"generated":"packages[].environmentVariables are generated from contract/config.json by packages/server-node/scripts/config-artifacts.mjs, and the version is stamped from packages/server-node/package.json. Edit those and run `npm run config:generate` in packages/server-node; CI fails if they drift."}}},"_meta":{"io.modelcontextprotocol.registry/official":{"status":"active","statusChangedAt":"2026-11-05T10:17:31.102432Z","publishedAt":"2026-11-05T10:17:31.102432Z","updatedAt":"2026-11-05T10:17:31.102432Z","isLatest":true}}}
