
A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

A Model Context Protocol server that connects LLM agents to MQTT devices for monitoring sensor data, actuating devices and orchestrating automation.
MQTT MCP Server is cataloged as an MCP server attributed to ezhuk. A Model Context Protocol server that connects LLM agents to MQTT devices for monitoring sensor data, actuating devices and orchestrating automation. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.
Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for MQTT MCP Server are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
Yes; host and port can be set via environment variables or a .env file so prompts omitting connection parameters route to that broker.
Yes; authentication can be enabled using the built-in AuthKit provider configured with an AuthKit domain and redirect URL.
README.md · 412df99d1add · Fetched 2026-11-13 13:02:32 UTC
Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.
Showing the last retrieved documentation snapshot; check the source for current changes.
A lightweight Model Context Protocol (MCP) server that connects LLM agents to MQTT devices in a secure, standardized way, enabling seamless integration of AI-driven workflows with Building Automation (BAS), Industrial Control (ICS) and Smart Home systems, allowing agents to monitor real-time sensor data, actuate devices, and orchestrate complex automation tasks.
Use uv to add and manage the MQTT MCP server as a dependency in your project, or install it directly via uv pip install or pip install. See the Installation section of the documentation for full installation instructions and more details.
uv add mqtt-mcp
The server can be embedded in and run directly from your application. By default, it exposes a Streamable HTTP endpoint at http://127.0.0.1:8000/mcp/.
# app.py
from mqtt_mcp import MQTTMCP
mcp = MQTTMCP()
if __name__ == "__main__":
mcp.run(transport="http")
It can also be launched from the command line using the provided CLI without modifying the source code.
mqtt-mcp
Or in an ephemeral, isolated environment using uvx. Check out the Using tools guide for more details.
uvx mqtt-mcp
For the use cases where most operations target a specific MQTT broker its connection settings (host and port) can be specified at runtime using environment variables so that all prompts that omit explicit connection parameters will be routed to this broker.
export MQTT_MCP_MQTT__HOST=10.0.0.1
export MQTT_MCP_MQTT__PORT=1883
These settings can also be specified in a .env file in the working directory.
# .env
mqtt_mcp_mqtt__host=10.0.0.1
mqtt_mcp_mqtt__port=1883
To confirm the server is up and running and explore available resources and tools, run the MCP Inspector and connect it to the MQTT MCP server at http://127.0.0.1:8000/mcp/. Make sure to set the transport to Streamable HTTP.
npx @modelcontextprotocol/inspector
The MQTT MCP server leverages FastMCP 2.0's core building blocks - resource templates, tools, and prompts - to streamline MQTT receive and publish operations with minimal boilerplate and a clean, Pythonic interface.
Each topic on a device is mapped to a resource (and exposed as a tool) and resource templates are used to specify connection details (host, port) and receive parameters (topic, timeout).
@mcp.resource("mqtt://{host}:{port}/{topic*}")
@mcp.tool(
annotations={
"title": "Receive Message",
"readOnlyHint": True,
"openWorldHint": True,
}
)
async def receive_message(
topic: str,
host: str = settings.mqtt.host,
port: int = settings.mqtt.port,
timeout: int = 60,
) -> str:
"""Receives a message published to the specified topic, if any."""
...
Publish operations are exposed as a tool, accepting the same connection details (host, port) and allowing to publish a message to a specific topic in a single, atomic call.
@mcp.tool(
annotations={
"title": "Publish Message",
"readOnlyHint": False,
"openWorldHint": True,
}
)
async def publish_message(
topic: str,
message: str,
host: str = settings.mqtt.host,
port: int = settings.mqtt.port,
) -> str:
"""Publishes a message to the specified topic."""
...
To enable authentication using the built-in AuthKit provider for the Streamable HTTP transport, provide the AuthKit domain and redirect URL in the .env file. Check out the AuthKit Provider section for more details.
Structured response messages are implemented using prompts that help guide the interaction, clarify missing parameters, and handle errors gracefully.
@mcp.prompt(name="mqtt_help", tags={"mqtt", "help"})
def mqtt_help() -> list[Message]:
"""Provides examples of how to use the MQTT MCP server."""
...
Here are some example text inputs that can be used to interact with the server.
Publish {"foo":"bar"} to topic "devices/foo" on 127.0.0.1:1883.
Receive a message from topic "devices/bar", waiting up to 30 seconds.
The examples folder contains sample projects showing how to integrate with the MQTT MCP server using various client APIs to provide tools and context to LLMs.
The MQTT MCP server can be deployed as a Docker container as follows:
docker run -dit \
--name mqtt-mcp \
--restart=always \
-p 8080:8000 \
--env-file .env \
ghcr.io/ezhuk/mqtt-mcp:latest
This maps port 8080 on the host to the MCP server's port 8000 inside the container and loads settings from the .env file, if present.
The server is licensed under the MIT License.
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for MQTT MCP Server from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/mqtt-mcp)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.
No reviewed package or image identity; download statistics are not listed yet.
Alternative and complementary servers in the same category

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.