Get the FREE Ultimate OpenClaw Setup Guide →

IoT-Edge

MCP server for Industrial IoT, SCADA and PLC systems. Unifies MQTT sensors, Modbus devices and industrial equipment into a single AI-orchestrable API. Features real-time monitoring, alarms, time-series storage and actuator control.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio poly-mcp-iot-edge-mcp-server python IoT_mcp.py \
  --env IOT_ENV="production or development (override as needed)" \
  --env API_KEYS="JSON string of API keys, e.g. {"admin":"key"}" \
  --env AUDIT_HMAC_KEY=" HMAC key for audit trail" \
  --env ENCRYPTION_KEY=" Fernet key (base64-encoded)" \
  --env JWT_SECRET_KEY="your-secret-key" \
  --env ALLOWED_IP_RANGES="CIDR ranges allowed to access the API" \
  --env MQTT_COMMAND_HMAC_KEY="HMAC key for MQTT commands"

How to use

IoT-Edge is a production-grade MCP server designed for Industrial IoT and edge ecosystems. It exposes a unified tool interface over HTTP via FastAPI and integrates MQTT, Modbus, InfluxDB, and Redis to provide real-time sensing, historical queries, actuator control, and PLC interactions. Running in production enables authentication, access control, encryption, and auditable logging to ensure safe operation in industrial environments. Use the MCP HTTP API to list available tools and invoke them, then leverage PolyMCP-enabled agents to orchestrate your devices through natural language commands. The included simulation path allows you to test with virtual sensors and actuators before connecting real hardware.

How to install

Prerequisites:

  • Python 3.8+ (3.9+ recommended)
  • Git
  • Optional: virtual environment tools (venv)

Step-by-step:

  1. Clone the repository: git clone https://github.com/yourusername/iot-mcp-server.git cd iot-mcp-server

  2. Create and activate a virtual environment: python -m venv venv

    macOS/Linux

    source venv/bin/activate

    Windows

    venv\Scripts\activate

  3. Install dependencies: pip install -r requirements.txt

  4. Configure environment variables (example): export IOT_ENV=production export JWT_SECRET_KEY=$(python -c "import secrets; print(secrets.token_urlsafe(32))") export ENCRYPTION_KEY=$(python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())") export AUDIT_HMAC_KEY=$(python -c "import secrets; print(secrets.token_urlsafe(32))") export MQTT_COMMAND_HMAC_KEY=$(python -c "import secrets; print(secrets.token_urlsafe(32))") export ALLOWED_IP_RANGES="10.0.0.0/8,192.168.0.0/16" export API_KEYS='{"admin":"your-secure-api-key"}'

  5. Run the server: python IoT_mcp.py

  6. Optional: verify simulation mode (no hardware): python IoT_mcp_sim.py

Notes:

  • The project uses Pydantic v2 APIs; ensure compatible package versions as listed in requirements.txt.

Additional notes

Tips and common considerations:

  • Production mode is optional with MQTT, InfluxDB, Redis, and Modbus devices; you can operate in simulation mode without external dependencies.
  • Ensure API key authentication and JWT tokens are properly configured to enforce access control.
  • Use the MCP HTTP API endpoints at /mcp/list_tools, /mcp/invoke/{tool_name}, and /health for operational checks.
  • If you enable TLS for MQTT or expose the API, rotate keys regularly and monitor audit trails for tampering.
  • When integrating with PolyMCP, you can pair this server with various LLM providers (OpenAI, Ollama, Claude, etc.) through the standard UnifiedPolyAgent interface.

Related MCP Servers

Sponsor this space

Reach thousands of developers ↗