I had the worst latte of my life at the Mazama store last week, but most of the time it's pretty good, and it's the only thing in town.
11worth's Alpine Coffee roasters is the best bet there.
There are hundreds of coffee drive thoughs between Monroe and Index, all are decent (as far as I know), but my favorite is the bigfoot coffee stop along highway 2 a little ways past Index.
Cle Elum has a roastery/coffee shop downtown near the bakery (which has awesome food, but the coffee is mediocre), but it's never open Anyone else been there?
As for Bozeman, no matter how much you talk it up, the coffee is sub-par.
After all this, though, I usually just bring my french press with me.
John, how did you hear about Stumptown?