If using fresh pumpkin, preheat oven to 400°F (200°C). Cut pumpkin into cubes, roast for 30-40 minutes until tender, then puree in a food processor. If using canned pumpkin, skip this step.
In a large bowl, combine 2 cups pumpkin puree, 2 1/2 cups flour, 1/2 cup Parmesan cheese, 1/4 teaspoon nutmeg, 1 teaspoon salt, and 1/4 teaspoon pepper.
Create a well in the center of the mixture and add 2 eggs. Mix everything together until you have a soft, slightly sticky dough.
Dust your work surface with flour. Divide the dough into 4 portions.
Roll each portion into a rope about 1/2 inch thick. Cut the ropes into 1-inch pieces.
For the classic gnocchi shape, roll each piece down the tines of a fork.
Bring a large pot of salted water to a boil.
Add the gnocchi in batches and cook until they float to the surface (about 2-3 minutes). Remove with a slotted spoon and set aside.
In a large skillet, melt 1/2 cup butter over medium heat. Continue cooking until it turns golden brown and smells nutty.
Add 15-20 whole sage leaves to the browned butter and let them crisp up for about 30 seconds. Remove a few for garnish and leave the rest in the pan.
Add the cooked gnocchi to the skillet and toss gently to coat with the sage butter sauce. Cook for an additional minute to crisp up slightly.
Serve hot, garnished with reserved crispy sage leaves and toasted pine nuts if desired.