I've done it and just for the reason you mention and to keep sparrows and starlings out of the coop.
Here is how I did it.
1. I started with a female kitten that was about 8-10 weeks old. Her name was Brigit, patron saint of chickens.
2. I put her in a plastic dog carrier on the coop floor for about a month. This way the chickens could see her and she could see the chickens. Now before anyone jumps me she got plenty of out of the box time. I handled the cat a lot as well. I did not want her to go feral.
I feed her three times a day. The first two feedings were dry and the third was a few sardines in water. She loved the sardines and this way I knew once she was given the run of the place she would come back every night to the coop for her sardines and I could lock her in the coop to mouse.
3. After the first month I moved Brigit to a wire cage, followed the same routine as number 2.
4. After the second month I simple opened the cage door and waiting to see what happened. I was very confident that nothing major would happen as in these two months the chickens basically ignored her and she ignored the chickens.
Brigit did what I wanted her to do. She became a coop cat. Mice and birds in and around the coop were rare. She spent her days wondering in and out of the coop, she found the last nest box in the corner was the best for napping.
She got a cup of dry food in the morning and her sardines at night. She would always be waiting for me to come out and lock up. I built her a shelf about 8 feet up the coop wall so she could eat without the chickens trying to eat her food.
She was spayed.
I had Brigit for almost 10 years one day she did come back to the coop for her sardines I never did find out what happen to her.