Preheat oven to 400.
Coat a skillet with olive oil, and place on medium heat on the stove. Add the onion, and cook until softened (about 5 minutes). Then, add in the broccoli and cook for 5 minutes, stirring occasionally.
Add the 2 cups of cheddar cheese (leaving ¼ cup to the side), Monterey Jack, cream cheese, garlic, and cayenne. Stir until cheese is melted. Pepper to taste and remove from heat.
Lay out the pastry sheets and roll out slightly to thin. Cut each pastry sheet into 9 pieces (3x3). Evenly split the broccoli filling onto one sheet of the pastry dough, leaving about ¼” around the edges. Beat the egg, then brush the edges of the pastry sheets with egg. Take the 9 squares from the second pastry sheet, and cover the squares with filling.
Press the edges together with the backside of a fork.
Brush egg over the tops of the pastries. Sprinkle the remaining cheddar cheese on top, with a pinch of pepper.
Place the pockets on a parchment paper lined baking sheet, and cook for 25-30 minutes, or until golden brown.
Serve and enjoy!