VOLTRUS Blog
← All Posts

MQTT Broker on macOS: Run One Without Homebrew or Terminal

You just built an ESP32 sensor that publishes temperature readings over MQTT. Now you need to verify the messages are actually being sent. You need a broker to receive them and a client to see what arrives. On macOS, this simple task is surprisingly painful.

The standard answer is "install mosquitto via Homebrew." That means opening Terminal, installing a package manager, running three commands, and then using another CLI tool to subscribe and see your messages. No GUI. No topic tree. No way to visually browse what your device is publishing. There has to be a better way.

Current MQTT Options on macOS

If you search for "MQTT client macOS" or "MQTT broker macOS," here is what you find:

mosquitto (CLI)

The Eclipse Mosquitto broker is the de facto standard for local MQTT testing. On macOS, you install it via Homebrew: brew install mosquitto. Then you start the broker with mosquitto (or as a service). To subscribe to a topic: mosquitto_sub -h localhost -t "sensor/#". To publish: mosquitto_pub -h localhost -t "sensor/temp" -m "23.5".

  • It works reliably. Mosquitto is battle-tested.
  • No GUI. You live in Terminal. If your device publishes to 15 different topics, you need 15 terminal windows or wildcards.
  • No topic tree visualization. You cannot browse your device's topic hierarchy. You have to know the topics in advance or subscribe to # and sort through raw output.
  • No message history. Once a message scrolls off your terminal, it is gone unless you redirect output to a file.
  • Requires Homebrew. Not a big deal for developers, but unnecessary if you just want to test a device quickly.

MQTTX (Electron)

MQTTX by EMQX is a cross-platform MQTT client built on Electron. It provides a graphical interface for connecting to brokers, publishing messages, and subscribing to topics. It is the most popular GUI MQTT client.

  • Has a GUI with connection management and message display.
  • Electron-based. It runs Chromium under the hood. Expect 200-400MB RAM usage for what is essentially a text protocol tool.
  • No built-in broker. MQTTX is a client only. You still need mosquitto or another broker running separately.
  • Feature-rich but heavy for quick testing.

MQTT Explorer (Electron)

MQTT Explorer offers a topic tree visualization that shows your MQTT topic hierarchy. It is useful for understanding what topics a device publishes to.

  • Topic tree view is genuinely helpful for device debugging.
  • Gatekeeper blocks it. On recent macOS versions, MQTT Explorer is frequently blocked by Gatekeeper because it is not signed with an Apple Developer certificate. You have to manually bypass security settings to run it.
  • Electron-based. Same resource overhead as MQTTX.
  • Development has slowed. Last meaningful update was over a year ago.

Node-RED

Node-RED is a flow-based programming tool that includes MQTT nodes. You can wire up publish and subscribe nodes in a visual editor. It works for MQTT testing but is massive overkill if you just want to see what your ESP32 is sending.

  • Requires Node.js installation.
  • Designed for building flows, not quick MQTT debugging.
  • Browser-based UI that runs a local server.

HiveMQ Community Edition

HiveMQ CE is a Java-based MQTT broker. It is enterprise-grade and supports MQTT 5.0. For local testing on macOS, it requires a Java runtime and is designed for production deployments, not quick device debugging.

Why No Native macOS MQTT Tool Exists

The pattern is clear: every MQTT tool on macOS is either a CLI (mosquitto), an Electron app (MQTTX, MQTT Explorer), a browser-based tool (Node-RED), or a Java application (HiveMQ CE). None of these are native macOS applications. Contrast this with macOS serial terminal tools, which have native AppKit options available. They do not use AppKit or SwiftUI. They do not integrate with macOS-native features like the menu bar, system notifications, or native window management.

The reason is economic. MQTT is used primarily by embedded developers, IoT engineers, and industrial system integrators. That audience is smaller than general web developers. Building a native macOS app for this niche requires significant investment with a limited addressable market. The open-source community has filled the gap with cross-platform Electron apps because they are cheaper to build and maintain.

But Electron apps on macOS have real downsides: high memory usage, inconsistent keyboard shortcuts, Gatekeeper signing issues, and UI behavior that does not match native macOS conventions. For a tool you use daily during device development, these friction points add up.

What Makes a Good MQTT Testing Tool

If you are developing IoT devices, debugging MQTT communication, or testing gateway firmware, you need these capabilities in a single tool:

  • Built-in broker. Start a local MQTT broker with one click. No separate installation. No Terminal commands. Your devices connect to your Mac directly.
  • Topic tree browser. See the full hierarchy of topics your device publishes to. When your ESP32 publishes to home/sensor/temperature, home/sensor/humidity, and home/status/uptime, you should see all three organized in a tree, not as flat lines in a terminal.
  • Message history. Review past messages on any topic. When debugging intermittent issues, you need to compare current and previous payloads.
  • Publish and subscribe. Both in the same tool. Subscribe to see what your device sends. Publish to simulate commands your device should receive.
  • MQTT 5.0 support. Modern devices increasingly use MQTT 5.0 features like shared subscriptions, message expiry, and reason codes. Your tool should handle both MQTT 3.1.1 and 5.0.
  • TLS support. Test secure connections locally before deploying to production brokers that require TLS.

