mcp2mqtt is an MCP server that bridges Model Context Protocol clients with Internet of Things devices and hardware controllers over MQTT broker networks. It connects large language model interfaces to MQTT message brokers such as Mosquitto or EMQ X, enabling developers, IoT engineers, and hardware hobbyists to interact with microcontrollers and embedded peripherals directly from an AI interface. Users can issue natural language instructions to publish MQTT messages, listen to status topics, and query device telemetry. The server supports configurable command mappings, Quality of Service settings, and payload handling for microcontrollers like Raspberry Pi Pico or custom hardware boards. It allows AI models to translate prompt requests into structured text payloads, enabling precise hardware interactions such as adjusting pulse-width modulation signals, toggling LED states, or reading sensor values. By handling connection keepalives, message routing, and topic subscriptions, mcp2mqtt simplifies the process of integrating physical computing platforms into standard desktop AI workflows.
Category: Cloud & Infrastructure
Tags: automation, iot, messaging, mqtt, pwm
config.yaml in your user directory (for example, ~/.mcp2mqtt/config.yaml on macOS/Linux or %USERPROFILE%\.mcp2mqtt\config.yaml on Windows) specifying your MQTT broker host, port, credentials, and topic paths. 3. Add the server configuration to your Claude Desktop or Cline JSON configuration file: json { "mcpServers": { "mcp2mqtt": { "command": "uvx", "args": [ "mcp2mqtt" ] } } } 4. Restart your Claude Desktop or Cline client to apply the changes.Part of MCP Servers
mcp2mqtt is a Model Context Protocol server that links AI assistant clients to MQTT message brokers. It allows AI models to send control commands and read operational status from IoT hardware like microcontrollers, LEDs, and PWM devices.
mcp2mqtt works with standard MCP clients including Claude Desktop, Cline, and Continue. Any client that complies with the Model Context Protocol specification can interact with the server to issue commands and receive topic responses.
The server supports standard MQTT protocol brokers including Mosquitto and EMQ X. It accommodates typical MQTT configurations such as custom host addresses, ports, client IDs, credentials, and custom Quality of Service levels.
Yes. The repository includes a device simulator script located at tests/responder.py. Running this simulator script connects to your MQTT broker and responds to PWM, LED, and system info commands without requiring physical microcontroller hardware.