Modbus MCP Server
An MCP server that standardizes and contextualizes Modbus data, enabling seamless integration of AI agents with industrial IoT systems.
Features
- Modbus Tools:
- Read/write holding registers (
read_register,write_register). - Read/write coils (
read_coils,write_coil). - Read input registers (
read_input_registers). - Read multiple holding registers (
read_multiple_holding_registers).
- Read/write holding registers (
- Prompt: Analyze Modbus register values with a customizable prompt (
analyze_register). - Flexible Connections: Supports Modbus over TCP, UDP, or serial, configured via environment variables.
Requirements
- Python: 3.10
- uv for dependency and virtual environment management.
Installation
Install
uv:curl -LsSf https://astral.sh/uv/install.sh | shClone the Repository:
git clone https://github.com/kukapay/modbus-mcp.git cd modbus-mcpInstall Dependencies:
uv sync
Configuration
The server connects to a Modbus device using parameters specified via environment variables. Set these variables in a .env file or your shell environment.






