Getting back to the OP after the recent unpleasantness …
In the real world there are electric coffee cup keeper-hotters that’re essentially a hotplate sized for a standard ceramic mug. I’ve had one for each desk for years. They don’t put out enough energy to heat coffee from room temp, but they reduce the cooling rate to near zero. Yes, it very slowly cooks your coffee. But it keeps a standard cup drinkably warm much longer than you’re likely to be interested in it.
Here’s a typical example of the breed; they are legion: Amazon.com: Coffee Mug Warmer. My point is not that the OP should buy one. It’s that now we have access to the specs, so we can size our RTG, dilithium crystal, flux capacitor, anti-matter annhilator or whatever.
This warmer runs on 18W. A few others I checked have similar specs. A resistive heating element is nearly 100% efficient. So what we need is a) an 18W radioactive heat source, and b) (ref @Chronos above) a way to turn the heat off, or dissipate it safely so the empty cup doesn’t self heat to the point of singing your desk or thermally burning your hand.
Google informs me Strontium-90 puts out 0.95W/g. So we need about 20g of pure Strontium-90. That’s a lump of metal about the size of 4 or 5 US 5 cent coins. So the volume is not a problem. The half-life is ~29 years, so it seems we could count on decent coffee warming performance for 5, maybe 10 years.
The hard part is turning it off. I suppose we could deliver it with a heat-sink / scrub brush like thing that you put into the empty cup that has enough surface area to passively radiate and conduct 18W into room temp air indefinitely while maintaining the cup at a safe-to-touch temperature. Whew, that was kinda easy.
These nice folks will sell you some. Really: Radioactive Sources; Isotopes (imagesco.com). It’s $90 per 0.1 microcurie, and I was unable to locate a good conversion factor so I can’t say how many of these little beauties you’ll need per cup. Anyone?
The nice thing about Strontium-90 is it’s a beta emitter. So it should be practical to keep the radiation inside the cup structure, net of whatever daughter rays are created as the ceramic absorbs the betas. As mentioned above, gamma would be environmentally unfortunate.