Preheat oven to 350°F. Line a baking sheet with parchment paper or a silicone baking mat.
Combine dry ingredients: whisk together the almond flour, chocolate protein powder, cocoa powder, granulated sweetener, baking powder, xanthan gum, salt, and optional espresso powder until fully combined and lump-free.
Mix wet ingredients: whisk together the melted butter, eggs, vanilla extract, and heavy cream.
Combine & form dough: pour the wet ingredients into the dry ingredients and stir until a thick, scoopable dough forms. Gently fold in the chocolate chips if using.
Scoop & shape: scoop equal portions (about 2 tbsp each) onto the baking sheet. Lightly press down on each to form a round, cakey disk about 1/2-inch thick.
Bake for 10 to 12 minutes. The edges should be set, but the center should still look soft. Do not overbake.
Cool: let cookies rest on the baking sheet 10 minutes to firm up before transferring to a wire rack to cool completely.