MQTT MCP Server
MCP server for configuring MQTT brokers and sending business messages from AI clients
MQTT MCP Server is an open-source MCP server for industrial automation. It runs locally on your machine and is started by your AI client.
- Pricing
- Open source
- Platforms
- CLI, API, Linux
- Runs
- Locally
- What it can do
- Can delete data (2 tools)
- Version
- 1.0.0
- Listing updated
Similar MCP servers
Install
Add with the CLI
Run in a terminal
claude mcp add mqtt-mcp -- npx -y mqtt-mcp-serverAdd --scope user to use it in every project, or --scope project to share it in .mcp.json.
Or share it with your project
Add to .mcp.json
{
"mcpServers": {
"mqtt-mcp": {
"command": "npx",
"args": [
"-y",
"mqtt-mcp-server"
]
}
}
}Add to claude_desktop_config.json
{
"mcpServers": {
"mqtt-mcp": {
"command": "npx",
"args": [
"-y",
"mqtt-mcp-server"
]
}
}
}Settings → Developer → Edit Config, then quit and reopen Claude Desktop.
Add to ~/.cursor/mcp.json
{
"mcpServers": {
"mqtt-mcp": {
"command": "npx",
"args": [
"-y",
"mqtt-mcp-server"
]
}
}
}Use .cursor/mcp.json in a project to share it with the project.
Add to ~/.copilot/mcp-config.json
{
"mcpServers": {
"mqtt-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mqtt-mcp-server"
]
}
}
}Or put the same entry in .mcp.json at your workspace root to share it.
Add with the CLI
Run in a terminal
codex mcp add mqtt-mcp -- npx -y mqtt-mcp-serverOr add to config.toml
Add to ~/.codex/config.toml
[mcp_servers.mqtt-mcp]
command = "npx"
args = ["-y", "mqtt-mcp-server"]Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"mqtt-mcp": {
"command": "npx",
"args": [
"-y",
"mqtt-mcp-server"
]
}
}
}Gemini CLI and Antigravity
Gemini CLI
Add to ~/.gemini/settings.json
{ "mcpServers": { "mqtt-mcp": { "command": "npx", "args": [ "-y", "mqtt-mcp-server" ] } } }Or run: gemini mcp add -s user mqtt-mcp npx -- -y mqtt-mcp-server
Antigravity
Add to ~/.gemini/config/mcp_config.json
{ "mcpServers": { "mqtt-mcp": { "command": "npx", "args": [ "-y", "mqtt-mcp-server" ] } } }Use .agents/mcp_config.json to add it to one workspace only.
Devin Desktop (formerly Windsurf)
Add to ~/.config/devin/mcp_config.json
{ "mcpServers": { "mqtt-mcp": { "command": "npx", "args": [ "-y", "mqtt-mcp-server" ] } } }On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.
Cline
Add to cline_mcp_settings.json
{ "mcpServers": { "mqtt-mcp": { "command": "npx", "args": [ "-y", "mqtt-mcp-server" ] } } }Open it from the MCP Servers icon → Configure → Configure MCP Servers.
Zed
Add to Zed settings.json
{ "context_servers": { "mqtt-mcp": { "command": "npx", "args": [ "-y", "mqtt-mcp-server" ] } } }Open it with zed: open settings file. Merge context_servers into the settings you already have.
JetBrains AI Assistant and Junie
AI Assistant
Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add
{ "mcpServers": { "mqtt-mcp": { "command": "npx", "args": [ "-y", "mqtt-mcp-server" ] } } }Junie
Add to ~/.junie/mcp/mcp.json
{ "mcpServers": { "mqtt-mcp": { "command": "npx", "args": [ "-y", "mqtt-mcp-server" ] } } }Use .junie/mcp/mcp.json to share it with a project.
Kiro
Add to ~/.kiro/settings/mcp.json
{ "mcpServers": { "mqtt-mcp": { "command": "npx", "args": [ "-y", "mqtt-mcp-server" ] } } }Use .kiro/settings/mcp.json to add it to one workspace only.
Using several servers? Build one config file with the MCP config generator.
Configuration
MQTT_MCP_CONFIG_DIR连接配置存放目录,默认 ~/.mqtt-mcp(可选)
About MQTT MCP Server
Connection settings for one or more MQTT brokers are saved locally, so an AI client only has to name a connection once. After that, reusable message templates build topics and JSON payloads from variables, including nested fields, defaults, and generated values such as UUIDs and timestamps.
Daily use centres on a single send action that renders a saved template and publishes it, connecting automatically if needed. Raw publish, subscribe, unsubscribe and a buffered message reader are also exposed for lower-level work, with topic wildcards and TLS certificate input supported.
The server suits people wiring AI assistants into industrial or IoT setups who want device commands and status checks without handling broker addresses or message formats each time. The README is written in Chinese and the server runs over stdio through npx or a global npm install.
Tools this server provides (13)
Taken from the project documentation; the running server may differ.
From the tool list in its README, going by the names, 2 of 13 tools delete data and 2 change data; 9 names don't say.
From the server's own tool labels and tool names; not verified by us.
- mqtt_configure
- Create or update a named connection configuration and persist it
- mqtt_connections
- View connection configurations and live status without passwords
- mqtt_connect
- Establish a named connection
- mqtt_disconnect
- Disconnect while keeping the configuration
- mqtt_remove_connectionName suggests: deletes
- Delete a connection configuration
- mqtt_publishName suggests: changes
- Publish a raw message
- mqtt_subscribe
- Subscribe to a topic with + and # wildcards
- mqtt_unsubscribe
- Cancel a subscription
- mqtt_messages
- Read received messages with filters and optional clearing
- mqtt_template_save
- Define or update a business message template
- mqtt_templates
- List all templates and their required variables
- mqtt_sendName suggests: changes
- Send a message rendered from a business template
- mqtt_template_removeName suggests: deletes
- Delete a business template
What it does
- Saved broker connections
- Named connection profiles with host, port, credentials and TLS options persist between sessions.
- Reusable message templates
- Topics and payload bodies are defined once with variable placeholders and validation for missing values.
- One-step sending
- A single send call renders a template and publishes it, connecting first when required.
- Raw pub/sub tools
- Direct publish, subscribe and unsubscribe operations support wildcard topic filters.
- Buffered message reading
- Received messages are kept in a per-connection buffer of up to 500 entries and can be filtered by topic or time.
- Placeholder syntax
- Templates support nested paths, default values, typed substitution and built-in variables for time and UUIDs.
Good for
- Send device control commands from an AI assistant to IoT hardware
- Read status messages published by factory equipment
- Publish standard business event messages without rebuilding topic strings
- Switch between several brokers or environments by named connection
Pricing
Open source
MQTT MCP Server FAQ
How are broker credentials stored?
Passwords are saved in plain text in a local config file, so the README advises restricting that file's permissions.
Can TLS connections be used?
Yes. The mqtts and wss protocols are supported, with CA, certificate and key values passed as PEM content, and self-signed certificates can be accepted.
What is needed to run MQTT MCP Server?
Node.js 18 or later. It can be launched with npx or installed globally from npm.
Is MQTT MCP Server free?
Yes. MQTT MCP Server is open source, so you can use and self-host it for free.
How do I add MQTT MCP Server to Claude Code?
Run this command in your terminal: claude mcp add mqtt-mcp -- npx -y mqtt-mcp-server
What are the best alternatives to MQTT MCP Server?
The closest alternatives to MQTT MCP Server are MQTT, OPC-UA MCP Server and Sparkplug B.
Where this comes from
- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.