Whisk 1 tablespoon unsweetened cocoa powder and 1 tablespoon granulated sugar with 1 tablespoon hot water in a heatproof mug. Keep whisking until the cocoa is fully wet and the mixture looks glossy.
Brew 2 shots of espresso, about 2 fluid ounces total. Stir them into the cocoa syrup, then add 1 drop of pure peppermint extract. Use a clean dropper or let a drop fall onto a spoon before adding it to the mug.
Warm 3/4 cup whole milk until steaming, without bringing it to a boil. Froth it briefly if you like, then pour it into the mug and spoon any remaining foam on top.
Taste the mocha before topping it. Add a little whipped cream and crushed candy cane or a few chocolate curls, if desired. Serve while the mocha is hot.