Preheat your oven to 375°F (190°C).
In a large oven-safe skillet, heat the olive oil over medium heat. Add the diced onion and sauté for about 3-4 minutes until translucent.
Add the minced garlic and sliced mushrooms to the skillet. Cook for an additional 5-7 minutes, stirring occasionally, until the mushrooms are browned and tender.
Stir in the thyme, and season with salt and pepper to taste. Remove the skillet from heat.
Create four small wells in the mushroom mixture and crack an egg into each well.
Sprinkle the shredded cheese evenly over the eggs.
Transfer the skillet to the preheated oven and bake for 10-15 minutes, or until the egg whites are set and the yolks are cooked to your liking.
Remove from the oven and let cool for a minute. Garnish with fresh parsley if desired. Serve warm.