Put the olives, garlic, anchovies (if using), and capers in a food processor and pulse for a minute or two, until you have a rough paste (or process longer for a smoother paste). Add the lemon zest, thyme, and olive oil and pulse to combine. Transfer to a bowl.
Stir in the parsley, scallion, and cayenne. Season to taste with salt and pepper.