Airmail is able to do this, so it is possible. It looks for Category = Promotions or Category = Social, for example, to recreate those folders in the Mac client. I don’t know which API or field they are getting those from, but they are definitely available from Gmail via IMAP somehow.
(Originally posted by BryanWall on GitHub.)