VSMQTT

December 28, 2025 ยท View on GitHub

Open VSX Downloads

Buy Me A Coffee

Vsmqtt is a simple MQTT client integrated in vscode.

Alt Text

Features

  • Create and use multiple mqtt profiles
  • Connect to broker
  • Support for secure connection
  • Publish messages to mqtt brokers
  • Subscribe to topics
  • Browse details of received messages
  • Connect to multiple brokers simultaneously
  • Colors to differentiate messages by topics
  • Pin topics (pinned topics are saved to settings and are used to subscribe to automatically upon connection)
  • Export to csv
  • Support for websocket connection
  • Clear retained messages
  • Right click on message to open in text edior
  • Save/load default topic, payload, qos and retain values for publish section on UI

Extension Settings

This extension stores mqtt broker profiles in workspace settings.json under: "vsmqtt.brokerProfiles".

Configuration properties:

nametypedescriptionrequired
namestringProfile name-
hoststringBroker host-
portnumberBroker port-
pathstringBroker path-
usernamestringClient username
passwordstringClient pasword
promptCredentialsbooleanAsk for username and password before connecting to the broker
protocolstring"mqtt", "mqtts", "tcp", "tls", "ws", "wss"
castringAbsolute path for cert file or cert string in PEM format
keystringAbsolute path for client cert file or cert string in PEM format
certstringAbsolute path for client key file or cert string in PEM format
clientIdstringClient ID
keepalivenumberKeepalive interval in seconds.
insecurebooleanDisable verification of the server hostname in the server certificate. This option makes it possible for a malicious third party to impersonate your server through DNS spoofing. Use it in testing environment only.
rejectUnauthorizedbooleanSkip server certificate validation
unixSocketbooleanConnect to unix socket
savedSubscriptionsarrayArray of saved subscriptions, each object with topic (string) and qos (number: 0, 1, or 2)
defaultsForPublishobjectDefaults for publish: topic (string), payload (string), qos (number: 0, 1, or 2, default 0), retain (boolean, default false). This is used for populating publish part on UI

Examples:

Password protected connection:

{
    "name": "client with password",
    "host": "localhost",
    "port": 1884,
    "username": "user01",
    "password": "securepassword"
}

Connecting to TLS protected broker:

{
    "name": "client with tls",
    "host": "broker.emqx.io",
    "port": 8883,
    "protocol": "mqtts",
    "ca": "/path_to_crt"
}

Connecting to broker using websocket:

{
    "name": "broker.emqx.io",
    "host": "ws://broker.emqx.io",
    "port": 8083,
    "clientId": "vsmqtt_client_test",
    "protocol":"ws",
    "path": "/mqtt"
}

Connecting to unix socket

{
    "name": "unix connection",
    "protocol": "mqtt",
    "path": "/var/run/mosquitto/mosquitto.sock",
    "unixSocket": true
}

Commands

NameDescription
addProfileCreate new mqtt broker profile
editProfileEdit existing mqtt broker profile
deleteProfileDelete mqtt broker profile
connectToBrokerConnect to broker
refreshProfileListRefresh sidebar view

All commands can be invoked also from the ui.