Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

Enables Cursor to subscribe to MQTT topics and read buffered messages from an MQTT broker.

README.md

MQTT MCP Server

An MCP (Model Context Protocol) server that enables Cursor to read messages from an MQTT broker.

Features

  • Subscribe to MQTT topics (supports wildcards + and #)
  • Read buffered messages from subscribed topics
  • List active subscriptions
  • Configurable message buffer size

Installation

  1. Install dependencies:
npm install
  1. Build the project:
npm run build
  1. Copy .env.example to .env and configure your MQTT broker settings:
cp .env.example .env

Configuration

Edit the .env file with your MQTT broker details:

| Variable | Description | Default | |----------|-------------|---------| | MQTT_BROKER_URL | MQTT broker URL (mqtt:// or mqtts://) | mqtt://localhost:1883 | | MQTT_USERNAME | Username for authentication | (none) | | MQTT_PASSWORD | Password for authentication | (none) | | MQTT_CLIENT_ID | Client ID for MQTT connection | cursor-mqtt-mcp-{timestamp} | | MAX_MESSAGES_PER_TOPIC | Max messages to buffer per topic | 100 |

Cursor Configuration

Add this MCP server to your Cursor settings (.cursor/mcp.json or global settings):

{
  "mcpServers": {
    "mqtt": {
      "command": "node",
      "args": ["C:/path/to/mqtt-mcp/dist/index.js"],
      "env": {
        "MQTT_BROKER_URL": "mqtt://your-broker:1883",
        "MQTT_USERNAME": "your_username",
        "MQTT_PASSWORD": "your_password"
      }
    }
  }
}

Alternatively, if using a .env file in the project directory:

{
  "mcpServers": {
    "mqtt": {
      "command": "node",
      "args": ["C:/path/to/mqtt-mcp/dist/index.js"],
      "cwd": "C:/path/to/mqtt-mcp"
    }
  }
}

Available Tools

mqtt_subscribe

Subscribe to an MQTT topic to start receiving messages.

Parameters:

  • topic (required): The MQTT topic to subscribe to
  • qos (optional): Quality of Service level (0, 1, or 2). Default: 0

Example: `` Subscribe to "sensors/temperature" Subscribe to "devices/+/status" (single-level wildcard) Subscribe to "home/#" (multi-level wildcard) ``

mqtt_unsubscribe

Unsubscribe from an MQTT topic.

Parameters:

  • topic (required): The MQTT topic to unsubscribe from

mqtt_read_messages

Read buffered messages from subscribed topics.

Parameters:

  • topic (optional): Specific topic to read from. If omitted, reads from all topics
  • limit (optional): Maximum messages to return. Default: 10
  • clear (optional): Clear buffer after reading. Default: false

mqtt_list_subscriptions

List all active subscriptions and their message counts.

Parameters: None

Usage Example

  1. First, subscribe to a topic:

"Subscribe to the MQTT topic sensors/temperature"

  1. Wait for messages to arrive, then read them:

"Read the latest messages from sensors/temperature"

  1. Check all active subscriptions:

"List my MQTT subscriptions"

  1. Unsubscribe when done:

"Unsubscribe from sensors/temperature"

License

MIT

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Communication servers.