IoT

Provides an API surface for sensors, actuators, alarms, PLCs, and time-series data enabling AI-driven orchestration.
  • python

4

GitHub Stars

python

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs

You can deploy and operate an IoT/Edge MCP Server to orchestrate industrial automation using AI agents. It exposes a unified HTTP endpoint surface for sensors, actuators, alarms, PLCs, and time-series data, enabling AI-driven control, monitoring, and optimization across industrial environments. You can run in simulation mode for testing, or in production with real devices and services.

How to use

You will connect an MCP client (such as PolyMCP) to the MCP server via the HTTP endpoint at the MCP URL. You can then ask the AI to read sensors, query historical data, control actuators, manage alarms, interact with PLC registers, and monitor the overall system health. Use natural language prompts to orchestrate multi-step workflows like checking all temperature sensors, validating pressure trends, opening a valve and starting a pump, or generating an end-of-shift report. The MCP server exposes a consistent set of tools that your AI agent can invoke to perform these actions.

To start interacting, ensure the server is reachable at the default MCP HTTP surface (for example http://localhost:8000/mcp) and that your AI agent is configured to use that URL. You can list available tools, then invoke the ones you need to compose higher-level automation flows. You can also monitor active alarms and review system status to respond to incidents quickly.

How to install

Prerequisites: Python 3.8 or newer, and necessary services when running in production (MQTT broker, InfluxDB, Redis). You will also need a client to connect to the MCP server (for example PolyMCP). Follow the steps to set up a local development environment, then start the MCP server in simulation or production mode.

# Clone the MCP server repository
git clone https://github.com/llm-use/iot-mcp-server.git
cd iot-mcp-server

# Install dependencies for production
pip install -r requirements.txt

# Optional: prepare simulation dependencies
pip install -r requirements-sim.txt

# For simulation mode (no hardware required)
python IoT_mcp_sim.py

# For production mode (with real hardware)
# Configure devices in iot_config.yaml, then start required services
# (MQTT, InfluxDB, Redis)
docker-compose up -d

# Start the MCP server
python IoT_mcp.py

# Server will start on http://localhost:8000

Configuration and startup notes

Basic configuration for the server is provided in the iot_config.yaml file. This includes MQTT broker settings, Modbus device definitions, InfluxDB connection, and Redis caching. You can tailor these values to your environment before starting the server in production.

mqtt:
  broker: "localhost"
  port: 1883
  username: "iot_user"
  password: "secure_password"

modbus:
  devices:
    - device_id: "plc_01"
      name: "Main PLC"
      type: "tcp"
      host: "192.168.1.100"
      port: 502

influxdb:
  url: "http://localhost:8086"
  token: "your-token"
  org: "iot"
  bucket: "sensors"

redis:
  host: "localhost"
  port: 6379

Troubleshooting and tips

If you cannot connect to the MQTT broker, verify that the broker is running and that the credentials in the configuration match. For Modbus, ensure the PLC is reachable and Modbus is enabled on the device. If sensor data is missing, confirm that sensors are publishing data to the configured MQTT topics and that the Redis cache is populated.

Common startup issue: when using production mode, ensure the dependent services (MQTT, InfluxDB, Redis) are running before starting the MCP server. Use docker-compose up -d to bring up the services, then start the Python server with the appropriate command.

Notes

This MCP server is designed to work with an AI orchestration framework to enable natural-language control, multi-step automation, and real-time monitoring across industrial systems.

Available tools

read_sensor

Read the current value from a single sensor.

read_multiple_sensors

Batch read multiple sensors in a single operation.

get_sensor_history

Retrieve historical sensor data with optional aggregations.

execute_actuator_command

Send commands to actuators such as valves, motors, and pumps.

get_device_topology

View the complete system topology and device relationships.

list_devices

List all registered devices with their status.

get_system_status

Provide overall system health and statistics.

get_active_alarms

Return currently active alarms by priority.

acknowledge_alarm

Acknowledge and clear alarms.

read_modbus_registers

Read PLC registers via Modbus.

write_modbus_register

Write values to PLC registers.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational