MCP.so
登录

Modbus MCP Server

@ezhuk

基本信息

分类

其他

许可证

MIT

传输方式

stdio

作者

ezhuk

关于 Modbus MCP Server

A Model Context Protocol (MCP) server for Modbus.

Modbus MCP Server 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

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

Modbus MCP Server 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

工具是从 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

常见问题

1

How do I install Modbus MCP?

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

2

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.

3

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.

4

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`.

5

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`.

评论

其他 分类下的更多 MCP 服务器