The best way to remove ugly coffee stains in your favorite coffee cup is to take a paper towel or cloth, dip it in coffee, (cold coffee works just as good) and wipe the stains away with ease. The acids in the coffee cut right through the stains. Afterward you may put it in the dishwasher or hand wash with soap to complete the process.
I just fill my cup with water and a little bit of bleach. The stains are gone in no time. Then wash as usual.
Just one of those tablets you clean your dentures with work wonders (polident). Can be used for a myriad of cleaning applications, as well as keeping your drain clean!
I use a small amount of baking soda to clean stains from coffee or tea from my cups with a small amount of baking soda. I use a bout a half teaspoon of baking soda in the cup dry at first then wipe with a paper towel then add a few drops of water to make a paste it quickly removes all the stains then wash as usual.