# Install mqtt with npm

A library for the MQTT protocol. Version 5.15.1 via npm; verified 2026-03-24.

## Install

```sh
sudo av install npm:mqtt
```

Additional install commands:

### Portable and language managers

- npm (100%):

```sh
npm install -g mqtt
```

  Evidence: local npm package metadata

## Package facts

- **Package key:** npm:mqtt
- **Package manager:** npm
- **Package manager page:** <https://www.npmjs.com/package/mqtt>
- **Version:** 5.15.1
- **Source summary:** A library for the MQTT protocol
- **Homepage:** <https://github.com/mqttjs/MQTT.js#readme>
- **Repository:** <https://github.com/mqttjs/MQTT.js>
- **Upstream docs:** <https://github.com/mqttjs/MQTT.js#readme>
- **License:** MIT
- **Source archive:** <https://registry.npmjs.org/mqtt/-/mqtt-5.15.1.tgz>
- **Issue tracker:** <https://github.com/mqttjs/MQTT.js/issues>
- **Published:** 2026-03-24T10:18:04.150Z
- **Last updated:** 2026-03-24T10:18:04.150Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- mqtt (cli)
- mqtt_pub (cli)
- mqtt_sub (cli)
- mqtt (alias)

## Dependencies

- @types/readable-stream
- @types/ws
- commist
- concat-stream
- debug
- help-me
- lru-cache
- minimist
- mqtt-packet
- number-allocator
- readable-stream
- rfdc
- socks
- split2
- worker-timers
- ws

## Build dependencies

- @eslint/eslintrc
- @eslint/js
- @esm-bundle/chai
- @release-it/conventional-changelog
- @tsconfig/node20
- @types/chai
- @types/node
- @types/sinon
- @types/tape
- @typescript-eslint/eslint-plugin
- @typescript-eslint/parser
- @web/test-runner
- @web/test-runner-playwright
- aedes-cli
- chai
- chokidar
- conventional-changelog-cli
- end-of-stream
- esbuild
- esbuild-plugin-polyfill-node
- esbuild-register
- eslint
- eslint-config-prettier
- eslint-plugin-import
- eslint-plugin-prettier
- global
- globals
- leaked-handles
- mkdirp
- mqtt-connection
- mqtt-level-store
- nyc
- pre-commit
- prettier
- release-it
- rimraf
- should
- sinon
- snazzy
- tape
- ts-node
- typescript

## Install behavior

- Post-install hook: not defined
- Lifecycle scripts: prepare
- Bottle: not available

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 5.15.1
- Package-manager updated: 2026-03-24
- Local data: ok
- Upstream repository: https://github.com/mqttjs/MQTT.js
- info: No cached GitHub release or tag data was available.

## Security Notes

No matching local secret-handling manifest was found for mqtt. Nucleus package metadata is still published here so future coverage has a stable package URL.


## Source Database Details

- **Source Database:** npm registry
- **Dist Tags:** Beta: 5.0.0-beta.4, Latest: 5.15.1, Next: 1.0.0-pre.6, Security Patch: 2.18.9, V4 Backport: 4.3.8
- **Version Count:** 217
- **Maintainers:** matteo.collina, adamvr, roberts_lando, avishekpant-msft
- **Publisher:** GitHub Actions
- **Engines:** Node: >=16.0.0
- **Integrity:** sha512-V1WnkGuJh3ec9QXzy5Iylw8OOBK+Xu1WhxcQ9mMpLThG+/JZIMV1PgLNRgIiqXhZnvnVLsuyxHl5A/3bHHbcAA==
- **Shasum:** 9a51515c4d327193d0314bc44e614b37f2f902d5
- **Unpacked Size:** 1,957,515
- **File Count:** 0
- **Created At:** 2013-02-12T15:27:29.643Z
- **Latest Published At:** 2026-03-24T10:18:04.150Z
- **Modified At:** 2026-03-24T10:18:04.428Z


## Related links

- [Package publisher tools](https://www.automicvault.com/pkg/package-publishers/) - Matched curated package taxonomy and local package facts.
- [bittorrent-tracker](https://www.automicvault.com/pkg/npm/bittorrent-tracker/) - Local package facts share a topical domain. Shared terms: debug, lru, minimist, socks, stream.
- [0x](https://www.automicvault.com/pkg/npm/0x/) - Local package facts share a topical domain. Shared terms: concat, concat-stream, debug, minimist, stream.
- [faucet](https://www.automicvault.com/pkg/npm/faucet/) - Local package facts share a topical domain. Shared terms: minimist, protocol, readable, readable-stream, stream.

## Sources

- Nucleus package database
- package-page enrichment
- package version freshness
- package relationship graph
- cross-ecosystem install command graph
