Dr Harry did an episode with this problem - they put a screen door on the nursery!

With our cats, they've never been allowed in or on the cot - was caught once and regretted it. Mosquito netting is quite effective to keep cats out.

Just a Touch - how old is your baby or when is s/he due? Maybe cuddle your cat now if you're still preggers, let the cat know there's a bub in there. My bub kicked my cat a lot during the pregnancy. Otherwise, we just ignored the cat when it was baby time, and if the cat came near the baby, we'd shoo it away. Now the baby grabs the cats, and they keep themselves away

Cutting the claws of the cat is also a very, very good idea.

Good luck!