by Benniu
Provides interaction with EMQX MQTT brokers, allowing Model Context Protocol clients to list, inspect, disconnect MQTT clients and publish messages to topics with configurable QoS and retention.
What is Emqx Mcp Server about? Enables MCP clients to manage and communicate with EMQX MQTT clusters, whether hosted on EMQX Cloud (serverless or dedicated) or self‑hosted deployments. It offers HTTP‑based tools that can be invoked by LLMs to perform common broker operations.
How to use Emqx Mcp Server?
uv installation).EMQX_API_URL, EMQX_API_KEY, and EMQX_API_SECRET pointing to your EMQX instance.claude_desktop_config.json under mcpServers.list_mqtt_clients, get_mqtt_client, kick_mqtt_client, or publish_mqtt_message from an LLM or compatible client.Key features of Emqx Mcp Server
uv.Use cases of Emqx Mcp Server
FAQ from the Emqx Mcp Server
EMQX_API_KEY and EMQX_API_SECRET. They are passed to the EMQX Management API.limit parameter of list_mqtt_clients can be set up to 10,000.https:// when connecting to EMQX Cloud; self‑hosted setups may use HTTP as configured.A Model Context Protocol (MCP) server implementation that provides EMQX MQTT broker interaction. Enabling MCP clients to interact with the MQTT clusters on EMQX Cloud or self-hosted clusters
Before using the EMQX MCP Server tools, you need to set up an EMQX cluster with properly configured API Key and client authentication. There are several options:
To install emqx-mcp-server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @Benniu/emqx-mcp-server --client claude
Install Claude Desktop App if you haven't done so yet.
Pull the image:
docker pull benniuji/emqx-mcp-server
Add the following to your claude_desktop_config.json file:
~/Library/Application\ Support/Claude/claude_desktop_config.json%APPDATA%/Claude/claude_desktop_config.json{
"mcpServers": {
"EMQX_MCP_Server": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e", "EMQX_API_URL=https://your-emqx-cloud-instance.com:8443/api/v5",
"-e", "EMQX_API_KEY=<YOUR-API-KEY>",
"-e", "EMQX_API_SECRET=<YOUR-API-SECRET>",
"benniuji/emqx-mcp-server"
]
}
}
}
Note: Update the env variables:EMQX_API_URL, EMQX_API_KEY, EMQX_API_SECRET
Open or Restart Claude Desktop App
Try asking Claude to do something with the MQTT broker (e.g. ask it to publish an MQTT message to a topic).
First, ensure you have the uv executable installed. If not, you can install it by following the instructions here.
claude_desktop_config.json file:
~/Library/Application\ Support/Claude/claude_desktop_config.json%APPDATA%/Claude/claude_desktop_config.json{
"mcpServers": {
"EMQX_MCP_Server": {
"command": "uv",
"args": [
"--directory",
"path/to/repo/src/emqx_mcp_server",
"run",
"emqx-mcp-server"
],
"env":{
"EMQX_API_URL":"https://your-emqx-cloud-instance.com:8443/api/v5",
"EMQX_API_KEY":"<YOUR-API-KEY>",
"EMQX_API_SECRET":"<YOUR-API-SECRET>"
}
}
}
}
Note: Make sure to update path/to/repo/src/emqx_mcp_server to the actual path and modify the environment variables EMQX_API_URL, EMQX_API_KEY, and EMQX_API_SECRET to match your EMQX instance.User:
Please list the clients connected to the MQTT broker.
LLM:
Here are the clients currently connected to your MQTT broker:
Connected Client:
- Client ID: mqttx_2232bdb1
- Username: test
- Protocol: MQTT v5
...
There is currently 1 client connected to your MQTT broker. Would you like more detailed information about this specific client or would you like to perform another action with your MQTT broker?
User:
Yes, please provide the detail info of this client.
LLM:
I'll retrieve the detailed information for this client for you.
...
Here's the detailed information for client "mqttx_2232bdb1":
**Basic Information:**
- **Client ID:** mqttx_2232bdb1
- **Username:** test
...
**Connection Details:**
- **Connected:** Yes
- **Created At:** 2025-03-02T05:29:51.103+00:00
...
Would you like to perform any actions with this client, such as publishing a message to a topic or disconnecting the client?
User:
Please write a poem and send it to the topic '/poem' with QoS 1.
LLM:
I'll create a poem and publish it to the topic '/poem' with QoS 1. Let me do that for you.
...
I've successfully published the poem to the topic '/poem' with QoS 1. The message has been delivered with ID: 00062F55A1EFB1156ABC481240B30000.
The poem I sent was:
- Signals in the ether,
- Invisible threads that bind,
- Devices speak in whispers,
- Across the digital divide.
- Messages like leaves falling,
- From cloud to waiting ground,
- Connected yet untethered,
- Where silence makes no sound.
- Brokers of the modern age,
- Routing dreams from here to there,
- In this web of connections,
- We find ourselves everywhere.
- Like stars in constellation,
- Each point of light has worth,
- The language of machines,
- Redefining our Earth.
Is there anything else you'd like to do with your MQTT broker?
User:
Please kick out the client mqttx_2232bdb1
LLM
I'll disconnect the client from the MQTT broker for you.
...
The client has been successfully disconnected. The system returned:
> Client mqttx_2232bdb1 has been disconnected
The MQTT client with ID "mqttx_2232bdb1" is now disconnected from your broker. Is there anything else you would like to do with your MQTT broker?
This project is licensed under the Apache License Version 2.0 - see the LICENSE file for details.
Please log in to share your review and rating for this MCP.
Explore related MCPs that share similar capabilities and solve comparable challenges
by modelcontextprotocol
A Model Context Protocol server for Git repository interaction and automation.
by zed-industries
A high‑performance, multiplayer code editor designed for speed and collaboration.
by modelcontextprotocol
Model Context Protocol Servers
by modelcontextprotocol
A Model Context Protocol server that provides time and timezone conversion capabilities.
by cline
An autonomous coding assistant that can create and edit files, execute terminal commands, and interact with a browser directly from your IDE, operating step‑by‑step with explicit user permission.
by upstash
Provides up-to-date, version‑specific library documentation and code examples directly inside LLM prompts, eliminating outdated information and hallucinated APIs.
by daytonaio
Provides a secure, elastic infrastructure that creates isolated sandboxes for running AI‑generated code with sub‑90 ms startup, unlimited persistence, and OCI/Docker compatibility.
by continuedev
Enables faster shipping of code by integrating continuous AI agents across IDEs, terminals, and CI pipelines, offering chat, edit, autocomplete, and customizable agent workflows.
by github
Connects AI tools directly to GitHub, enabling natural‑language interactions for repository browsing, issue and pull‑request management, CI/CD monitoring, code‑security analysis, and team collaboration.
{
"mcpServers": {
"EmqxMcpServer": {
"command": "npx",
"args": [
"-y",
"@Benniu/emqx-mcp-server"
],
"env": {
"EMQX_API_URL": "<YOUR_EMQX_API_URL>",
"EMQX_API_KEY": "<YOUR_API_KEY>",
"EMQX_API_SECRET": "<YOUR_API_SECRET>"
}
}
}
}claude mcp add EmqxMcpServer npx -y @Benniu/emqx-mcp-server