Select a microwave-safe mug that holds at least 12 ounces. Lightly coat the inside with cooking spray or butter to prevent sticking.
Add the flour, sugar, cocoa powder, baking powder, and salt directly to the mug. Stir with a fork until evenly mixed with no clumps of cocoa remaining.
Pour in the milk, oil, and vanilla extract. Stir gently just until the dry ingredients disappear and the batter is smooth — about 15-20 strokes. Do not overmix.
If using chocolate chips, fold them into the batter or press them lightly into the top for a melty chocolate pocket.
Microwave on high power for 60-70 seconds. The top should look slightly moist but set, with edges pulling away from the mug. If it still looks wet in the center, add 10 more seconds.
Let the mug cake rest for 30 seconds before eating. The center will continue to set and the texture will firm from molten to fudgy. Serve warm directly from the mug with your favorite toppings.