Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

MQTTX CLI

$ mqttx Official Med Risk
EMQX · Database & Data · Apache-2.0 · macos / linux / windows

Developed by EMQX, MQTTX CLI (mqttx) unifies MQTT connection testing (mqttx conn), publishing (mqttx pub), subscribing (mqttx sub), and load benchmarking (mqttx bench) in one tool. Supports MQTT 5.0 properties (--content-type application/json) and --save-options / --load-options JSON configs.

FCRS-1.0 Score
81 /100
Good
Medium Confidence
Zero-Friction Install
brew install emqx/mqttx/mqttx-cli
CLI vs MCP Decision CLI Preferred vs MCP

mqttx runs live broker connection checks, payload publishes, and connection benchmarks locally without needing an MCP server.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 20 / 25

Supports JSON/YAML --load-options profiles, --format json payload decoding, and MQTT 5.0 flags, though sub and conn keep running until terminated.

  • Supports --load-options JSON profiles and MQTT 5.0 payload indicators
  • mqttx sub and mqttx conn remain open until SIGINT/timeout
Trust & Safety 20 / 25

Supports TLS/mTLS and reusable profile files (--load-options) to avoid inline passwords, while mqttx bench can flood brokers if misconfigured.

  • Profile files prevent repeated CLI password exposure
  • mqttx bench generates high load if run against prod
Setup & Portability 13 / 15

Installable via Homebrew tap, npm install -g mqttx-cli, Docker, and standalone binaries across macOS, Linux, and Windows.

  • Available via brew, npm, and prebuilt releases
Utility & Efficiency 13 / 15

Combines conn, pub, sub, and bench (plus WebSocket/MQTT 5.0 support) in a single CLI.

  • Replaces separate pub/sub/load-test MQTT tools
Maintenance & Lineage 8 / 10

Actively maintained by EMQX (emqx/MQTTX) under Apache-2.0 license.

  • Official emqx/MQTTX repository under Apache-2.0
Docs & Verifiability 7 / 10

Good CLI docs and examples at mqttx.app/docs/cli/.

  • CLI getting-started and command docs at mqttx.app

Security, Auth & Guardrails

Auth Modes
No Auth Env API Key Config File
Credential Storage

Accepts -u/-P and TLS flags on CLI or loads reusable connection JSON/YAML profiles via --load-options <file>.

Side Effects
Read-Only Local Write Remote Write
Cost & Quotas

Apache-2.0 open-source CLI; completely free.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# MQTTX CLI Agent Rules
- Wrap `mqttx sub` and `mqttx conn` with an external timeout in headless shells because they stay connected until interrupted.
- Never run `mqttx bench` against shared or production brokers without explicit user approval.

Agent-Ready Command Recipes

Safe Read-Only Queries

Test MQTT broker connectivity and auth
mqttx conn -h broker.emqx.io -p 1883 -V 5.0

Verifies MQTT 5.0 handshake and broker reachability.

Controlled Writes & Previews

Publish a JSON payload with MQTT 5.0 content-type
mqttx pub -t 'sensors/temp' -h broker.emqx.io -p 1883 -m '{"c":23.4}' --payload-format-indicator --content-type application/json

Sends a structured JSON message tagged with MQTT 5.0 metadata.

Strengths for Agents

  • + Full MQTT 5.0 support including --content-type, user properties, and WebSocket transport.
  • + --save-options / --load-options store repeatable test configs in JSON/YAML.
  • + Built-in mqttx bench covers connection and throughput stress testing.

Caveats & Pitfalls

  • ! mqttx conn and mqttx sub stay open indefinitely without an external process timeout.
  • ! Careless mqttx bench concurrency (-c) can overwhelm shared brokers.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI