MCP.so
ログイン

Modbus Mcp

@ezhuk

Modbus Mcp について

A Model Context Protocol (MCP) server for Modbus.

基本情報

カテゴリ

その他

ライセンス

MIT

ランタイム

python

トランスポート

stdio

公開者

ezhuk

設定

以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。

{
  "mcpServers": {
    "modbus-mcp-ezhuk": {
      "command": "uv",
      "args": [
        "sync"
      ]
    }
  }
}

ツール

ツールは検出されませんでした

ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。

概要

What is Modbus MCP?

A lightweight Model Context Protocol (MCP) server that connects LLM agents to Modbus devices in a secure, standardized way, enabling seamless integration of AI-driven workflows with Building Automation (BAS) and Industrial Control (ICS) systems.

How to use Modbus MCP?

Install via uv add modbus-mcp (or pip install). Embed it in Python code with ModbusMCP().run(transport="http"), or run from the CLI with modbus-mcp or uvx modbus-mcp. Configure a default device via environment variables or a .env file, or define multiple devices in a devices.json file. The server exposes a Streamable HTTP endpoint at http://127.0.0.1:8000/mcp/.

Key features of Modbus MCP

  • Read registers via resource templates and tools
  • Write registers as atomic tool calls
  • Optional authentication via AuthKit provider
  • Interactive prompts for guided Modbus interactions
  • Named device configuration for multi-device setups
  • Docker deployment support

Use cases of Modbus MCP

  • Monitor real-time sensor data from Modbus devices
  • Actuate devices (e.g., valves, boilers) through LLM agents
  • Orchestrate complex automation tasks in BAS/ICS systems
  • Integrate AI agents with Programmable Logic Controllers (PLCs) and Modbus gateways

FAQ from Modbus MCP

How do I install Modbus MCP?

Use uv add modbus-mcp or pip install modbus-mcp. For ephemeral environments, run uvx modbus-mcp.

How do I configure a default Modbus device?

Set environment variables MODBUS_MCP_MODBUS__HOST, MODBUS_MCP_MODBUS__PORT, and MODBUS_MCP_MODBUS__UNIT, or add them to a .env file in the working directory.

How do I configure multiple devices?

Create a devices.json file in the working directory with an array of device objects, each having a name, host, port, and unit. Prompts can then refer to devices by name.

How do I run the server with Docker?

Run docker run -d --name modbus-mcp --restart=always -p 8080:8000 --env-file .env ghcr.io/ezhuk/modbus-mcp:latest.

How do I test the server with MCP Inspector?

Run npx @modelcontextprotocol/inspector and connect it to http://127.0.0.1:8000/mcp/ with transport set to Streamable HTTP.

コメント

「その他」の他のコンテンツ