OMNI-MQTT-MCP
Supports Docker deployment with containerized server configuration for running the MQTT MCP server in Docker environments.
Provides tools for publishing messages to MQTT topics and subscribing to MQTT topics to receive messages, with configurable broker connection settings including authentication and TLS support.
Enables automatic exposure of the MCP server through ngrok tunnels when running in Docker, providing public URL access to locally hosted instances.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@OMNI-MQTT-MCPpublish 'temperature: 72.5F' to sensor/room1"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
OMNI-MQTT-MCP
MQTT MCP Server with configurable transport options via CLI: STDIO (default), Streamable HTTP (recommended for web), and SSE (deprecated).
๐ Quick Start
# Install dependencies
pip install -r requirements.txt
# Run with STDIO (default - for local development)
python mqtt_mcp_server.py
# Run with Streamable HTTP (recommended for web)
python mqtt_mcp_server.py --transport streamable-http
# Run with SSE (deprecated)
python mqtt_mcp_server.py --transport sseRelated MCP server: MCP MQTT Server
๐ Transport Options
Choose your transport with the --transport CLI argument:
1. STDIO Transport (Default) โ
python mqtt_mcp_server.py --transport stdio
# or simply:
python mqtt_mcp_server.pyBest for: Local development, Claude Desktop integration
Pros: Simple, secure, works with MCP clients like Claude Desktop
Cons: Local only, no remote access
2. Streamable HTTP (Recommended for Web) ๐
python mqtt_mcp_server.py --transport streamable-http
python mqtt_mcp_server.py --transport streamable-http --host 0.0.0.0 --http-port 9000Best for: Web deployments, remote access, microservices
Default URL:
http://127.0.0.1:8000/mcpPros: Modern, efficient, supports multiple clients, easy deployment
Cons: Requires network setup, security considerations
3. SSE (Server-Sent Events) โ ๏ธ Deprecated
python mqtt_mcp_server.py --transport sseBest for: Legacy deployments (not recommended for new projects)
Default URL:
http://127.0.0.1:8000/sseStatus: Being phased out in favor of Streamable HTTP
๐ Available Tools
mqtt_publish: Publish messages to MQTT topicsmqtt_subscribe: Subscribe to MQTT topics and receive messages
โ๏ธ Configuration Options
MQTT Configuration
python mqtt_mcp_server.py \
--broker localhost \
--port 1883 \
--client-id mcp-mqtt-client \
--username your_username \
--password your_passwordTransport Configuration
python mqtt_mcp_server.py \
--transport streamable-http \
--host 127.0.0.1 \
--http-port 8000 \
--path /mcpAll Options
python mqtt_mcp_server.py --helpEnvironment Variables
You can also use environment variables for MQTT settings:
export MQTT_BROKER_ADDRESS=localhost
export MQTT_PORT=1883
export MQTT_CLIENT_ID=mcp-mqtt-client
export MQTT_USERNAME=your_username
export MQTT_PASSWORD=your_password
python mqtt_mcp_server.py --transport streamable-http๐งช Testing
Test HTTP Server
# Terminal 1: Start server
python mqtt_mcp_server.py --transport streamable-http
# Terminal 2: Test it
python test_http_client.pyTest with Claude Desktop
Add to your Claude Desktop MCP configuration:
{
"mcpServers": {
"mqtt": {
"command": "python",
"args": ["/path/to/mqtt_mcp_server.py"],
"env": {
"MQTT_BROKER_ADDRESS": "localhost",
"MQTT_PORT": "1883"
}
}
}
}๐ง Development
Using the MCP CLI
# Run in development mode with MCP Inspector
mcp dev mqtt_mcp_server.py
# Run with specific transport via MCP CLI
mcp run mqtt_mcp_server.py -- --transport streamable-http --http-port 9000๐ Examples
Local Development
# Default STDIO for Claude Desktop
python mqtt_mcp_server.pyWeb Deployment
# HTTP server on port 8000
python mqtt_mcp_server.py --transport streamable-http
# HTTP server on custom port and host
python mqtt_mcp_server.py --transport streamable-http --host 0.0.0.0 --http-port 9000
# Custom path
python mqtt_mcp_server.py --transport streamable-http --path /api/mcpProduction with Custom MQTT
python mqtt_mcp_server.py \
--transport streamable-http \
--broker mqtt.example.com \
--port 8883 \
--username prod_user \
--password secret123 \
--host 0.0.0.0 \
--http-port 80๐ค Which Transport Should I Choose?
Use Case | Command | Why? |
Local development |
| Simple, secure, works with Claude Desktop |
Web deployment |
| Modern, efficient, easy to deploy |
Remote AI agents |
| Supports authentication, scalable |
Legacy systems |
| Only if you're already using SSE |
๐ณ Docker with Ngrok
Run the server inside Docker and automatically expose it with an ngrok tunnel.
Build
docker build -t mqtt-mcp-ngrok .Run
docker run -d \
-p 8000:8000 \
-e NGROK_AUTHTOKEN=<YOUR_TOKEN> \
-e TRANSPORT=sse \
-e FASTMCP_PORT=8000 \
-e MQTT_BROKER_ADDRESS=mqtt.example.com \
-e MQTT_PORT=8883 \
-e MQTT_CLIENT_ID=my-client \
-e MQTT_USERNAME=prod_user \
-e MQTT_PASSWORD=secret123 \
mqtt-mcp-ngrokThe container exposes the MCP server via ngrok. Pass environment variables to configure the MQTT broker and server transport. Check the container logs to discover the public URL.
๐ Learn More
๐ Security Notes
STDIO: Runs locally, inherently secure
HTTP/SSE: Consider adding authentication for production deployments
MQTT: Configure MQTT broker security (TLS, authentication)
Available Tools
2 toolsmqtt_publishB
Publishes a message to a specific MQTT topic.
Args:
topic: The MQTT topic to publish to.
message: The message payload to send.
qos: The Quality of Service level (0, 1, or 2). Defaults to 0.
retain: Whether the message should be retained by the broker. Defaults to False.
Returns:
A confirmation message string.
| Name | Required | Description | Default |
|---|---|---|---|
| topic | Yes | ||
| message | Yes | ||
| qos | No | ||
| retain | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the basic action (publishing) and return value (confirmation message), but lacks critical behavioral details like authentication requirements, error handling, network behavior, or what happens if the broker is unavailable. For a network operation with potential side effects, this is insufficient transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is perfectly structured and concise: a clear purpose statement followed by well-organized parameter documentation with defaults indicated. Every sentence adds value with no redundancy or unnecessary information. The Args/Returns format makes it easy to parse while maintaining readability.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (network operation with 4 parameters) and complete lack of annotations/output schema, the description does an adequate job covering the basics but has significant gaps. It explains parameters well and states the return type, but misses critical behavioral context about authentication, error conditions, and MQTT-specific behaviors that would help an agent use it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds significant value beyond the schema, which has 0% description coverage. It explains each parameter's purpose: 'topic' as the destination, 'message' as the payload, 'qos' with valid values (0,1,2) and default, and 'retain' with meaning and default. This compensates well for the schema's lack of descriptions, though it could provide more context about QoS implications.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Publishes a message') and target resource ('to a specific MQTT topic'), making the purpose immediately understandable. It distinguishes from the sibling 'mqtt_subscribe' by specifying the opposite operation (publish vs subscribe). However, it doesn't explicitly mention what makes this tool unique beyond the basic verb, so it falls short of a perfect 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives or in what context it should be applied. While the sibling tool 'mqtt_subscribe' exists, there's no explicit comparison or recommendation about choosing between publish and subscribe operations. This leaves the agent without usage context beyond the basic purpose.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
mqtt_subscribeA
Subscribes to an MQTT topic and receives a specified number of messages or waits for a timeout.
Args:
topic: The MQTT topic to subscribe to (can include wildcards like + or #).
num_messages: The maximum number of messages to receive. Defaults to 1.
timeout: The maximum time (in seconds) to wait for messages. Defaults to 10.
Returns:
A list of dictionaries, where each dictionary represents a received message
with 'topic' and 'payload' keys.
| Name | Required | Description | Default |
|---|---|---|---|
| topic | Yes | ||
| num_messages | No | ||
| timeout | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It explains the subscription behavior, message collection, and timeout mechanism, but lacks details about connection requirements, error handling, or what happens if no messages arrive. It provides basic operational context but misses important behavioral aspects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is perfectly structured with a clear opening sentence followed by well-organized Args and Returns sections. Every sentence earns its place by providing essential information without redundancy. The formatting enhances readability while maintaining brevity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (3 parameters, no annotations, no output schema), the description covers the basic operation and parameters well but lacks information about connection state, authentication requirements, error conditions, and the format of the returned payload. It's adequate for basic use but incomplete for robust implementation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 0%, so the description must fully compensate. It provides detailed semantic information for all three parameters: explains topic wildcards (+ and #), clarifies num_messages as a maximum with default, and specifies timeout units (seconds) with default. This adds significant value beyond the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Subscribes to an MQTT topic') and resource ('receives a specified number of messages or waits for a timeout'), distinguishing it from the sibling tool mqtt_publish. It provides a complete picture of what the tool does beyond just the verb.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like mqtt_publish, nor does it mention prerequisites, error conditions, or typical use cases. It only describes what the tool does without contextual usage information.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
2 tool updates
v1.0.0- First observed
mqtt_publish - First observed
mqtt_subscribe
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: mqtt_publish sends messages to a topic, while mqtt_subscribe receives messages from a topic. There is no overlap in functionality, and an agent can easily tell them apart based on their names and descriptions.
Both tools follow a consistent mqtt_verb pattern (mqtt_publish and mqtt_subscribe), which clearly indicates they belong to the MQTT domain. The naming is predictable and readable throughout the set.
With only 2 tools, the server feels thin for an MQTT domain, which typically involves operations like connect, disconnect, list topics, or manage brokers. While publish and subscribe are core, the lack of other essential functions limits its scope and utility.
The tool set is severely incomplete for MQTT operations. It lacks basic functionality such as connecting to/disconnecting from a broker, listing topics, or managing subscriptions beyond a single call. This will cause agent failures when trying to perform common MQTT workflows.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
- QuallaaOAuthcom.quallaa
Talk to your public-facing AI from any MCP client โ Claude, ChatGPT, Cursor, Cline, Windsurf.
Zero-setup MCP gateway securely connecting AI to your tools with authentication and workflows
Real-time chat for AI agents. Claude Code, Cursor, Cline and Codex join channels over MCP.
Phone, SMS & email for AI agents โ one remote MCP endpoint, OAuth login, zero install.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceConnects Claude and other MCP-compatible AI assistants to a Coreflux MQTT broker, enabling them to discover and execute Coreflux commands for managing models, actions, rules, and routes through natural language.4Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables LLM agents to interact with MQTT brokers through publish, subscribe, and query operations. Provides fine-grained topic permissions with wildcard support for secure IoT device communication and sensor data access.1BSD 3-Clause
- AlicenseNot gradedqualityDmaintenanceConnects AI assistants to MQTT brokers for smart home automation and IoT device control, enabling topic discovery, sensor reading, command sending, and event monitoring.2MIT
- AlicenseNot gradedqualityAmaintenanceEnables LLM agents to securely monitor and control MQTT devices for building automation, industrial control, and smart home systems through a standardized MCP interface.21MIT