Preheat the oven to 350 degrees F (175 degrees C). Grease cookie sheets or line with foil.
Combine flour, butter, baking soda, and baking powder in a large bowl and mix until well blended. Beat in white sugar, brown sugar, eggs, and peanut butter. Add oats, chocolate chips, and marshmallows; mix dough with a spoon or by hand.
Place coconut flakes in a plate or shallow dish. Shape dough into 1-inch balls. Flatten slightly and press one side of each cookie into the coconut flakes. Place cookies 2 inches apart on the cookie sheets.
Bake in the preheated oven until light golden brown, about 10 minutes. Transfer to wire racks to cool.