Using baking soda is one of the best ways to clean coffee stains on hard surfaces, mugs, or carafes.
Just sprinkle a little baking soda on the stained area, add a few drops of water to form a paste, and scrub. The baking soda's gentle abrasion will help remove the stains in minutes.