IoT s
A comprehensive Model Context Protocol (MCP) server that provides Internet of Things (IoT) device integration for AI assistants like Claude Desktop and Cursor IDE. This server enables AI to read sensor data from IoT devices and dispatch data collection tasks to IoT devices through a unified interface.
claude mcp add --transport stdio duke-cei-center-iot-mcp-servers uvx iot-mcp-server
How to use
The IoT MCP Server provides a unified Model Context Protocol interface to read real-time sensor data from IoT devices and to dispatch data collection tasks across multiple communication protocols (MQTT, HTTP REST, CoAP, and custom protocols). It supports discovering devices on the network, streaming live sensor values, applying data filters and transformations, and triggering data collection tasks with configurable intervals and durations. This makes it suitable for AI assistants to query current readings, orchestrate data gathering tasks, and monitor device health and activity in real time. The server is designed to be used with Python-based tooling via uv for dependency management, and it exposes a consistent MCP interface for Claude Desktop, Cursor IDE, or other MCP clients to send natural language prompts that translate into device reads or task configurations.
To use its capabilities, connect your MCP client to the IoT MCP Server, and take advantage of the following tools: sensor data reading commands that fetch current values across registered devices, task management to schedule periodic data collection with parameters like interval and duration, and real-time monitoring streams that provide ongoing sensor outputs and device status. You can also rely on device discovery to automatically register devices as they come online, and apply filters to narrow down data (e.g., by sensor type or location) or set up alerts when thresholds are exceeded. Typical workflows include asking for current readings (temperature, humidity, etc.), deploying a data collection task for a specific device, and monitoring motion or other event sensors with alert triggers.
How to install
Prerequisites
- Python 3.8+
- uv (Python package manager) for dependency management
Installation steps
- Prerequisites verification
bash --version
python3 --version
- Install uv (if not already installed) macOS/Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh
Windows:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Alternative installation methods (optional):
pip install uv
- Initialize and set up the MCP server project
# Initialize uv project (if not already done)
uv init .
# Add MCP dependencies (CLI tools for MCP)
uv add "mcp[cli]"
- Run or configure the MCP server
# Run the server (depending on how the project is structured, this may start the MCP server directly or build/run a module)
# Example, if there is a runnable entry point:
uv run iot-mcp-server
- Verify installation
uv --version
Clone the repository (optional for development)
git clone [PLACEHOLDER_REPOSITORY_URL]
cd iot-mcp-server
Notes
- The project uses uv for dependency management; running the server will automatically install Python dependencies as needed.
- Ensure your environment variables (if any) are configured before starting the server.
Additional notes
Tips and common considerations:
- Environment: Ensure IoT devices and the MCP server are reachable on the same network or properly bridged if using multiple subnets.
- Security: Use authentication for device communications (MQTT credentials, API keys for HTTP/REST endpoints), and enable encrypted communication where available.
- Configuration: Typical MCP settings include device discovery options, data filtering rules, task interval/duration, and alert thresholds. Keep configuration JSON or YAML organized under a config directory and version-controlled.
- Troubleshooting: Check MCP server logs for startup errors, device discovery issues, or protocol mismatches. Use curl/mosquitto_sub to validate device endpoints and broker reachability.
- Common pitfalls: Ensure Python path and uv are correctly installed; verify that the MCP server entry point matches how you invoke uv run. If using multiple protocols, ensure broker addresses, REST endpoints, and CoAP servers are reachable and properly authenticated.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP