Mix well all the ingredients and let the dough rest in refrigerator for 1 hour. With the help of a rolling pin or a pasta sheeter, roll out the pasta into very thin sheets.
For the filling:
Rub the mushrooms with damp cloth, and then wash them under cold water. Pat dry. Remove the bottom of the stems, and slice them into small pieces. In a large skillet over medium heat, sauté the garlic in the olive oil until golden. Add the mushrooms, parsley, salt and pepper and cook for about five minutes, until liquid evaporates. Let cool.
Put the ricotta in food processor. Add 3/4s of the the mushroom mixture and pulse together until a thick puree is formed.
Place the pasta sheets on a table and using a teaspoon, place spoonfuls of filling evenly spaced on half of the dough, leaving a little space between spoonfuls.
If not using a serrated ravioli cutter, bush the space around each lump with the beaten egg. Fold over the other half of the dough, and cut the ravioli with a serrated ravioli cutter or pizza cutter into squares. If necessary, press the edges with your fingers or a fork to seal them.
For serving:
Bring a large pot of salted water to a boil. Drop in the ravioli and let them cook for 1 minute.
In the meantime, melt the butter in the skillet with the remaining mushrooms. When the ravioli are ready place them in a serving dish and cover with the melted butter and mushroom mixture. Sprinkle with Parmigiano. Serve immediately.