Heat oven to 350°F and arrange rack in the middle. Line 40 mini cupcake wells with paper liners or spray lightly with baking spray.
Combine flour, sugar, baking soda, and salt in a large mixing bowl, whisking to break up any lumps.
Combine cocoa powder and chopped chocolate in a separate bowl. Pour hot coffee over cocoa mixture and stir until smooth; let cool slightly.
Whisk mayonnaise, egg, and peppermint extract into cocoa mixture then stir the wet ingredients into the dry ingredients until combined.
Scoop 1-2 ounces of batter into each well (a cookie scoop works best) and bake until a toothpick inserted into the center comes out clean, 15-20 minutes.
Let cupcakes cool completely then top each cupcake with a dollop of whipped cream and a sprinkle of crushed candy canes.