In a mixing bowl combine the flour, salt, espresso powder, baking soda, and cocoa powder and whisk to mix evenly and set aside.
In the bowl of a stand mixer fitted with a paddle attachment beat the butter and sugar on medium high speed until the mixture begins to lighten.
Add the egg and beat for another minute and then add the vanilla.
Reduce the speed to low and add all the flour mixture. Mix until just combined add all of the chocolate chips and ½ cup of the M&Ms if you want to add some on top later. Cover and refrigerate for at least an hour.
Using a cookie scoop roll each scoop into a ball and place on the lined sheet pan. Lightly press the remaining M&Ms into the tops of the cookies. Bake for 11-14 minutes or until the edges have set.
Cool on the pan for 10 minutes before transferring to a cooling rack to allow the cookies to cool completely.