emqx-mcp-server
Servidor MCP EMQX
Una implementación de servidor del Protocolo de Contexto de Modelo (MCP) que permite la interacción con el agente MQTT de EMQX. Permite a los clientes MCP interactuar con los clústeres MQTT en EMQX Cloud o en clústeres alojados por ellos mismos.
Características
Gestión de clientes MQTT
Listado de clientes: vea todos los clientes MQTT conectados con opciones de filtrado flexibles
Información del cliente: recupera información detallada sobre clientes específicos
Control de conexión: desconecte del bróker a los clientes problemáticos o inactivos
Filtrado flexible: filtre clientes por nodo, nombre de usuario, ID de cliente, estado de conexión y más
Publicación de mensajes MQTT
Publicación basada en temas: envía mensajes a cualquier tema MQTT
Control de QoS: seleccione el nivel de calidad de servicio (0, 1 o 2) para una entrega confiable
Retención de mensajes: opción para conservar los mensajes para los nuevos suscriptores
Cargas útiles personalizadas: compatibilidad con cualquier formato de contenido de mensajes
Related MCP server: MCP REST API Server
Herramientas
lista_clientes_mqtt
Enumere los clientes MQTT conectados a su clúster EMQX
Entradas:
página (número, opcional): Número de página (predeterminado: 1)
límite (número, opcional): Resultados por página (predeterminado: 100, máximo 10000)
nodo (cadena, opcional): filtrar por nombre de nodo específico
clientid (cadena, opcional): Filtrar por ID de cliente específico
nombre de usuario (cadena, opcional): filtrar por nombre de usuario específico
ip_address (cadena, opcional): Filtrar por dirección IP del cliente
conn_state (cadena, opcional): Filtrar por estado de conexión
clean_start (booleano, opcional): Filtrar por indicador de inicio limpio
proto_ver (cadena, opcional): Filtrar por versión del protocolo
like_clientid (cadena, opcional): Búsqueda difusa por patrón de ID de cliente
like_username (cadena, opcional): búsqueda difusa por patrón de nombre de usuario
like_ip_address (cadena, opcional): Búsqueda difusa por patrón de dirección IP
obtener_cliente_mqtt
Obtenga información detallada sobre un cliente MQTT específico por ID de cliente
Entradas:
clientid (cadena, obligatoria): el identificador único del cliente a recuperar
cliente kick_mqtt
Desconectar un cliente del agente MQTT por ID de cliente
Entradas:
clientid (cadena, obligatoria): el identificador único del cliente que se desconectará
publicar_mensaje_mqtt
Publicar un mensaje MQTT en su clúster EMQX en EMQX Cloud o en una implementación autoadministrada
Entradas:
tema (cadena, obligatorio): tema MQTT en el que publicar
carga útil (cadena, obligatoria): contenido del mensaje a publicar
qos (número, opcional): nivel de calidad de servicio (0, 1 o 2) (valor predeterminado: 0)
retener (booleano, opcional): si se debe conservar el mensaje (valor predeterminado: falso)
Configurar el clúster EMQX
Antes de usar las herramientas del servidor EMQX MCP, debe configurar un clúster EMQX con la clave API y la autenticación de cliente correctamente configuradas. Existen varias opciones:
Implementación sin servidor en la nube de EMQX:
La forma más fácil de empezar.
Obtenga una implementación sin servidor gratuita de EMQX Cloud
Regístrese en EMQX Cloud Serverless
Implementación dedicada en la nube de EMQX:
Proporciona recursos dedicados para cargas de trabajo de producción
Ofrece un rendimiento mejorado, confiabilidad y opciones de personalización.
Admite varios proveedores de nube (AWS, GCP, Azure)
Incluye SLA y soporte profesional
Crear una implementación en EMQX Cloud Dedicated
Plataforma EMQX autohospedada:
Descargue e implemente la plataforma EMQX localmente
Siga las instrucciones de instalación en la Plataforma EMQX
Ejecutándose localmente con la aplicación de escritorio Claude
Opción 1: Instalación mediante herrería
Para instalar emqx-mcp-server para Claude Desktop automáticamente a través de Smithery :
npx -y @smithery/cli install @Benniu/emqx-mcp-server --client claudeOpción 2: Docker
Instale la aplicación de escritorio Claude si aún no lo ha hecho.
Tire de la imagen:
docker pull benniuji/emqx-mcp-serverAgregue lo siguiente a su archivo
claude_desktop_config.json:En MacOS:
~/Library/Application\ Support/Claude/claude_desktop_config.jsonEn Windows:
%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" ] } } }Nota: Actualice las variables de entorno:
EMQX_API_URL,EMQX_API_KEY,EMQX_API_SECRETAbrir o reiniciar la aplicación Claude Desktop
Intenta pedirle a Claude que haga algo con el agente MQTT (por ejemplo, pedirle que publique un mensaje MQTT en un tema).
Opción 3: Instalación manual
Primero, asegúrate de tener instalado el ejecutable uv . De lo contrario, puedes instalarlo siguiendo las instrucciones aquí .
Instale la aplicación de escritorio Claude si aún no lo ha hecho.
Clonar este repositorio.
Agregue lo siguiente a su archivo
claude_desktop_config.json:En MacOS:
~/Library/Application\ Support/Claude/claude_desktop_config.jsonEn Windows:
%APPDATA%/Claude/claude_desktop_config.jsonGXP4
Nota: asegúrese de actualizar
path/to/repo/src/emqx_mcp_servera la ruta real y modificar las variables de entornoEMQX_API_URL,EMQX_API_KEYyEMQX_API_SECRETpara que coincidan con su instancia de EMQX.Abrir o reiniciar la aplicación Claude Desktop
Intenta pedirle a Claude que haga algo con el agente MQTT (por ejemplo, pedirle que publique un mensaje MQTT en un tema).
Ejemplos de indicaciones
Usuario:
Please list the clients connected to the MQTT broker.Maestría en Derecho:
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?Usuario:
Yes, please provide the detail info of this client. Maestría en Derecho:
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?Usuario:
Please write a poem and send it to the topic '/poem' with QoS 1.Maestría en Derecho:
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?Usuario:
Please kick out the client mqttx_2232bdb1Maestría en Derecho
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?Licencia
Este proyecto está licenciado bajo la licencia Apache versión 2.0: consulte el archivo de LICENCIA para obtener más detalles.
Available Tools
4 toolsget_mqtt_clientC
Get detailed information about a specific MQTT client by client ID
Inputs: request (required).
kick_mqtt_clientC
Disconnect a client from the MQTT broker by client ID
Inputs: request (required).
list_mqtt_clientsC
List MQTT clients connected to your EMQX Cluster
Inputs: request (required).
publish_mqtt_messageC
Publish an MQTT Message to Your EMQX Cluster on EMQX Cloud or Self-Managed Deployment
Inputs: request (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose targeting different aspects of MQTT client and message management. get_mqtt_client retrieves details, kick_mqtt_client disconnects, list_mqtt_clients enumerates connections, and publish_mqtt_message sends messages, with no overlap in functionality.
All tool names follow a consistent verb_noun pattern with snake_case, using clear verbs like get, kick, list, and publish paired with descriptive nouns (mqtt_client, mqtt_message). This makes the tool set predictable and easy to understand.
Four tools are reasonable for an MQTT management server, covering core operations like client monitoring and message publishing. However, the count feels slightly thin, as it lacks tools for broader broker management (e.g., topic subscriptions or configuration), but it's well-scoped for its purpose.
The tools cover client management (list, get, kick) and message publishing, but there are notable gaps in the MQTT domain. Missing operations include subscribing to topics, managing topics, or handling broker settings, which could limit agent workflows for comprehensive MQTT interactions.
Maintenance
Related MCP Connectors
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP server for OnceAsk, the AI-native current-address layer for people and agents.
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceA generic, modular server for implementing the Model Context Protocol (MCP).299 npm45ISC
- FlicenseNot gradedqualityDmaintenanceA server implementation of the Model Context Protocol (MCP) that provides REST API endpoints for managing and interacting with MCP resources.-
- AlicenseNot gradedqualityDmaintenanceAn implementation of the Model Context Protocol (MCP) server that enables multiple clients to connect simultaneously and handles basic context management and messaging with an extendable architecture.MIT
- AlicenseBqualityNot gradedmaintenanceAn MCP server that bridges the physical world and AI models by enabling natural language control of IoT hardware via the MQTT protocol. It supports real-time device monitoring, command publishing, and response handling for seamless integration between AI clients and physical devices.3MIT