- Home
- MCP servers
- Omni MQTT
Omni MQTT
- python
0
GitHub Stars
python
Language
6 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"omniscience-labs-omni-mqtt-mcp": {
"command": "python",
"args": [
"mqtt_mcp_server.py"
],
"env": {
"MQTT_PORT": "1883",
"MQTT_PASSWORD": "your_password",
"MQTT_USERNAME": "your_username",
"MQTT_CLIENT_ID": "mcp-mqtt-client",
"MQTT_BROKER_ADDRESS": "localhost"
}
}
}
}You run this MQTT MCP server to bridge MQTT topics to a lightweight MCP API, enabling lightweight clients and web frontends to publish and subscribe to MQTT topics through configurable transports. It supports local development via STDIO, web-ready streaming via Streamable HTTP, and legacy support via SSE, giving you flexible deployment options while keeping your MQTT integrations consistent.
How to use
You can start the server in STDIO mode for local development, or switch to HTTP transport for web deployments. For web access, you typically run the server with Streamable HTTP and then connect your MCP clients through the HTTP endpoint. You can also fall back to SSE for legacy setups, though it is deprecated.
How to install
Prerequisites: ensure you have Python installed on your system and access to the network where you will run the MCP server. You will install dependencies from a requirements file before starting the server.
pip install -r requirements.txt
Configuration and usage notes
You can run the server in different transports. Use the following core commands to start the server in each transport mode. The default is STDIO for local development.
# STDIO Transport (Default)
python mqtt_mcp_server.py
# Streamable HTTP Transport (Web)
python mqtt_mcp_server.py --transport streamable-http
Security and environment
For production deployments, consider adding authentication for HTTP/SSE transports and securing the MQTT broker with TLS and proper credentials. You can supply MQTT and server configuration via environment variables to keep secrets out of command history.
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 and examples
Test the HTTP server locally and verify it responds to MCP requests. You can also configure a client (for example Claude Desktop) to connect using the provided environment settings.
# Example client test - adjust as needed for your environment
python test_http_client.py
Production and deployment tips
In production, prefer the Streamable HTTP transport for web-facing deployments. Ensure your host and port are accessible from your client environment and secure the HTTP endpoint as needed. If you use SSE, note that it is deprecated and slated for removal in favor of Streamable HTTP.
Available tools
mqtt_publish
Publish messages to MQTT topics from MCP clients.
mqtt_subscribe
Subscribe to MQTT topics and receive messages from MCP clients.