mcp2mqtt

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

Visit mcp2mqtt

How to install and configure mcp2mqtt

  1. Ensure Python and uv are installed on your system. 2. Create a configuration file named 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.

What you can do with mcp2mqtt

  • Adjusting hardware PWM duty cycles and frequencies on microcontrollers using natural language commands in Claude Desktop or Cline. - Toggling embedded actuators, relay switches, and LED indicator lights through structured publish and subscribe MQTT topics. - Retrieving real-time hardware status, telemetry, and system information payloads from remote IoT devices and edge nodes. - Testing and validating hardware communication workflows locally using the included Python device simulator script before physical deployment. - Managing multiple microcontrollers simultaneously by defining distinct configuration profiles and launching dedicated MCP server instances for each.

Key facts

  • https://github.com/mcp2everything/mcp2mqtt
  • Cloud & Infrastructure, Other & General Purpose
  • automation, iot, messaging, mqtt, pwm

Part of MCP Servers

Related MCP servers

  • MCP KQL Server — MCP KQL Server is an MCP server that connects AI assistants to Azure Data Explorer clusters using Azure CLI authentication.…
  • MCP Media Player — MCP Media Player is an MCP server that exposes playback controls for Home Assistant media players to AI agents. It…
  • MCP Marvel Rivals — MCP Marvel Rivals is an MCP server that provides access to Marvel Rivals game data through a standardized interface. It…
  • MCP Kubernetes Server — MCP Kubernetes Server is an MCP server that provides tools for managing and inspecting Kubernetes clusters directly through Large Language…
  • MCP Notify Server — MCP Notify Server is an MCP server that sends desktop notifications accompanied by audio alerts when AI agents complete tasks.…
  • MCP Notification Server — MCP Notification Server is an MCP server that sends periodic notifications at fixed intervals of every 10 seconds. Built around…

What is mcp2mqtt?

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.

Which MCP clients work with mcp2mqtt?

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.

Which MQTT brokers are supported?

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.

Can I test mcp2mqtt without physical hardware?

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.

  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories