Medium density fiberboard (MDF) is used in a variety of ways, but the most common are the construction of furniture items such as cupboards and stereo cabinets. Like most building materials, MDF is vulnerable to mold growth if it is exposed to too much dampness and not enough sunlight. You can kill most mold on MDF with a few methods, but for extensive mold growth you are probably better off removing and discarding the infected MDF.
Dry the MDF completely. Expose the MDF to sunlight, if practical. Blow warm, dry air on the MDF with fans.
Put on a painter's (or surgeon's) mask to avoid inhaling fumes.
Scrape off as much mold as you can with a spatula. A plastic spatula is better to avoid scratching the MDF. Brush off any remaining visible mold with a still-bristled nylon brush.
Vacuum the MDF to remove any tiny spore particles. Throw the vacuum bag away after you are done vacuuming.
Create a solution consisting of equal amounts of water and bleach. Put on a pair of rubber gloves. Dip a sponge into the solution and thoroughly wipe down the MDF.
Allow the MDF to thoroughly dry again. Gently sand over any areas that contained mold with a fine-grit sandpaper to remove any mold that has permeated the surface.