This plugin for Homebridge allows you to host an embedded MQTT broker (server) within Homebridge. It features authentication with username and password, persistence and tls encryption.
Sign in to your Homebridge, got to Plugins and search for "Homebridge Aedes". Follow the instructions to install.
All configuration can be done through the Homebridge UI.
The heavy lifting of this plugin is done by Aedes, which is a complete implementation of an MQTT broker in Node.js. Data can be persisted to disk using aedes-persistence-nedb to make it possible to restart Homebridge or the device it is running on without information loss.