Clean the pumpkin, cut into wedges, remove the seeds and fibrous flesh, peel. Dice the remaining flesh, boil in lightly salted water for about 20 minutes. Drain, strain through a hair sieve.
Sift the flour onto the work surface and knead with the pumpkin puree and the egg to form a smooth dough. If necessary, knead in a little more flour if the dough is still too wet. Form the dough into finger-thick rolls. Cut the dough rolls into 3 cm long pieces. Press each piece lightly on a fork to give the gnocchi their typical shape.
Dust a baking sheet with flour. Place gnocchi side by side on it and cover with a cloth. Preheat oven to 200 degrees. Cook gnocchi in batches in boiling salted water for about 7 minutes. Lift out, let drain. Grease 4 small gratin dishes. Wash sage leaves, shake dry, mix with gnocchi.
Divide everything among the ramekins, season with pepper and sprinkle with cheese. Melt butter and pour over gnocchi. Bake in the oven for about 10 minutes.