Preheat oven to 350°F (175°C).
Line cookie sheets with parchment paper.
Mix flour, cocoa powder, and baking powder.
Cream butter and sugar until light and fluffy.
Add eggs one at a time, beating well.
Mix in espresso and vanilla extract thoroughly.
Gradually add dry ingredients to wet mixture.
Drop spoonfuls of dough onto prepared sheets.
Bake for 10-12 minutes until edges set.
Cool on wire racks completely before filling.
Beat mascarpone, powdered sugar, and cream together.
Add coffee liqueur if using the ingredient.
Pipe or spread filling between cookie pairs.
Dust with cocoa powder before serving immediately.