modbus-tap
Read-only Modbus-TCP telemetry via the ot-aiops MCP server. Preview — validated against a mocked pymodbus client, NOT live PLCs.
When to use
- A PLC speaking Modbus-TCP (
host:502,unit_id), incl. domestic 国产 PLCs. - Read registers/coils; classify registers against thresholds.
When NOT to use (routing)
- OPC-UA →
opcua-tap; Siemens S7 →s7-tap; Mitsubishi →mc-tap; CNC →mtconnect-tap; MQTT/UNS →sparkplug-tap; cross-protocol triage →industrial-diagnostics. - IT/network devices, Kubernetes, hypervisors, backups → not this tool.
Tools
| Tool | Params | Returns |
|---|---|---|
modbus_read_holding |
address, endpoint?, count=1, decode="uint16" |
{raw_registers, decoded[...]} |
modbus_read_input |
address, endpoint?, count=1, decode="uint16" |
{raw_registers, decoded[...]} |
modbus_read_coils |
address, endpoint?, count=1 |
{bits[bool,...]} |
modbus_read_discrete |
address, endpoint?, count=1 |
{bits[bool,...]} |
modbus_health_summary |
endpoint?, addresses[]?, thresholds?, register_type="holding" |
{overall, counts, offenders[...]} |
Registers are untyped 16-bit words; pick decode. Word order is big-endian.
Example
modbus_read_holding(address=0, endpoint="plc2", count=2, decode="float32")
→ {"address":0,"count":2,"decode":"float32","decoded":[20.0]}
Setup
ot-aiops init (add a modbus endpoint) · ot-aiops doctor · ot-aiops mcp.
Safety
Read-only (FC05/06/15/16 writes are NOT implemented). Device text sanitized; secrets never returned. 缺功能提 issue/PR 欢迎留言.
