Skip to main content
Glama

emqx-mcp-server

by Benniu

EMQX MCP サーバー

EMQX MQTTブローカーとの連携を可能にするモデルコンテキストプロトコル(MCP)サーバー実装。MCPクライアントがEMQX Cloudまたはセルフホスト型クラスター上のMQTTクラスターと連携できるようにします。

特徴

MQTTクライアント管理

  • クライアントリスト: 柔軟なフィルタリングオプションを使用して、接続されているすべての MQTT クライアントを表示します。
  • クライアント情報: 特定のクライアントに関する詳細情報を取得します
  • 接続制御: 問題のあるクライアントや古いクライアントをブローカーから切断します
  • 柔軟なフィルタリング: ノード、ユーザー名、クライアント ID、接続状態などでクライアントをフィルタリングします。

MQTT メッセージパブリッシング

  • トピックベースのパブリッシング:任意のMQTTトピックにメッセージを送信します
  • QoS制御: 信頼性の高い配信のためにサービス品質レベル(0、1、または2)を選択します。
  • メッセージの保持: 新規購読者へのメッセージを保持するオプション
  • カスタムペイロード: あらゆるメッセージコンテンツ形式をサポート

ツール

リスト_mqtt_クライアント

  • EMQX クラスターに接続されている MQTT クライアントを一覧表示します
  • 入力:
    • ページ(数値、オプション):ページ番号(デフォルト:1)
    • 制限(数値、オプション):1ページあたりの結果数(デフォルト:100、最大10000)
    • node (文字列、オプション): 特定のノード名でフィルタリング
    • clientid (文字列、オプション): 特定のクライアントIDでフィルタリング
    • ユーザー名(文字列、オプション):特定のユーザー名でフィルタリング
    • 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_メッセージ

  • EMQX クラウドまたはセルフマネージド デプロイメント上の EMQX クラスターに MQTT メッセージをパブリッシュする
  • 入力:
    • topic (文字列、必須): 公開先のMQTTトピック
    • ペイロード(文字列、必須): 公開するメッセージの内容
    • qos (数値、オプション): サービス品質レベル (0、1、または 2) (デフォルト: 0)
    • retain(ブール値、オプション):メッセージを保持するかどうか(デフォルト:false)

EMQXクラスターのセットアップ

EMQX MCPサーバーツールを使用する前に、APIキーとクライアント認証を適切に設定したEMQXクラスターをセットアップする必要があります。いくつかのオプションがあります。

  1. EMQX クラウド サーバーレス デプロイメント:
  • 始めるのに最も簡単な方法。
  • EMQX Cloudから無料のサーバーレスデプロイメントを入手する
  • EMQX Cloud Serverlessにサインアップ
  1. EMQX クラウド専用展開:
  • 本番環境のワークロードに専用のリソースを提供する
  • 強化されたパフォーマンス、信頼性、カスタマイズオプションを提供
  • さまざまなクラウドプロバイダー(AWS、GCP、Azure)をサポート
  • プロフェッショナルなSLAとサポートが含まれています
  • EMQX Cloud Dedicatedでデプロイメントを作成する
  1. セルフホスト型 EMQX プラットフォーム:
  • EMQXプラットフォームをローカルにダウンロードして展開する
  • EMQXプラットフォームのインストール手順に従ってください。

Claudeデスクトップアプリでローカルで実行する

オプション1: Smithery経由でインストールする

Smithery経由で Claude Desktop 用の 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_URLEMQX_API_KEYEMQX_API_SECRETを更新してください。

  4. Claudeデスクトップアプリを開くか再起動する
  5. Claude に MQTT ブローカーで何かを実行するように依頼してみてください (たとえば、トピックに MQTT メッセージを公開するように依頼します)。

オプション3: 手動インストール

まず、 uv実行ファイルがインストールされていることを確認してください。まだインストールされていない場合は、こちらの手順に従ってインストールできます。

  1. Claude デスクトップ アプリをまだインストールしていない場合はインストールしてください。
  2. このリポジトリをクローンします。
  3. claude_desktop_config.jsonファイルに次の内容を追加します。
    • MacOSの場合: ~/Library/Application\ Support/Claude/claude_desktop_config.json
    • Windowsの場合: %APPDATA%/Claude/claude_desktop_config.json GXP4

    注意: path/to/repo/src/emqx_mcp_server実際のパスに更新し、環境変数EMQX_API_URLEMQX_API_KEY 、およびEMQX_API_SECRETを EMQX インスタンスに合わせて変更してください。

  4. Claudeデスクトップアプリを開くか再起動する
  5. Claude に MQTT ブローカーで何かを実行するように依頼してみてください (たとえば、トピックに MQTT メッセージを公開するように依頼します)。

プロンプトの例

ユーザー:

Please list the clients connected to the MQTT broker.

法学修士:

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.

法学修士:

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.

法学修士:

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?

ユーザー:

Please kick out the client mqttx_2232bdb1

法学修士

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?

ライセンス

このプロジェクトは、Apache License バージョン 2.0 に基づいてライセンスされています。詳細については、 LICENSEファイルを参照してください。

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

EMQX MQTT ブローカーとの対話を提供するモデル コンテキスト プロトコル (MCP) サーバー実装。

  1. 特徴
    1. MQTTクライアント管理
    2. MQTT メッセージパブリッシング
  2. ツール
    1. リスト\mqtt\クライアント
    2. get\_mqtt\_client
    3. kick\_mqtt\_client
    4. publish\mqtt\メッセージ
  3. EMQXクラスターのセットアップ
    1. Claudeデスクトップアプリでローカルで実行する
      1. オプション1: Smithery経由でインストールする
      2. オプション2: Docker
      3. オプション3: 手動インストール
    2. プロンプトの例
      1. ライセンス

        Related MCP Servers

        • -
          security
          F
          license
          -
          quality
          A Model Context Protocol (MCP) server implementation for interacting with Phabricator API. This server allows LLMs to interact with Phabricator through a standardized interface.
          Last updated -
          5
          Python
        • A
          security
          F
          license
          A
          quality
          A Model Context Protocol (MCP) server that provides a simple sleep/wait tool, useful for adding delays between operations such as waiting between API calls or testing eventually consistent systems.
          Last updated -
          1
          6
          7
          JavaScript
        • A
          security
          A
          license
          A
          quality
          An educational implementation of a Model Context Protocol server that demonstrates how to build a functional MCP server for integrating with various LLM clients like Claude Desktop.
          Last updated -
          1
          88
          Python
          MIT License
          • Apple
          • Linux
        • -
          security
          -
          license
          -
          quality
          A Model Context Protocol (MCP) server that interacts with system APIs, allowing users to check connections, search employees, register breakfast, and update chemical information by shifts.
          Last updated -
          2

        View all related MCP servers

        MCP directory API

        We provide all the information about MCP servers via our MCP API.

        curl -X GET 'https://glama.ai/api/mcp/v1/servers/Benniu/emqx-mcp-server'

        If you have feedback or need assistance with the MCP directory API, please join our Discord server