# node-opcua-client

> pure nodejs OPCUA SDK - module client

Latest version **2.187.23** (published 2026-11-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install node-opcua-client
pnpm add node-opcua-client
yarn add node-opcua-client
bun add node-opcua-client
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.187.23 |
| Published | 2026-11-06 |
| First published | 2017-09-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=22.13.0 |
| Dependencies | 44 |
| Unpacked size | 1.4 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 1664 |
| Author | Etienne Rossignon |
| Maintainers | erossignon |
| Keywords | OPCUA, opcua, m2m, iot, opc ua, internet of things |

## Links

- npm: https://www.npmjs.com/package/node-opcua-client
- Repository: https://github.com/node-opcua/node-opcua
- Homepage: http://node-opcua.github.io/
- Issues: https://github.com/node-opcua/node-opcua/issues
- npm.io page: https://npm.io/package/node-opcua-client

## Dependencies (44)

- [chalk](https://npm.io/package/chalk.md) 6.0.1
- [thenify-ex](https://npm.io/package/thenify-ex.md) 4.4.0
- [node-opcua-pki](https://npm.io/package/node-opcua-pki.md) 7.1.4
- [node-opcua-debug](https://npm.io/package/node-opcua-debug.md) 2.186.7
- [node-opcua-types](https://npm.io/package/node-opcua-types.md) 2.187.19
- [node-opcua-utils](https://npm.io/package/node-opcua-utils.md) 2.187.0
- [node-opcua-assert](https://npm.io/package/node-opcua-assert.md) 2.186.7
- [node-opcua-common](https://npm.io/package/node-opcua-common.md) 2.187.19
- [node-opcua-crypto](https://npm.io/package/node-opcua-crypto.md) 6.2.3
- [node-opcua-nodeid](https://npm.io/package/node-opcua-nodeid.md) 2.187.0
- [node-opcua-schemas](https://npm.io/package/node-opcua-schemas.md) 2.187.19
- [node-opcua-variant](https://npm.io/package/node-opcua-variant.md) 2.187.19
- [@ster5/global-mutex](https://npm.io/package/@ster5/global-mutex.md) ^3.3.0
- [node-opcua-hostname](https://npm.io/package/node-opcua-hostname.md) 2.187.6
- [node-opcua-constants](https://npm.io/package/node-opcua-constants.md) 2.185.0
- [node-opcua-date-time](https://npm.io/package/node-opcua-date-time.md) 2.187.0
- [node-opcua-transport](https://npm.io/package/node-opcua-transport.md) 2.187.19
- [node-opcua-data-model](https://npm.io/package/node-opcua-data-model.md) 2.187.0
- [node-opcua-data-value](https://npm.io/package/node-opcua-data-value.md) 2.187.19
- [node-opcua-basic-types](https://npm.io/package/node-opcua-basic-types.md) 2.187.0
- [node-opcua-status-code](https://npm.io/package/node-opcua-status-code.md) 2.187.0
- [node-opcua-buffer-utils](https://npm.io/package/node-opcua-buffer-utils.md) 2.187.0
- [node-opcua-service-call](https://npm.io/package/node-opcua-service-call.md) 2.187.19
- [node-opcua-service-read](https://npm.io/package/node-opcua-service-read.md) 2.187.19
- [node-opcua-numeric-range](https://npm.io/package/node-opcua-numeric-range.md) 2.187.0
- [node-opcua-service-query](https://npm.io/package/node-opcua-service-query.md) 2.187.19
- [node-opcua-service-write](https://npm.io/package/node-opcua-service-write.md) 2.187.19
- [node-opcua-pseudo-session](https://npm.io/package/node-opcua-pseudo-session.md) 2.187.23
- [node-opcua-secure-channel](https://npm.io/package/node-opcua-secure-channel.md) 2.187.23
- [node-opcua-service-browse](https://npm.io/package/node-opcua-service-browse.md) 2.187.19
- [node-opcua-service-filter](https://npm.io/package/node-opcua-service-filter.md) 2.187.20
- [node-opcua-alarm-condition](https://npm.io/package/node-opcua-alarm-condition.md) 2.187.23
- [node-opcua-object-registry](https://npm.io/package/node-opcua-object-registry.md) 2.186.7
- [node-opcua-service-history](https://npm.io/package/node-opcua-service-history.md) 2.187.19
- [node-opcua-service-session](https://npm.io/package/node-opcua-service-session.md) 2.187.19
- [node-opcua-extension-object](https://npm.io/package/node-opcua-extension-object.md) 2.187.0
- [node-opcua-service-discovery](https://npm.io/package/node-opcua-service-discovery.md) 2.187.19
- [node-opcua-service-endpoints](https://npm.io/package/node-opcua-service-endpoints.md) 2.187.19
- [node-opcua-certificate-manager](https://npm.io/package/node-opcua-certificate-manager.md) 2.187.23
- [node-opcua-service-subscription](https://npm.io/package/node-opcua-service-subscription.md) 2.187.23
- [node-opcua-service-register-node](https://npm.io/package/node-opcua-service-register-node.md) 2.187.19
- [node-opcua-service-secure-channel](https://npm.io/package/node-opcua-service-secure-channel.md) 2.187.19
- [node-opcua-service-translate-browse-path](https://npm.io/package/node-opcua-service-translate-browse-path.md) 2.187.19
- [node-opcua-client-dynamic-extension-object](https://npm.io/package/node-opcua-client-dynamic-extension-object.md) 2.187.23

## Recent versions

- 2.187.23 (latest) — 2026-11-06
- 2.113.2 (patch) — 2023-12-23
- 2.67.1 (v2.67) — 2022-05-21
- 2.187.21 — 2026-11-03
- 2.187.20 — 2026-11-03
- 2.187.19 — 2026-11-01
- 2.187.18 — 2026-10-29
- 2.187.17 — 2026-10-28
- 2.187.16 — 2026-10-25
- 2.187.12 — 2026-10-21
- 2.187.11 — 2026-10-21
- 2.187.9 — 2026-10-15
- 2.187.8 — 2026-10-14
- 2.187.7 — 2026-10-13
- 2.187.6 — 2026-10-13
- … 370 more at https://npm.io/package/node-opcua-client/versions

## README

# node-opcua-client

[![NPM version](https://img.shields.io/npm/v/node-opcua-client)](https://www.npmjs.com/package/node-opcua-client)
[![NPM downloads](https://img.shields.io/npm/dm/node-opcua-client.svg)](https://www.npmjs.com/package/node-opcua-client)
[![CI](https://github.com/node-opcua/node-opcua/actions/workflows/workflow.yml/badge.svg)](https://github.com/node-opcua/node-opcua/actions/workflows/workflow.yml)

**Lightweight OPC UA client for Node.js** — connect to any OPC UA server, browse, read, write, and subscribe to data changes.

Part of the [node-opcua](https://github.com/node-opcua/node-opcua) project — the most popular OPC UA stack for Node.js.

## When to use this package

| Package | Use case |
|---|---|
| **`node-opcua-client`** | You only need **client** capabilities (smaller install, faster startup) |
| **`node-opcua`** | You need **both** client and server in the same project |

## Quick Start

```bash
npm install node-opcua-client
```

> **Requires Node.js 20 or later.**

### Connect, read, and disconnect

```typescript
import {
  OPCUAClient,
  AttributeIds,
  DataValue,
} from "node-opcua-client";

(async () => {
  // 1. Create a client and connect to an OPC UA server
  const client = OPCUAClient.create({ endpointMustExist: false });
  await client.connect("opc.tcp://opcuademo.sterfive.com:26543");

  // 2. Create a session
  const session = await client.createSession();

  // 3. Read the server's current time (ns=0;i=2258)
  const dataValue: DataValue = await session.read({
    nodeId: "ns=0;i=2258",
    attributeId: AttributeIds.Value,
  });
  console.log("Server time:", dataValue.value.value);

  // 4. Clean up
  await session.close();
  await client.disconnect();
})();
```

## 📖 Documentation

- 📘 [**NodeOPCUA by Example**](https://leanpub.com/node-opcuabyexample-edition2024) — The best starting point: practical, ready-to-use examples with full explanations.
- 📚 [**API Reference**](https://node-opcua.github.io/api_doc/index.html) — Complete API documentation.
- 🛠️ [**Client Tutorial**](https://github.com/node-opcua/node-opcua/blob/master/documentation/creating_a_client_typescript.md) — Step-by-step guide to building an OPC UA client in TypeScript.

## 🏢 Professional Support

| Feature | Community (GitHub) | Professional ([Sterfive](https://support.sterfive.com)) |
|---|:---:|:---:|
| Bug reports via GitHub Issues | ✅ | ✅ |
| CVE security advisories | After disclosure | **Early access — patch before public disclosure** |
| Priority response time | — | ✅ |
| Private support channel | — | ✅ |
| Architecture & code review | — | ✅ |
| Dedicated consulting hours | — | ✅ |
| Certifiable version | — | ✅ |

[![Professional Support](https://img.shields.io/static/v1?style=for-the-badge&label=Professional&message=Support&labelColor=blue&color=green&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMC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LDEyLjY1MS0yNy40NTMsMjEuNDk4ICAgIGwxMTEuOTQ1LDExMS43ODVjMC4wNjEtMC4wNiwwLjExMS0wLjExMywwLjE3Mi0wLjE3NGM3LjIzOC03LjIyOCwxNS4zNTUtMTQuODg1LDIzLjI5MS0yMi4xNjcgICAgQzE5OC41MzQsMTA4LjcxMywxOTguNjg0LDEwMC44NjMsMTkzLjg1NCw5Ni4wNDF6Ii8+DQoJPC9nPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPC9zdmc+)](https://support.sterfive.com)

📧 Contact: [contact@sterfive.com](mailto:contact@sterfive.com)

## :heart: Sponsors

If you find this package valuable, please consider supporting the project:

- [**Become a sponsor on GitHub**](https://github.com/sponsors/node-opcua)

Your sponsorship ensures long-term maintenance, new features, and continued OPC Foundation representation.

## License

MIT — Copyright © 2014-2026 [Etienne Rossignon](https://github.com/erossignon) / [Sterfive SAS](https://www.sterfive.com)

---
_Source: https://npm.io/package/node-opcua-client · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
