It will definitely need to be primed — MDF sucks up light weight paints like a sponge if it's not — but I would do it after assembly, or else you are liable to compromise the strength of any glue joints.
I like aerosol spray primers for MDF, to get a decent smooth finish with a minimum of work. I've tried Vallejo Surface Primer through the airbrush, but it's very thin and it needs a few coats to seal the MDF surface properly, especially on cut edges.