Soften the butter (not melted) and bring eggs to room temperature. Measure flour and cocoa carefully—too much can make the cookies dense.
Whisk together flour, cocoa, baking soda, baking powder, and salt in a bowl and set aside.
In a large bowl, beat butter, brown sugar, and granulated sugar for 2–3 minutes until light and fluffy. Add eggs one at a time, then mix in vanilla until smooth.
Gradually mix in the dry ingredients on low speed just until combined—don’t overmix.
Fold in chocolate chips and 1 cup of M&Ms, saving a few for topping.
Cover the dough and chill for at least 30 minutes (or up to 2 hours) to help the cookies hold their shape.
Preheat the oven to 350°F (175°C) and line baking sheets with parchment paper or silicone mats.
Scoop the dough, roll into balls, flatten slightly, and press extra M&Ms on top. Leave 2 inches between cookies.
Bake for 9–11 minutes, until edges are set and centers still look slightly soft.
Cool on the sheet for 5 minutes, then transfer to a rack. Enjoy warm and gooey or cooled and chewy.