I do intend to do a bit of an article on tips and tricks with MDF, but for the short term, the easiest preparation to prevent (the edges mostly) from soaking up unnecessarily extravagant quantities of precious and expensive paint, is to brush some thinned PVA/elmers/aquadehre / white glue (about 50/50 with water) on all the edges and let it dry. Just beware of excessive drippage.

One tip that I've been doing is building MDF structures into separate pieces like doors, roofs, and the rest of the building, for example. And then spraying them separately using different coloured sprays. And only then putting them completely together.