Automation HAT or pHAT MQTT routines

Does anyone know of some routines that will connect the pHAT or HAT to MQTT routines to allow it to be an MQTT client. I would think these would be something that Pimoroni would want in their library for many of their boards.