Modbus Mcp
@ezhuk
关于 Modbus Mcp
A Model Context Protocol (MCP) server for Modbus.
基本信息
配置
使用下面的配置,将此服务器添加到你的 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.
其他 分类下的更多 MCP 服务器
🚀 Model Context Protocol (MCP) Curriculum for Beginners
microsoftThis open-source curriculum introduces the fundamentals of Model Context Protocol (MCP) through real-world, cross-language examples in .NET, Java, TypeScript, JavaScript, Rust and Python. Designed for developers, it focuses on practical techniques for building modular, scalable,
XcodeBuildMCP
cameroncookeA Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
Inbox Zero AI MCP
elie222The world's best AI personal assistant for email. Open source app to help you reach inbox zero fast.
MCP Toolbox for Databases
googleapisMCP Toolbox for Databases is an open source MCP server for databases.
Awesome Mcp Servers
punkpeyeA collection of MCP servers.
评论