MacTools MQTT Client Walkthrough

MacTools MQTT Client provides all of the above in a native macOS application. Here is how a typical debugging session works:

Starting the Broker

Open MacTools and navigate to the MQTT section. Click "Start Broker." The built-in MQTT broker starts listening on port 1883 (configurable). No Terminal, no Homebrew, no configuration files. Your broker is running and ready to accept connections.

Connecting Your Device

Point your ESP32, Raspberry Pi, or other MQTT client at your Mac's IP address on port 1883. The device connects to the MacTools broker. You see the connection appear in the client list immediately.

Seeing Messages

As your device publishes messages, they appear in the message view. Each message shows the topic, payload, QoS level, and timestamp. Click on any topic in the tree to filter the view to just that topic. Expand topic levels in the tree to see the full hierarchy your device uses.

Publishing Back

Navigate to the Publish tab, enter a topic and payload, and click Publish. Your device receives the message as if it came from a production server. This lets you test command handling, configuration updates, and OTA trigger mechanisms.

Use Cases

ESP32 and ESP8266 Development

The most common scenario. You are developing firmware for an ESP32 that publishes sensor data or accepts commands over MQTT. MacTools gives you a local broker and visual client to verify every publish and test every subscribe handler.

Home Assistant Debugging

When Home Assistant is not receiving MQTT messages from a device, you need to determine whether the device is publishing or Home Assistant is subscribing incorrectly. Connect MacTools to the same broker and see exactly what messages are arriving on each topic.

IoT Prototyping

Before investing in cloud infrastructure, prototype your entire MQTT topic structure and message flow locally. Test topic naming conventions, payload formats, and QoS levels with MacTools before deploying to IoT platforms like AWS IoT, Azure IoT Hub, or a self-hosted broker.

AWS IoT Core Verification

When connecting devices to AWS IoT Core, you need to verify that your MQTT topics, certificates, and policy bindings work correctly. Test locally with MacTools first, then deploy with confidence.

Industrial Gateway Testing

Modbus-to-MQTT gateways, OPC-UA-to-MQTT bridges, and other protocol converters all publish structured data to MQTT topics. MacTools lets you see the actual payloads and verify the topic structure matches your downstream consumer's expectations.

Comparison: MQTT Tools for macOS

Factor
MacTools MQTT
mosquitto CLI
MQTTX
Price
$9.99 one-time
Free
Free
Native macOS
Yes (AppKit)
CLI only
Electron
Built-in Broker
Yes
Yes (separate install)
No
GUI
Native macOS
Terminal only
Electron GUI
RAM Usage
~30MB
~5MB
200-400MB
MQTT 5.0
Yes
Yes
Yes
Topic Tree
Yes
No
Basic

Frequently Asked Questions

Can you run an MQTT broker on macOS without Homebrew?

Yes. MacTools MQTT Client includes a built-in MQTT broker that starts with one click. No Terminal commands, no Homebrew installation, no separate mosquitto setup. Open the app, click Start Broker, and your devices can connect to your Mac on port 1883.

What is the best MQTT client for macOS?

For a native macOS experience, MacTools MQTT Client provides a built-in broker, topic tree browser, message history, and publish/subscribe in a single AppKit application. It uses approximately 30MB of RAM compared to 200-400MB for Electron-based alternatives like MQTTX. For CLI-only workflows, mosquitto via Homebrew remains a solid free option.

Does mosquitto work on Apple Silicon Macs?

Yes, mosquitto runs on Apple Silicon through Rosetta or as a native ARM build via Homebrew. However, it is a command-line only tool with no GUI. If you need a visual topic tree, message history, or a built-in broker without Terminal, a native macOS app like MacTools is more practical.

How do I test MQTT locally on my Mac?

Start a local MQTT broker on your Mac (MacTools has one built-in, or install mosquitto via Homebrew). Point your IoT device or ESP32 to your Mac's IP address on port 1883. Subscribe to the topic your device publishes to and verify the payloads arrive correctly.

Why is MQTT Explorer blocked by macOS Gatekeeper?

MQTT Explorer is not signed with an Apple Developer certificate, which causes macOS Gatekeeper to block it on recent versions. You can bypass this by right-clicking the app and selecting Open, but this is a security trade-off. Native macOS apps signed with Developer IDs do not have this issue.

Try the Native MQTT Client

MacTools MQTT Client with built-in broker, topic tree browser, and publish/subscribe. Native macOS app, no Electron, no Homebrew. $9.99 one-time.

Get MacTools MQTT Client

Related: Full SCADA System

Need continuous monitoring with dashboards, alarms, and trending across all your devices? Voltrus SCADA supports Modbus, OPC-UA, Siemens S7, Allen-Bradley, DNP3, BACnet, MQTT, and more. Lifetime license from $249.

Further Reading