Modbus Mcp
@ezhuk
About Modbus Mcp
A Model Context Protocol (MCP) server for Modbus.
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"modbus-mcp-ezhuk": {
"command": "uv",
"args": [
"sync"
]
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
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.
Frequently asked questions
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`.
Basic information
More Other MCP servers
ICSS
chokcoco不止于 CSS
Reactive Resume
amruthpillaiA one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!
🚀 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,

DeepMark
DeepMark helps teachers deliver rapid, consistent marking with meaningful feedback for every student — in a fraction of the time. What once took a week, now takes one free period.

Lemon.io
lemon-ioRequest dedicated senior developers to work on your project, write job descriptions, and prep technical interviews — all without leaving your Claude chat. Just describe what you need, and Lemon.io MCP does the rest. 1–3
Comments