You didn't say whether the scratches went down to the wood or not. At first blush it sounds like the paint is sitting on top of the primer instead of bonding to it.
If both coats are coming off then the primer didn't bond to the MDF. Did you scuff sand it before you painted?
If just the top coat is coming off I suspect you didn't follow manufactures direction on the amount of time between coats.
I would try sanding off the scratches and redo the paint only this time use Krylon's Fusion paint. I found it sticks to just about everything really well.
Also check out the advice offered at
http://www.finewoodworking.com/how-to/article/tips-for-painting-mdf.aspx