# MQTT.js

> MIT Node + browser MQTT client — needs a broker

**Category:** Libraries  
**Pricing:** open-source  
**URL:** https://github.com/mqttjs/MQTT.js  
**GitHub:** https://github.com/mqttjs/MQTT.js  
**Added:** 2026-09-10

---

## The Hook

MQTT.js is the Node + browser MQTT *client* when Mosquitto is the broker you still have to run.

## What's Good

MIT. mqttjs/MQTT.js (npm `mqtt`). Connect, publish, subscribe with QoS and MQTT 5 paths. Works in Node and browsers; CLI helpers ship with the package. Same “library needs a server” shape as matrix-js-sdk — pair with Mosquitto or any MQTT broker.

## The Catch

Client library only — not a broker (that is Mosquitto/HiveMQ/etc.). Browser is MQTT-over-WebSockets only (no raw MQTT TCP from the page). You still provide a reachable broker, credentials, and topic design. Distinct from Mosquitto.

## Verdict

MIT MQTT client. Free library; bring a broker — browsers speak WebSockets.
