# Install mqtt with npm

A library for the MQTT protocol. Version 5.15.2 via npm; verified 2026-07-06.

## 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.2
- **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.2.tgz>
- **Issue tracker:** <https://github.com/mqttjs/MQTT.js/issues>
- **Published:** 2026-07-06T06:48:52.860Z
- **Last updated:** 2026-07-06T06:48:52.860Z
- **Generated:** 2026-08-04T22:13:35+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-08-04
- Package-manager version: 5.15.2
- Package-manager updated: 2026-07-06
- 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. 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.2, Next: 1.0.0-pre.6, Security Patch: 2.18.9, V4 Backport: 4.3.8
- **Version Count:** 218
- **Maintainers:** matteo.collina, adamvr, roberts_lando, avishekpant-msft
- **Publisher:** GitHub Actions
- **Engines:** Node: >=16.0.0
- **Integrity:** sha512-VWZU2CSUY3U3oN0PSBRDE5SNsFi4zqqNeQ/uv3pZWqY3CrBXD/dhd0ZLjlsk5YnebGlrapi4lRVNJPUNQ5aZ3w==
- **Shasum:** d32b2009d9dc41060dff2b708b1c9bbf51e83755
- **Unpacked Size:** 1,959,810
- **File Count:** 0
- **Created At:** 2013-02-12T15:27:29.643Z
- **Latest Published At:** 2026-07-06T06:48:52.860Z
- **Modified At:** 2026-07-06T06:48:53.145Z


## Related links

- [Networking and protocol packages](https://pkg.so/networking-protocol-tools/) - Matched curated package taxonomy and local package facts.
- [bittorrent-tracker](https://pkg.so/npm/bittorrent-tracker/) - Local package facts share a topical domain. Shared terms: cli, debug, lru, minimist, networking.
- [utp-native](https://pkg.so/npm/utp-native/) - Local package facts share a topical domain. Shared terms: cli, networking, protocols, readable, readable-stream.
- [libcoap](https://pkg.so/brew/libcoap/) - Local package facts share a topical domain. Shared terms: cli, iot, networking, protocol, protocols.

## Sources

- pkg.so package database
- package-page enrichment
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- cross-ecosystem install command graph
