MCP IoT Gateway
The MCP IoT Gateway is Conduit's multi-protocol industrial translator. It uses the Model Context Protocol (MCP) to dynamically connect to multiple industrial protocols through a single gateway, eliminating the need for separate translators per protocol.
Overview
The MCP IoT Gateway supports:
- Modbus TCP/RTU: PLCs, sensors, meters, and field instruments
- Siemens S7: S7-300, S7-400, S7-1200, and S7-1500 PLCs
- EtherNet/IP: Rockwell/Allen-Bradley ControlLogix and CompactLogix
- BACnet/IP: Building automation systems, HVAC, smart buildings
How It Works
Unlike traditional translators that connect to a single protocol, the MCP IoT Gateway:
- Receives queries via MCP Mesh Transport from the Control Plane
- Dynamically routes to the appropriate protocol handler
- Translates queries to native protocol operations (Modbus register reads, S7 data block reads, etc.)
- Returns normalized results in a standard format
Prerequisites
- Network Access: TCP connectivity to target industrial devices
- Device Documentation: Register maps, data block definitions, or point lists
- MCP Gateway Service: Running as a Docker container or native process
Configuration
Basic Configuration
translator:
type: mcp-iot-gateway
name: gateway-plant-1
controlPlane:
url: nats://nats:4222
apiKey: ${GATEWAY_API_KEY}
protocols:
modbus:
enabled: true
s7:
enabled: true
ethernet-ip:
enabled: true
bacnet:
enabled: true
Modbus Devices
devices:
- name: vfd-pump-room
protocol: modbus
connection:
type: tcp
host: 192.168.1.50
port: 502
unitId: 1
registers:
- name: Tank1_Temperature
address: 40001
type: holding
dataType: float32
byteOrder: big-endian
unit: "°F"
- name: Tank1_Level
address: 40003
type: holding
dataType: uint16
scale: 0.1
unit: "%"
- name: Pump1_Running
address: 00001
type: coil
dataType: bool
Siemens S7 Devices
devices:
- name: s7-line1
protocol: s7
connection:
host: 192.168.1.100
rack: 0
slot: 1
type: s7-1500
dataBlocks:
- db: 1
name: ProcessData
variables:
- name: Temperature
offset: 0
type: real
- name: Pressure
offset: 4
type: real
- name: Running
offset: 8.0
type: bool
EtherNet/IP Devices
devices:
- name: compactlogix-line2
protocol: ethernet-ip
connection:
host: 192.168.1.200
slot: 0
tags:
- name: Line2_Speed
path: "Program:MainProgram.Line2_Speed"
type: real
- name: Line2_Count
path: "Program:MainProgram.Line2_Count"
type: dint
BACnet Devices
devices:
- name: hvac-building1
protocol: bacnet
connection:
host: 192.168.1.150
port: 47808
deviceId: 1234
objects:
- name: Zone1_Temperature
type: analog-input
instance: 1
property: present-value
- name: AHU1_Status
type: binary-input
instance: 10
property: present-value
Polling Configuration
Group-Based Polling
pollGroups:
- name: fast
interval: 100 # ms
devices: [vfd-pump-room, s7-line1]
tags: [Temperature, Pressure, Running]
- name: normal
interval: 1000
devices: [compactlogix-line2]
tags: [Speed, Count]
- name: slow
interval: 10000
devices: [hvac-building1]
tags: [Zone1_Temperature, AHU1_Status]
Query Translation
NQE queries are routed to the MCP IoT Gateway when they reference devices connected through it:
Show temperature for Tank 1 over the last hour
The gateway:
- Identifies Tank1_Temperature is on the Modbus device
vfd-pump-room - Reads holding register 40001 (float32)
- Returns the scaled, engineering-unit value
For historical queries, the gateway maintains a local buffer of recent readings that can be queried.
Connection Management
Reconnection
connection:
reconnect:
enabled: true
interval: 5000 # ms
maxAttempts: -1 # Infinite
timeout:
connect: 5000 # ms
read: 3000
Troubleshooting
Connection Issues
Modbus Connection Refused
- Verify IP and port
- Check firewall rules
- Confirm device is powered on and unit ID is correct
S7 Communication Error
- Verify rack/slot configuration
- Check PLC is in RUN mode
- Confirm network route to PLC
EtherNet/IP Timeout
- Verify slot number
- Check controller is online
- Confirm CIP routing path
Data Issues
Incorrect Values
- Check byte order configuration (Modbus)
- Verify data type matches device documentation
- Check scaling configuration
Example Deployment
version: "3.8"
services:
conduit-mcp-gateway:
image: conduit/mcp-iot-gateway:latest
environment:
- CONDUIT_CONTROL_PLANE=nats://nats:4222
- GATEWAY_API_KEY=${GATEWAY_API_KEY}
volumes:
- ./config/gateway.yaml:/etc/conduit/gateway.yaml
networks:
- plant-network
# Ensure access to industrial network
extra_hosts:
- "plc1:192.168.1.50"
- "plc2:192.168.1.100"
Next Steps
- Splunk Translator - Connect to Splunk
- MQTT Translator - Subscribe to MQTT
- Architecture - How translators work