I think 타니아 is quite correct, but "커피를 먹다" is also acceptable.
As it's been known already, "먹다" is used for foods, on the other hand,
'마시다' is for drinks like coffee or tea or beverages,
but sometimes '먹다' can be acceptable for drinks.
However, '마시다' doesn't work for foods, always has to be '먹다'.
I think it's because that the action of '먹다' includes the process of '마시다'.
for example,
"커피 마실사람?" or "커피 먹을사람?" (who wants coffee?)
'소주 마시러 가자" (let's go for soju.) (soju is alcohol)
'소주 먹으러 가자' is also acceptable.