Roast the mealworms lightly in a dry pan for 2–3 minutes until golden and crunchy.
In a food processor, combine roasted mealworms, basil leaves, garlic, pine nuts, and parmesan. Blend until smooth.
Slowly add olive oil while blending to form a creamy pesto. Adjust seasoning with salt and pepper.
Toss the cooked spaghetti with the mealworm pesto until evenly coated.
Serve hot, garnished with extra parmesan and a few whole roasted mealworms for crunch.
Optional: Add cherry tomatoes or a squeeze of lemon for a fresh twist.