PolarHub
  • Agents
  • MCP Servers
  • Skills
  • PolarBear
PolarHub © 2026
MCP ServerscommunicationEMQX MCP服务器
返回「communication」

EMQX MCP服务器

modelscope·@Benniu/emqx-mcp-server

communication0下载LocalModelScope

简介

一种模型上下文协议(MCP)服务器实现,提供与EMQX MQTT代理的交互。

MCP Server 详情

来自 ModelScope 索引

EMQX MCP 服务器

smithery 徽章

<a href="https://glama.ai/mcp/servers/m7zgbcr053"> <img width="380" height="200" src="https://glama.ai/mcp/servers/m7zgbcr053/badge" alt="emqx-mcp-server MCP 服务器" /> </a>

这是一个 模型上下文协议 (MCP) 服务器实现,提供了与 EMQX MQTT 代理的交互。使 MCP 客户端能够与 EMQX Cloud 或自托管集群上的 MQTT 集群进行交互。

功能

MQTT 客户端管理

  • 客户端列表:查看所有已连接的 MQTT 客户端,并提供灵活的过滤选项
  • 客户端信息:获取特定客户端的详细信息
  • 连接控制:从代理中断开有问题或过时的客户端
  • 灵活过滤:按节点、用户名、客户端 ID、连接状态等条件过滤客户端

MQTT 消息发布

  • 基于主题的发布:向任何 MQTT 主题发送消息
  • QoS 控制:选择服务质量级别(0、1 或 2)以确保可靠传输
  • 消息保留:为新订阅者持久化消息的选项
  • 自定义负载:支持任何消息内容格式

工具

list_mqtt_clients

  • 列出连接到您的 EMQX 集群的 MQTT 客户端
  • 输入:
    • page (数字, 可选): 页码 (默认: 1)
    • limit (数字, 可选): 每页结果数 (默认: 100, 最大 10000)
    • node (字符串, 可选): 按特定节点名称过滤
    • clientid (字符串, 可选): 按特定客户端 ID 过滤
    • username (字符串, 可选): 按特定用户名过滤
    • ip_address (字符串, 可选): 按客户端 IP 地址过滤
    • conn_state (字符串, 可选): 按连接状态过滤
    • clean_start (布尔值, 可选): 按干净启动标志过滤
    • proto_ver (字符串, 可选): 按协议版本过滤
    • like_clientid (字符串, 可选): 按客户端 ID 模式模糊搜索
    • like_username (字符串, 可选): 按用户名模式模糊搜索
    • like_ip_address (字符串, 可选): 按 IP 地址模式模糊搜索

get_mqtt_client

  • 通过客户端 ID 获取特定 MQTT 客户端的详细信息
  • 输入:
    • clientid (字符串, 必须): 要检索的客户端的唯一标识符

kick_mqtt_client

  • 通过客户端 ID 从 MQTT 代理中断开一个客户端
  • 输入:
    • clientid (字符串, 必须): 要断开的客户端的唯一标识符

publish_mqtt_message

  • 在 EMQX Cloud 或自管理部署上向您的 EMQX 集群发布一条 MQTT 消息
  • 输入:
    • topic (字符串, 必须): 发布到的 MQTT 主题
    • payload (字符串, 必须): 要发布的消息内容
    • qos (数字, 可选): 服务质量级别 (0, 1 或 2) (默认: 0)
    • retain (布尔值, 可选): 是否保留消息 (默认: false)

设置 EMQX 集群

在使用 EMQX MCP 服务器工具之前,您需要设置一个 EMQX 集群,并正确配置 API 密钥和客户端认证。有几种选择:

  1. EMQX Cloud 无服务器部署:
  • 最简单的入门方式。
  • 从 EMQX Cloud 获取免费的无服务器部署
  • 在 EMQX Cloud 无服务器 注册
  1. EMQX Cloud 专用部署:
  • 为生产工作负载提供专用资源
  • 提供增强的性能、可靠性和自定义选项
  • 支持多种云提供商(AWS、GCP、Azure)
  • 包括专业 SLA 和支持
  • 在 EMQX Cloud 专用 创建部署
  1. 自托管 EMQX 平台:
  • 下载并在本地部署 EMQX 平台
  • 按照 EMQX 平台 上的安装说明操作

使用 Claude 桌面应用程序在本地运行

选项 1:通过 Smithery 安装

通过 Smithery 自动安装 emqx-mcp-server。

npx -y @smithery/cli install @Benniu/emqx-mcp-server --client claude

