Ants in the coop!
Featured Stories on BackYard Chickens
You want to find where they are getting in. Personally, once I found where I'd seal it if possible, if not I'd add some sevin dust across their pathway in. I'd use sevin, just because folks have poured it onto their chickens for parasites up till recently, so it is reasonably safe.
What are the ants attracted to is the other question, different kinds of ants have different types of likes. If it's their feed, mix some spices into it. Most hate cayenne or cinnamon, so I mix a ton of cayenne into the feed. I know there are folks who believe it helps for all kinds of health reasons, and so far I have never seen a study on it, so can't say for sure there, but I know it won't hurt them and it keeps most pests out..ants and rodents both. Birds are not sensitive to the hot in any peppers, so it won't bother the chickens. (most birds love hot peppers) I haven't tried cinnamon with the chickens yet, but I do add that one along with cayenne to my parrots foods.
Not sure if it works on ants, I've seen sites who suggest it does, but not sure on this one myself, I sprinkle Lavender all through the bedding and nest boxes to keep out flys, who it seems to be working with since there is no flys in the coop. (now to figure out how to get them out of the yard)
We used to get ants from early spring through till fall and since I started spicing up the foods they have given up.