These cupcakes look more complicated than they are -- and there's a cookie surprise inside every one.
Preheat oven to 350 degrees. Line 12 standard muffin cups with paper liners. Melt 2 tablespoons butter; let cool. In a large bowl, whisk together cocoa powder, flour, granulated sugar, baking soda, baking powder, and salt. Lightly beat egg and egg yolk and add, along with melted butter, buttermilk, vanilla, and 1/2 cup hot water; whisk until smooth. Spoon 1 tablespoon batter into each muffin cup and top with a cookie. Top each with 1 tablespoon batter. Bake until cupcakes are puffed and set, 15 minutes, rotating pan halfway through. Let cupcakes cool in pan on a wire rack.
Meanwhile, in a large bowl, using an electric mixer, beat 1 cup butter and raspberry jam on medium-high until smooth. Add marshmallow topping and confectioners' sugar and beat until fluffy and smooth, 3 minutes. Transfer mixture to a quart-size zip-top bag; with scissors, snip a small hole in one corner. Pipe frosting onto cooled cupcakes and serve immediately. (Store unfrosted cupcakes, in an airtight container, at room temperature, up to 2 days.)