# mqttjs/MQTT.js

The MQTT client for Node.js and the browser

Repository: https://github.com/mqttjs/MQTT.js
Canonical: https://ross.abutalabs.com/products/mqttjs
Language: TypeScript
License: NOASSERTION
License Family: other
Topics: mqtt, javascript, nodejs-library, mqtt-broker, hacktoberfest
Last push: 2026-07-20T09:30:04+00:00

## Health v2 (maintenance only)
Score: 94/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 93, release rhythm 92, longevity 100
- inputs: {"age_days": 5630, "days_push": 44, "days_rel": 58, "gap_med": 25, "n_releases_24m": 16}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 9110, forks 1446 (observed 2026-08-28T04:10:28.456602+00:00)

## What it is
MQTT.js is a client library for the MQTT publish/subscribe messaging protocol, written in TypeScript for Node.js and the browser. It supports MQTT 5, QoS levels, TLS, reconnection, and includes command-line tools for publishing and subscribing.

## Use cases
- connect to an mqtt broker from node.js
- publish and subscribe to mqtt topics in the browser
- build iot device messaging in javascript
- send sensor data over mqtt from a react native app
- test mqtt brokers from the command line
- implement pub/sub communication between services

## When to choose
- you need an MQTT client in JavaScript or TypeScript
- you want browser or Node.js support for MQTT pub/sub
- you need MQTT 5 protocol features with QoS and TLS

## When to avoid
- you need an MQTT broker/server rather than a client
- you are working outside the JavaScript ecosystem

## Facets
- artifact type: library
- maturity: active
- function: http-client, websocket, cli
- domain: iot, web-development, developer-tools
- platform: browser, cross-platform, cli
- tags: mqtt, mqtt-client, pubsub, iot-protocols, typescript, react-native, messaging, nodejs

## Member repositories
- mqttjs/MQTT.js (main) score 94

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:28.456602+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:23:26.854857+00:00, confidence not recorded.
  - readme: https://github.com/mqttjs/MQTT.js (fetched 2026-08-28T04:10:28.456602+00:00, sha f9c731ea35ca)
- Data as of 2026-08-30T08:39:29.467469+00:00.
