Clean the mushrooms and slice them. Peel and finely chop the onion and garlic.
Heat the butter in a pan and sauté the onion until translucent. Add the mushrooms and cook for a few minutes until they release their liquid and are lightly browned.
Add the spaetzle, garlic, mustard, and thyme. Stir in the cream cheese, heavy cream, and broth. Season with salt and pepper, then let the sauce thicken.
Pour everything into a casserole dish. Sprinkle the cheese on top and bake for 20 minutes, or until the cheese is golden brown and bubbling.
Sprinkle the finished casserole with chopped parsley before serving.