选项 2:Docker

  1. 如果还没有安装 Claude 桌面应用程序,请先进行安装。

  2. 拉取镜像:

    docker pull benniuji/emqx-mcp-server
    
  3. 将以下内容添加到您的 claude_desktop_config.json 文件中:

    • 在 MacOS 上:~/Library/Application\ Support/Claude/claude_desktop_config.json
    • 在 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"
          ]
        }
      }
    }
    

    注意:更新环境变量:EMQX_API_URL,EMQX_API_KEY,EMQX_API_SECRET

  4. 打开或重启 Claude 桌面应用程序

  5. 尝试让 Claude 对 MQTT 代理执行某些操作(例如,让它向某个主题发布一条 MQTT 消息)。

选项 3:手动安装

首先,确保已安装 uv 可执行文件。如果没有,可以按照 这里 的说明进行安装。

  1. 如果还没有安装Claude Desktop App,请先安装。
  2. 克隆此仓库。
  3. 将以下内容添加到您的 claude_desktop_config.json 文件中:
    • 在 MacOS 上: ~/Library/Application\ Support/Claude/claude_desktop_config.json
    • 在 Windows 上: %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>"
          }
        }
      }
    }
    
    注意:请确保将 path/to/repo/src/emqx_mcp_server 更新为实际路径,并根据您的 EMQX 实例修改环境变量 EMQX_API_URL、EMQX_API_KEY 和 EMQX_API_SECRET。
  4. 打开或重启 Claude Desktop App
  5. 试着让 Claude 对 MQTT 代理执行某些操作(例如,请求它向某个主题发布一条 MQTT 消息)。

示例提示

用户:

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?

用户:

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?

用户:

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.
- Bro…

相关 MCP Servers(来自「communication」)

【稳定版】12306MCP火车票服务

一个为大型语言模型(LLM)设计的、高可用的12306余票查询工具服务,现已搭载智能会话管理引擎。 12306-MCP-Server 将复杂的12306余票查询接口封装为符合 Model Context Protocol (MCP) 规范的工具集,允许AI Agent通过自然语言无缝查询实时火车票、中转换乘和经停站信息。 从 v1.0.0 版本开始,项目引入了全新的智能会话管理系统,通过会话池、动态User-Agent轮换和自动错误恢复机制,将服务的稳定性与反屏蔽能力提升至全新高度。

Alphar/Railway-Real-Time-MCP-Server

福昕Cloud-API

福昕PDF服务API提供了一个基于云的REST API,允许通过HTTP客户端处理PDF文件。它提供了丰富的功能,适合集成到各种应用程序中。 📌 主要特性: PDF创建与转换 从Word、Excel和PowerPoint等格式创建PDF文件。 将PDF文件转换为其他格式,包括HTML、Word和图像。 PDF合并与拆分 将多个PDF文件合并成一个文档。 将单个PDF文件拆分成多个文档。 PDF压缩与优化 通过图像压缩、文档展平和线性化来减小文件大小。 PDF安全 支持密码保护、权限控制和高级加密以确保文档安全。 如何快速与MCP(多功能云平台)集成? 📖 集成文档: 服务API集成指南: https://cloudapi.fuxinsoft.cn/zh-CN/docs/services/guide MCP初学者教程: https://cloudapi.fuxinsoft.cn/zh-CN/docs/services/mcp…

@Foxit/mcp-server-foxit-cloudapi

快递100 MCP Server

快递100 MCP Server提供快递信息查询、快递运费预估比价、快递时效查询(含发货前时效查询与在途动态时效查询)等功能。

kuaidi100/kuaidi100-mcp

墨刀AI-MCP

基于Model Context Protocol的原型生成功能服务,专注于HTML代码生成、设计描述生成和HTML导入功能。

mockingbot/modao-proto-mcp

数学精灵计算器

暂无描述。

stormcloud/math_genie_calc

思维导图 MCP

一个用于生成思维导图的 MCP (Model Context Protocol) 服务器。 看起来您的请求中没有提供具体的英文技术文档内容以供翻译。如果您能分享更多详细信息或具体段落,我将能够帮助您将其准确地翻译成中文,同时保留代码块、链接、格式结构和专业术语的准确性。请提供需要翻译的具体文本。

WEIAIb/mind-map-mcp

自动安装

点击按钮会唤起 PolarBear 客户端,并把当前 MCP Server 的 Markdown 详情文档地址传给客户端。

/api/mcps/benniu-emqx-mcp-server/markdown
打开 PolarBear 安装查看 Markdown 文档

手动安装

在 PolarBear 或其他支持 MCP 的客户端中,新建 MCP Server,并参考下方来源或安装提示配置。

npx -y @smithery/cli install @Benniu/emqx-mcp-server --client claude

基本信息

分类
communication / developer-tools / monitoring
运行方式
No
许可证
Apache License 2.0
详情文件
benniu-emqx-mcp-server.md