← Package Index
mcp-mqtt mcp
v1.0.1 · MCP Tool · iot · registry.pascalai.org
MQTT broker management via HTTP REST API. Supports EMQX HTTP API v5 (default) and HiveMQ REST API.
mqtt iot messaging pubsub broker emqx
Input Parameters
Parameter Type Description
operationrequired
string
Operation to perform. One of: publish, list_clients, get_client, disconnect_client, list_subscriptions, list_topics, get_topic, list_rules, get_broker_info, list_nodes.
baseUrlrequired
string
Broker HTTP API base URL (e.g. http://localhost:18083 for EMQX, http://localhost:8888 for HiveMQ).
apiKeyoptional
string
API key (used as username in Basic auth together with apiSecret).
apiSecretoptional
string
API secret (used as password in Basic auth together with apiKey).
bearerTokenoptional
string
Bearer token for Authorization header (takes priority over apiKey/apiSecret).
brokerTypeoptional
string
Broker type: emqx (default) or hivemq. One of: emqx, hivemq. Default: emqx.
topicNameoptional
string
MQTT topic name. Required for: publish, get_topic.
payloadoptional
string
Message payload. Required for: publish.
qosoptional
integer
QoS level: 0, 1 or 2 (default: 0). One of: 0, 1, 2. Default: 0.
retainoptional
boolean
Retain flag for publish (default: false). Default: False.
clientIdoptional
string
MQTT client ID. Required for: get_client, disconnect_client.
pageSizeoptional
integer
Page size for list operations (default: 100). Default: 100.
Output Fields
Field Type Description
ok
boolean
status
integer
data
object
error
string
Examples
Publish a sensor reading
// Input
{
"operation": "publish",
"baseUrl": "http://localhost:18083",
"topicName": "sensors/temp",
"payload": "{\"value\":22.5}"
}
// Output
{
"ok": true
}
List connected clients
// Input
{
"operation": "list_clients",
"baseUrl": "http://localhost:18083"
}
// Output
{
"ok": true
}
Install & Discovery
Install
ppm install mcp-mqtt
Get JSON Schema
GET /v1/packages/mcp-mqtt/1.0.1/schema
Discover by keyword
GET /v1/mcp/discover?q=mqtt
Discovery hint: Install with ppm install mcp-mqtt or invoke remotely via POST /v1/invoke/mcp-mqtt on the MCP Service.
PascalAI Usage
uses toolslib;
var Tool := LoadTool('mcp-mqtt');
var R := Tool.Call(JsonObj(['operation','list_clients','baseUrl','http://localhost:18083']));
Writeln(R.ToJSON);