We have finally 'almost' gotten rid of our rat problem. I've lost untold numbers of chicks, quail, pigeons, at least 5 full-grown bantams, and a LF leghorn hen, all to the rats KILLING and EATING them!!
Hardware cloth around the walls of your coop will not hurt the chickens at all, and *should* keep rats out. They are usually more interested in the feed at first, but when the population gets out of control or food gets scarce, they will get the next best thing...your birds.
I'd tried several 'safe' killing methods for them--plaster of paris, soda, traps---and finally resorted to plain old poison. I put some out 3 days ago, and most of it is still there. I have 1 full tub of poison left (out of 4 tubs) and maybe 3 bars left in one tub. I've been putting poison out every day at first, then every other day, for 2 weeks.