Add to Claude Code
0 addsAdd this MCP server to Claude Code.
Name: MQTT IoT MCP
Merge into: ~/.claude/mcp.json under mcpServers
---
{
"mcpServers": {
"mqtt-iot": {
"command": "npx",
"args": ["-y", "@anthropic-community/mcp-mqtt"],
"env": {
"MQTT_BROKER_URL": "mqtt://your-broker.example.com:1883",
"MQTT_USERNAME": "<YOUR_USERNAME>",
"MQTT_PASSWORD": "<YOUR_PASSWORD>"
}
}
}
}
// ── Setup ────────────────────────────────────────────────────────────────────
// 1. Set MQTT_BROKER_URL to your MQTT broker (Mosquitto, HiveMQ, EMQX, etc.)
// 2. For local testing: brew install mosquitto && mosquitto
// 3. For cloud: use HiveMQ Cloud free tier or AWS IoT Core
//
// ── Available tools ──────────────────────────────────────────────────────────
// subscribe subscribe to topics and receive messages (supports wildcards)
// publish send messages to a topic
// list_topics discover active topics on the broker
// get_retained fetch the last retained message for a topic
// inspect_payload decode and display payloads (JSON, Protobuf, raw bytes)
Paste into Claude Code to connect this MCP server.
How to add
Full guide →Click Add, then paste into Claude Code. Claude will connect the MCP server in your settings.
Target: .claude/mcp.json → mcpServers