Well, it all depends on how thick your MDF is and what diameter the nails have. I had a lot of splitting and the like. But i was in the comfortable situation, that i had about 1cm to toy around with. In the end i didnT' use a nail, but a screw to but the boards together. For that you need to drill smaller holes than the screw will be, or the mdf will split again.
If you are working with mdf with a thickness of around 0.5cm i would use pva glue, small nails and even smaller drills. Prepare the holes where you want the nails to be, by drilling the holes (which should be slightly smaller than the nails you are using) aply the PVA glue and then hammer in the nail.
maybe you give some pictures somewhere that specify it a little more, then i coul dbe of more use.