Skip to content

Connectors

Connectors provide access to external systems and expose actions that agents and chats can use during a run, such as publishing an MQTT message, querying a time-series table, or using an MCP service.

EMQX Agents supports the following connector types:

TypeDescription
EMQX FleetsOperate EMQX Fleets device registry and related device management capabilities.
EMQX BrokerSubscribe to MQTT topics as event triggers, and publish messages as actions.
EMQX TablesQuery and write time-series data through SQL.
MCP connectorsAuthorize external services through the Model Context Protocol (MCP) and expose their approved MCP tools to agents. Gmail and Slack are currently supported, and more MCP connector services will be added over time.

Connectors are configured at the deployment level and can be reused across multiple agents and chats.

View Connectors

Click Connectors in the left menu of your deployment to open the Connectors page. The page has two tabs:

  • Available: Shows connector types that can be added, including EMQX Fleets, EMQX Broker, EMQX Tables, and MCP connectors. Use the search box to filter connector types.
  • Added: Shows connectors already added to the deployment. Use the search box to filter connectors by name.

The Added tab shows configured connectors with the following columns:

ColumnDescription
NameThe display name assigned to the connector.
TypeThe connector type, such as EMQX Fleets, EMQX Broker, EMQX Tables, or an MCP connector service.
AuthorizationThe authorization status. MCP connectors can show Unauthorized, Authorized, Expired, or Error.
DescriptionA summary of the connection. MCP connectors show transport and authorization details.
Updated AtWhen the connector was last modified.
ActionsRetry authorization, edit, or delete the connector. The retry authorization action is shown for MCP connectors that need authorization.

agents_connectors_added

Add a Connector

  1. Click Connectors in the left menu.
  2. On the Available tab, find the connector type you want to add.
  3. Click Add on the connector card.
  4. In the Add Connector panel, fill in the required fields.
  5. Click Confirm.

You can also add a connector from a chat. In the chat input area, click the connector icon, then click + in the Connectors panel. The Add Connector panel opens with a Choose Connector Type step followed by a Configuration step.

EMQX Fleets

Use this connector type to operate EMQX Fleets device registry and related device management capabilities.

FieldRequiredDescription
TypeYesThe selected connector type, EMQX Fleets.
NameYesA display name for this connector, for example factory-fleets.
API EndpointYesThe Fleets API endpoint, for example https://example.fleets.mqttce.net:8443.
API KeyYesThe API key used to authenticate with the Fleets API.
API SecretYesThe API secret used to authenticate with the Fleets API.
Timeout (seconds)NoThe request timeout in seconds. Default: 10.
Verify TLS/SSLNoVerify TLS certificates when connecting to the Fleets API. Enabled by default.

EMQX Broker

Use this connector type to subscribe to MQTT topics and publish messages on an EMQX Broker deployment.

FieldRequiredDescription
TypeYesThe selected connector type, EMQX Broker.
NameYesA display name for this connector, for example factory-broker. Must start with a letter and can contain letters, numbers, hyphens, and underscores, up to 64 characters.
AddressYesThe broker address in host:port format. Always include the port number, for example broker.example.com:1883 for unencrypted MQTT or broker.example.com:8883 for TLS. Find the address in the MQTT Connection Information section on your EMQX Broker deployment's Overview page.
UsernameNoThe username for authenticating with the broker. Credentials are configured in Access Control -> Authentication on your EMQX Broker deployment.
PasswordNoThe password for authenticating with the broker.
Client ID PrefixNoA prefix applied to the MQTT client IDs used by this connector. Useful for identifying agent connections in broker logs.
Enable TLS/SSLNoEnable TLS for the connection. Off by default.
Default QoSNoThe default MQTT QoS level for subscriptions and publishes. Options: 0, 1, 2. Default: 1.

EMQX Tables

Use this connector type to query and write data in an EMQX Tables deployment.

FieldRequiredDescription
TypeYesThe selected connector type, EMQX Tables.
NameYesA display name for this connector, for example factory-tables.
AddressYesThe Tables service address in host:port format. The default port is 4000. If the port is omitted, 4000 is used. Find the address in the Connection Info section on your EMQX Tables deployment's Overview page.
UsernameNoThe username for authenticating with the Tables service. Find it in the Connection Info section on your EMQX Tables deployment's Overview page.
PasswordNoThe password for authenticating with the Tables service. Find it in the Connection Info section on your EMQX Tables deployment's Overview page.
Database NameNoThe database to connect to. Defaults to public.
Enable TLS/SSLNoEnable TLS for the connection. Off by default.

MCP Connectors

Use MCP connectors to let agents and chats interact with external services through the Model Context Protocol.

MCP connectors do not require service-specific configuration in the Add Connector panel. The panel shows the selected Type and a required Name field, with a notice that authorization is required. After you click Confirm, the connector is added with an Unauthorized status and EMQX Agents opens an authorization popup for the selected service.

FieldRequiredDescription
TypeYesThe selected MCP connector service, for example Gmail or Slack.
NameYesA display name for this connector, for example support-gmail or ops-slack.

TIP

Complete the authorization flow before using an MCP connector in a chat or agent. Only MCP connectors in the Authorized status can be selected in a chat.

MCP connectors use the following authorization statuses:

StatusDescriptionAction
UnauthorizedAuthorization has not been completed, or the authorization flow was closed before completion.Click the retry authorization action in the Actions column to reopen the authorization flow.
AuthorizedAuthorization succeeded, and the connector can expose its MCP tools to chats and agents.No action is required.
ExpiredThe external service authorization expired.Reauthorize the connector from the Actions column.
ErrorAuthorization failed, or EMQX Agents cannot verify the authorization state.Retry authorization. If the status remains Error, check the external service account and try again.

Connectors in Unauthorized, Expired, or Error status may appear in the chat Connectors panel but cannot be selected.

Edit a Connector

  1. On the Connectors page, click the edit icon in the Actions column for the connector you want to update.
  2. In the Edit Connector panel, update the fields as needed.
  3. Click Confirm.

Important Notice

Editing a connector that is actively used by a running agent takes effect immediately. If the updated credentials or address are incorrect, the agent's next run will fail.

Delete a Connector

  1. On the Connectors page, click the delete icon in the Actions column for the connector you want to remove.
  2. Confirm the deletion.

Important Notice

A connector cannot be deleted while it is in use by a deployed agent. Stop or delete the agent first, then delete the connector.

Use Connectors in a Chat

When starting a chat, you can select which connectors the LLM has access to. This allows the LLM to reference the correct connector when generating an agent definition.

To select connectors for a chat session:

  1. Click the connector icon in the lower-left corner of the input area. A Connectors panel appears listing your configured connectors.
  2. Check the authorized connectors you want to make available for this session. MCP connectors in Unauthorized, Expired, or Error status may appear in the list but cannot be selected.
  3. To add a new connector, click + in the upper-right corner of the panel. This opens the Add Connector form without leaving the chat.

agents_chat_connector_panel

The selected connectors are used by the LLM to configure triggers and tools in the generated agent definition. For example, selecting an EMQX Broker connector allows the LLM to set it as the MQTT trigger source and as the target for mqtt.publish actions. Selecting an MCP connector allows the LLM to use tools exposed by that external service, such as Gmail or Slack, when generating the agent definition.

Next Steps