> AI agents: this is one page from Mammoth Analytics documentation. The index of all pages as Markdown is https://mammoth.io/docs/llms.txt. Append `.md` to any docs URL, or send `Accept: text/markdown`, to get Markdown.

# MQTT connector

> Connect Mammoth to an MQTT broker, subscribe to a topic for a set collection window, and save the messages it receives as a dataset.

This page shows how to connect Mammoth to an MQTT broker and save the messages published on a topic as a dataset, for example sensor readings from IoT devices.

Which connectors you can add depends on your plan.

## What you need before connecting MQTT

- A broker host reachable from the internet, and its port
- A username and password, if the broker requires them
- A topic that is publishing messages

## Connect an MQTT broker

1. Open the **Connectors** launcher and click **MQTT** (see [Add a connector](https://mammoth.io/docs/learn/connectors/connector-workspace/)).
2. Enter the connection details:

| Field | What to enter |
| --- | --- |
| **Broker Host** | The broker address, such as `broker.hivemq.com` |
| **Port** | Default `1883`, or `8883` for TLS |
| **Username** | Optional |
| **Password** | Optional |
| **Name** | Optional label for this connection, such as `Factory Floor Broker` |



## Choose the MQTT topic and collection window

The MQTT connector's own setup form asks:

- **Topic**: the topic to subscribe to, such as `sensors/factory1/temperature`
- **Collection Window (seconds)**: how long Mammoth listens for messages, from 1 to 600 seconds

Mammoth checks the topic before saving. **Topic is active and receiving messages.** means it is ready. In the connector workspace, you can tell the chat which topic you want.

## MQTT update methods

After you save, an MQTT dataset's **Update method** offers two options: **Replace all data** or **Add to existing data**. MQTT refreshes don't use a key column.

## Troubleshoot MQTT

- **No messages received. Ensure the broker is running and the topic is active.** Check that something is publishing to the topic during the collection window, or lengthen the window.
- **Collection Window error:** enter a whole number of seconds between 1 and 600.

---
Source: https://mammoth.io/docs/learn/connectors/mqtt-connector.md · Updated: 2026-11-03
