Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
EMQX_MCP_API_KEYYesThe API key (username) for HTTP Basic auth to EMQX REST API
EMQX_MCP_BASE_URLYesThe base URL of the EMQX REST API, e.g., http://192.168.2.189:18083
EMQX_MCP_READONLYNoIf set to 'true', dangerous tools are not registered (optional)false
EMQX_MCP_API_SECRETYesThe API secret (password) for HTTP Basic auth to EMQX REST API

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
extensions
{
  "io.modelcontextprotocol/ui": {}
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
emqx_cluster_statusA

Nodes in the EMQX cluster with version, uptime and resource use.

Start here when asked "is EMQX healthy", "what version is running", or before any node-specific call, to learn valid node names.

emqx_node_detailA

Everything EMQX knows about one node.

emqx_broker_statsA

Live counters for the whole cluster.

Answers "how many devices are online" and "how many subscriptions exist" in one call — cheaper than listing clients.

emqx_metrics_currentA

Current throughput gauges (messages/s in and out, dropped, rate).

emqx_metrics_historyA

Time-series metrics over a recent window.

Use this to answer "was there a spike", "when did connections drop", or to correlate an incident with broker load.

emqx_list_alarmsA

Broker alarms — the first place to look when something feels wrong.

emqx_prometheus_statsA

Raw Prometheus exposition text. Large — prefer emqx_broker_stats.

emqx_list_clientsA

List MQTT clients known to the broker.

Answers "which devices are online", "is device X connected", and "who is connecting from this IP". Walk large fleets by raising page rather than limit.

emqx_get_clientA

Full session detail for one client: keepalive, in-flight queue, protocol, subscriptions count, connect and disconnect timestamps.

emqx_client_subscriptionsA

Which topics one client is subscribed to, with QoS.

Use this when a device "isn't receiving anything" — usually the subscription filter does not match the publish topic.

emqx_kick_clientA

[DESTRUCTIVE] Disconnect an MQTT client and clear its session.

Queued and in-flight messages for that session are lost. Devices with auto-reconnect usually return within seconds, so this forces a fresh connection rather than blocking one — use emqx_ban to keep a client out.

emqx_client_subscribeA

[DESTRUCTIVE] Add a subscription to a client on its behalf.

The device does not know this happened and will not re-create the subscription after a clean-session reconnect.

emqx_client_unsubscribeA

[DESTRUCTIVE] Remove a subscription from a client on its behalf.

The device stops receiving that topic immediately and has no way to tell why.

emqx_list_topicsA

Topics that currently have a route (i.e. at least one subscriber).

A topic missing here means nobody is subscribed — which is the usual reason a published message appears to vanish.

emqx_list_subscriptionsA

Every subscription in the cluster, with filters.

match_topic is the powerful one: given a concrete topic, it tells you exactly which subscribers would receive a message on it.

emqx_publishA

Publish a single MQTT message through the broker.

This is how you drive a device or feed a Home Assistant MQTT entity. Publishing to a topic nobody subscribes to succeeds silently — check emqx_list_subscriptions if nothing reacts.

emqx_publish_bulkA

Publish a batch of MQTT messages in one round trip.

Prefer this over many emqx_publish calls when seeding several topics — for example bringing up a set of test entities.

emqx_list_retainedA

Retained messages the broker is holding.

Retained messages are the broker's memory of "last known value" per topic — stale ones are a common cause of ghost entities appearing after a device is removed.

emqx_get_retainedA

Read the retained message stored for one topic.

Returns found=false when the topic has nothing retained — that is an ordinary answer, not an error.

emqx_delete_retainedA

[DESTRUCTIVE] Delete the retained message for one topic.

This is the correct way to remove a stale Home Assistant discovery entry or a ghost device state. It cannot be undone — the previous payload is gone unless something republishes it.

emqx_list_authnA

The authenticator chain and each authenticator's status.

Check this first when devices cannot connect: an empty chain means EMQX has no user table, so every credential is rejected.

emqx_manage_authn_usersA

Manage MQTT accounts in the EMQX built-in authentication database.

These are the credentials devices use to connect to the broker — not the dashboard login. If no authenticator exists yet, create one in the EMQX dashboard first; without it there is no user table to write to.

Operations enabled on this server: create, delete, read.

emqx_list_authz_sourcesA

Authorization sources in evaluation order.

Order matters: the first source that returns allow or deny wins.

emqx_authz_settingsA

Global authorization behaviour: what happens when no rule matches, what a denial does to the connection, and cache settings.

emqx_manage_authz_rulesA

Read and write built-in-database ACL rules that decide which topics a user or client may publish to and subscribe to.

Operations enabled on this server: create, delete, read.

emqx_list_bannedA

Everything currently barred from connecting, with expiry times.

emqx_banA

[DESTRUCTIVE] Block a client id, username or IP from connecting.

Unlike emqx_kick_client this persists — the target stays out until the ban expires or is lifted with emqx_unban.

emqx_unbanA

[DESTRUCTIVE] Lift a ban so the client may connect again.

emqx_list_tracesA

Packet traces defined on the broker, with status and expiry.

emqx_create_traceA

Start capturing MQTT packets for one client, topic or IP.

Traces are the tool for "the device connects but nothing arrives". Note the capture buffers in memory and only flushes to disk when it expires — let it run to completion before reading the log, and do not delete it early or the buffered events are lost.

emqx_get_trace_logA

Read what a trace captured.

A trace that is still running usually returns little or nothing — its events sit in an in-memory buffer until the trace expires.

emqx_delete_traceA

[DESTRUCTIVE] Delete a trace and its captured log.

If the trace is still running, events buffered in memory are lost. Call emqx_get_trace_log first, or wait for it to expire naturally.

emqx_list_listenersA

Listeners, their bind addresses and running state.

This is where you confirm that 1883 (MQTT), 8883 (TLS), 8083/8084 (WebSocket) are actually up before blaming a device.

emqx_list_rulesA

Rule-engine rules, with their SQL and enabled state.

Rules are how EMQX forwards or reshapes messages without any code — for example pushing selected topics into a database or a webhook.

emqx_get_rule_metricsA

Match, pass and failure counters for one rule.

A rule with matched=0 is not seeing traffic — usually its FROM topic filter does not match what devices actually publish.

emqx_toggle_ruleA

[DESTRUCTIVE] Switch a rule on or off.

Disabling a rule silently stops whatever pipeline depends on it — confirm which downstream system it feeds before turning it off.

emqx_test_rule_sqlA

Dry-run rule SQL against a sample event. Nothing is saved.

Use this to check a rule before creating it — it reports whether the event would match and what columns the rule would emit.

emqx_list_connectorsA

Data-integration connectors and their connection health.

Open-source EMQX ships HTTP and MQTT connectors; the rest are enterprise-only, so an empty list is normal on OSS.

emqx_list_actionsA

Outbound actions (bridges) attached to rules, with their health.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/WOOWTECH/Woow_emqx_mcp_server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server