A few years ago, I put up a birdbox in my garden. This year, for the first time, a pair of bluetits has moved in and are bringing up chicks there. This evening, after I got home from work, I noticed a cat climbing onto the birdbox - either trying to get at the chicks inside or catch the parents. After chasing the cat off, I decided to set up a more permanent deterrent.
Have you ever wondered why chillis contain capsaicin, the substance that creates the burning sensation when you eat them? In the wild, their seeds are spread by birds pecking at the fruit. If mammals ate them, they'd grind up the seeds with their teeth. The capsaicin acts as a deterrent to mammals, which, with the exception of one mad species of ape, finds the burning sensation produced extremely unpleasant. Birds, however, aren't sensitive to it.
So, I've put some chilli on top of my birdbox. Hopefully the next time the cat tries to get up there will be the last. As a bonus, while I was doing it I managed to look into the box and get a glimpse of the chicks