The keyhole router bit might work but remember MDF is soft and easily pulls out. With only 1/2 inch you would need to almost come out the front side to get enough meat in the keyhole to make that feasible.
If you want to use a keyhole here is the Amazon list, I would suggest you match your keyhole to the fastener you are going to put on the wall. The head of your fastener needs to completely fill the key hole, a smaller head would make the mdf pull out easily.
https://www.amazon.com/keyhole-router-bit/s?k=keyhole+router+bit
As I suggested above you could use hardwood blocks and put a keyhole in the hardwood. I just used mdf because I used 3/4 inch screws for the hanger and 1.25 inch screws to hold the blocks to the 3/4 inch mdf I carved.