The most complete OPC UA stack for Node.js — build industrial-grade OPC UA servers and clients in TypeScript.
Requirements: Node.js 20 or later
npm install node-opcua
import { OPCUAServer, DataType, Variant } from "node-opcua";
const server = new OPCUAServer({ port: 4840 });
await server.initialize();
const addressSpace = server.engine.addressSpace!;
const namespace = addressSpace.getOwnNamespace();
namespace.addVariable({
browseName: "Temperature",
componentOf: addressSpace.rootFolder.objects,
dataType: DataType.Double,
value: { get: () => new Variant({ dataType: DataType.Double, value: 22.5 }) },
});
await server.start();
console.log("Server started at", server.getEndpointUrl());
import { OPCUAClient, AttributeIds } from "node-opcua";
const client = OPCUAClient.create({ endpointMustExist: false });
await client.connect("opc.tcp://localhost:4840");
const session = await client.createSession();
const value = await session.read({ nodeId: "ns=1;s=Temperature", attributeId: AttributeIds.Value });
console.log("Temperature =", value.value.value);
await session.close();
await client.disconnect();
| Community (MIT) | Professional | |
|---|---|---|
| Full documentation | ✅ | ✅ + extended docs |
| Bug fixes | Best effort | Priority SLA |
| CVE security advisories | After disclosure | Early access — patch before public disclosure |
| Certifiable version | — | ✅ |
| Dedicated consulting | — | ✅ |
| Custom development | — | ✅ |
Or contact Sterfive for dedicated consulting and enterprise needs.
Source-available companion modules available to NodeOPCUA subscription members (additional fee):
| Module | Description |
|---|---|
| node-opcua-pub-sub | OPC UA PubSub over MQTT (Part 14) — Industry 4.0 ready |
| aggregator | Combine and monitor hundreds of servers and millions of variables |
| node-opcua-optimized-client | High-performance OPC UA client for demanding workloads |
| node-opcua-gds | Global Discovery Server — certificate lifecycle at scale (Part 12) |
| node-opcua-modeler-ex | Programmatic OPC UA modeler |
👉 Visit support.sterfive.com for access and pricing.
node-opcua-modeler-mcp-server — an MCP server that gives AI agents access to the OPC UA companion specification type system. Discover types, resolve namespace dependencies, and look up engineering units.
npx node-opcua-modeler-mcp-server
OPC UA Modeler — create, validate, and generate OPC UA information models using a YAML-first workflow with full companion spec support.
If you rely on node-opcua in production, please consider sponsoring the project. Your support funds long-term maintenance, new features, and representation at the OPC Foundation.
MIT — Copyright (c) 2014-2026 Etienne Rossignon / Sterfive SAS
See LICENSE for details.