Prepare the mug: Choose a microwave-safe mug with a capacity of at least 12 oz (for proper rising).
Mix the dry ingredients: In the mug, combine the 4 tablespoons of flour, 2 tablespoons cocoa powder, 4 tablespoons sugar, 1/8 teaspoon baking powder, 1/8 teaspoon baking soda, and a pinch of salt. If you’re adding coffee or espresso powder, mix that in as well.
Add the wet ingredients: To the dry mixture, add the 3 tablespoons of milk, 2 tablespoons of vegetable oil (or melted butter), 1/4 teaspoon vanilla extract, and 1 egg. Stir well with a fork or whisk until fully combined and smooth.
Add marshmallows (optional): If using, sprinkle 1 tablespoon of mini marshmallows on top of the batter.
Microwave: Microwave the mug on high for about 1 minute and 15 seconds, checking at the 1-minute mark. The cake should rise and look set, but still soft in the center. If not done, microwave for 15-20 more seconds.
Top and serve: Once done, let the cake cool for a minute before adding a dollop of whipped cream (if using) and extra mini marshmallows. Enjoy your hot chocolate mug cake!