MDF is almost waterproof. House siding is made of MDF. Exterior trim is made of MDF. You are thinking of particle board, which is very bad when it gets wet, but MDF doesn't change unless it is soaked for a long time. I have tossed scraps into my scrap pile outdoors during the rainy season, and after 6 months of rain and soaking, they are still usable. Like any wood product you do have to apply a finish if you don't want it to eventually be damaged by water.
I also made a hood for my last aquarium, using thin MDF, finished with urethane varnish. In the 9 months I used it, there was no water damage.