Combine Dry Ingredients: In a small bowl, whisk together the almond flour, cocoa powder, baking powder, and sweetener until no lumps remain, about 30 seconds.
Mix Wet Ingredients: In the same bowl or a separate one, whisk the egg with the melted butter and vanilla extract until well combined, about 20 seconds.
Fold Together: Pour the wet mixture into the dry ingredients and stir gently until just combined, about 15 to 20 seconds, then fold in chocolate chips if using.
Transfer to Mug: Pour the batter into a microwave-safe mug or small ramekin, filling it about halfway so the cake has room to rise without overflowing.
Microwave: Microwave on high for 60 to 90 seconds, depending on your microwave's power, until a toothpick inserted into the center comes out mostly clean with just a few moist crumbs.
Cool Slightly: Let the mug sit for 1 to 2 minutes before eating, as the cake will be very hot, and this resting time allows it to set properly.