The other day quite by accident I came across this easy way to get coffee stains out of my cups. Normally I use baking soda and rub the stains out, but it was all gone. The cups also had some lime deposits on them so I thought I'd use vinegar to remove those and found I only had apple cider vinegar. I didn't want to cool my dish water so I heated a cup of apple cider vinegar in the microwave for 2 minutes. I then added it to my dish water and let the cups sit a few minutes and the coffee stains wiped right out with no scrubbing.
This page contains the following solutions.
I have trouble with my coffee cups and mugs becoming discolored because my husband drinks lots of coffee. All I have to do to take out the stains is to let them soak in a a sink full of water with a about 1/4 cup bleach added. Just be sure to rinse them well.
Coffee stains on the inside of the rim of your coffee cups? Turn them upside down in 1/2 inch of half and half white vinegar and water for at least 30 minutes and then wash as usual.
Removing coffee stains in cups and decanters can be accomplished inexpensively using salt and ice.