I didn’t get to eat any soupe au pistou while cycling from Marseille to Nice last spring, while researching my new book, One More Croissant For The Road, which is published next week. Perhaps it was a whisker too early for the fresh beans required, perhaps the dish was just too rustic for the restaurants of the Côte d’Azur, but it made me sad, because, as the American gourmand Waverley Root observed, it’s one of the finest soups known to man.

Much like the Italian minestrone, but with its own Gallic peculiarities, it’s the perfect way to showcase the season’s freshest produce. Properly speaking, pistou is the sauce that goes with the soup – closely related, as we shall see, to the more familiar pesto, but with its very own complement of controversies to navigate.

In her forthcoming book Provence (Octopus), my friend Caroline Craig describes soupe au pistou, her great aunt Edmée’s department at home, as “a celebration and symphony of summer vegetables”. And, frankly, I couldn’t put it better myself.

The vegetables

Unusually, perhaps, given that this is a vegetable soup, many recipes are fairly laissez-faire when it comes to what to use – provided, as Craig makes clear, “they’re harvested at their optimum sweetness”. Indeed, Root reports that his cook, who hails from Fréjus and “makes the best pistou I have ever tasted”, says that “it does not matter what vegetables you put in pistou, as long as there are plenty of them”.

Perfect soupe au pistou à la Jacques Médecin, comes with a side of controversy thanks to the former mayor of Nice’s colourful reputation. Thumbnails by Felicity Cloake.

Jacques Médecin, the colourful (to put it politely) former mayor of Nice, a convicted criminal and defender of apartheid, courts rather less controversy with the claim in his more palatable cookbook, Cuisine Niçoise, that “there are three absolute musts: tomatoes, courgettes and fresh haricot beans”. (Michel Roux, however, prefers peas and broad beans to haricot, for reasons best known to himself. That said, Roux also refers to it as a minestrone au pistou – but then he is from Saône-et-Loire, which is a long way from Nice).

I try squash – according to Richard Olney, the shops in Provence “carry a number of large, tough-skinned yellow, orange or red-fleshed squashes, all sold in slices or wedges for use in soap au pistou”. Luckily, so does my local greengrocer, along with peas, potatoes, carrots, turnips, leeks, celery, green and runner beans and swiss chard. I conclude that all are happy additions – though the chard tops, in particular, do have a tendency to look rather unappetising after so long in the pan, so I’d stick them in with the pasta, if they’re what floats your boat.

Médecin’s courgettes and tomatoes seem a pleasingly summery combination at this time of year, the latter gifting the broth just a hint of acidity, rather than taking centre stage, while carrot adds sweetness, and runner beans a pleasantly robust texture. Whatever vegetables you go for, take a tip from chef Alex Jackson’s new book Sardine, and make sure everything, with the exception of delicate leaves, is soft before you add the liquid: “If you don’t cook the vegetables for long enough at this stage,” he writes, “the soup will lack body and the vegetables will retain an unwanted crunch.”

Though this is a summer dish, it’s perfectly possible to make it in winter, too: Roux suggests using “more root and seasonal vegetables, such as celeriac, jerusalem artichokes, kale etc” instead.

The beans

Although Geraldene Holt’s French Country Kitchen informs me that “some 19th-century cookbooks omit them altogether”, I’m inclined to agree with Gui Gedda and Marie-Pierre Moine that beans are a must: indeed, the pair explain in their book Provence Cookery School that “this rustic soup owes its body and substance to haricot beans”.

Gui Gedda and Marie-Pierre Moine’s soupe au pistou has a powerfully salty, smoky flavour.

The fresh kind most recipes prefer are available in good greengrocers in midsummer, but if not, Olney recommends the dried sort, even if they “never have the finesse of fresh”. His recipe – or rather that of Lulu Peyraud, a friend from the region whose recipes form the bulk of his book Lulu’s Provençal Table – soaks dried cannellini overnight, then boils them for 15 minutes before adding them to the soup. This is fine if, like Peyraud, you plan to simmer your soup for more than two hours, but as I shan’t be doing so, I’m going to cook the beans separately, with a clove of garlic and a bay leaf, as Jackson suggests, and add them, along with any remaining starchy cooking water, to the soup when it’s almost done.

White beans are the most common in the recipes I try, but borlotti are also used by Craig and others – I find some dried ones in the eastern European section of my local supermarket, and in the healthfood shop, too. Use whichever you prefer, or a mixture, though I’d advise cooking them separately, because they’re likely to soften at different rates.

You could use tinned beans in extremis, but, even though I’m not averse to a shortcut, I find all the ones I try a little bit mushy, even before reheating.

The broth

I’m surprised to discover that both Peyraud, and Gedda and Moine, make their soups with a meat base. Peyraud adds a lamb shank to the pan, “whose soft flavour and gelatine reinforce the velvety quality drawn from the squash and the shell beans”; Olney reports her as saying “the lamb shank is there only for flavour and texture. With family, I leave it in the soup and anyone who wants to eat the meat can have it; when I have guests, I remove the meat from the bone, cut it into small pieces, and return it to the soup.”

Lulu Peyraud adds a lamb shank to the pot, which she says lends the finished dish a velvety texture.

Gedda and Moine go for a ham hock instead, which gives their soup a powerfully salty, smoky flavour more like a ham soup than a vegetable one. My testers and I think the sweetness of the lamb works better with the earthy flavour of the beans, in particular, but all of us prefer the simpler soups that allow the vegetables to shine.

Roux’s fat-free broth, which starts by infusing water with onion, herbs and spices, before adding the rest of the vegetables to the pan, proves beautifully clear, but lacks the richness of recipes such as Craig’s, where the onion base is slowly and patiently cooked down in olive oil until soft and golden, giving the finished broth a delicious richness. This, as well as being careful not to over-dilute the flavours, seems to me to be the secret of a really good soupe au pistou; Jackson describes the desired end result of his recipe as “quite thick, although there will be enough well-flavoured broth to make the dish feel soupy”.

The starch

Though you could serve the soup with bread instead, pasta makes it a proper meal in a bowl. Macaroni is the most popular option, though Médecin insists that only broken up vermicelli will do, while Craig says any small pasta will work, or indeed a mixture of large and small pieces, if you prefer. I also try rice, and find that works very well, if that’s what you happen to have to hand – don’t worry, Médecin died in 2011, so he won’t find out.

Michel Roux’s version is fat-free but not all that rich.

The pistou

Though it’s important to season what M le Maire dubs an “extraordinarily subtle” broth well – Peyraud also calls for a casual “handful” of coarse sea salt – I don’t think it needs the cayenne pepper, cloves or bouquet garni some recipes stick in; for me, it should be a deliberately blank canvas for the pistou.

As the name suggests, this has much in common with pesto, being basil-based, though it generally contains far more garlic and no pine nuts (unless you’re Michel Roux, of course, who can get away with anything in my book). A simple recipe, yet I end up with six very different sauces – Gedda and Moines call for six garlic cloves to two large handfuls of basil, for example, and Jackson for a mere sixth of a clove for about the same amount of leaves. Feel free to adjust to suit your own tastes (and your plans for the rest of the day). British wimp that I am, I find just one clove powerful enough for me.

Peyraud, who also stirs the pistou into the soup itself, doesn’t use cheese, preferring to heap it on top afterwards, but we all decide we prefer it pesto-style – and that salty parmesan works better than the sweeter gruyère or mimolette recommended as an alternative in some recipes. This is a sauce that should pack some punch.

According to food writer Caroline Craig, soupe au pistou should be ‘a celebration and symphony of summer vegetables’.

Many Provençal cooks add fresh tomato as well, which is, of course, never found in green pesto. As with the soup, this seems to be more for acidity than flavour, so I think it less faff to use a squeeze of lemon, as Craig suggests alongside her tomato. It also keeps the colour pleasingly bright and vibrant.

Médecin’s recipe for pistou is almost as long as his recipe for soup, and contains many warnings against using mechanical means to make life easier for yourself, including the plea to “avoid using hand-operated or electric garlic crushers, as they separate the pulp from the juice, thus spoiling the taste of the garlic. It is encouraging to note those noblest of utensils, pestle and mortar, have recovered their rightful place in the modern kitchen.” Loth as I am to agree with him, I do: unless you’re making a vast quantity of pistou, the texture of the pounded sort is far better than the one I make in the food processor. Don’t ask me why, but it’s true. Up to you, though.

Alex Jackson’s soup: make sure all the vegetables are soft before you add the liquid, otherwise it runs the risk of having ‘an unwelcome crunch’.

What does matter, however, is, as Root puts it, that “into this rich mixture of a thick liquid crowded with vegetables you put the pistou … at the very last moment”. This could be stirred in, but I prefer to serve it dolloped on top, which is probably enough to get me chased out of Nice. I’ve got the recipe now, though, so who cares?

Perfect soupe au pistou

Prep 20 min, plus soaking

Cook 1 hr 25 min

Serves 4

150g dried white or borlotti beans (or 450g fresh)

1 garlic clove, peeled and squashed with the flat of a knife

1 bay leaf

2 tbsp olive oil

1 large onion, peeled and finely chopped

2 garlic cloves, peeled and finely sliced

1 pinch fresh thyme leaves

1 large tomato

1 carrot, peeled and diced

2 courgettes, diced

150g runner or green beans, topped, tailed and cut into roughly 2cm lengths

50g small macaroni, vermicelli or other pasta, snapped into smaller pieces if long

Salt and pepper

For the pistou

1 garlic clove, peeled

1 pinch coarse salt

50g basil leaves

20g finely grated parmesan

60ml extra-virgin olive oil

Soak the dried beans in plenty of cold water for about eight hours, then drain and put in a large saucepan with squashed garlic clove and bay leaf, and cover with fresh water. Bring to a boil, skim, then simmer for about an hour, or until tender but not falling apart, topping up the water as required, then leave to cool in the cooking water.

Heat the oil in a large saucepan over a medium-low heat, then fry the onion for 10 minutes. Add the garlic and thyme, and fry gently for another 10 minutes. Meanwhile, put the tomato in a small bowl of boiling water for a minute, then peel. After 10 minutes, squash the tomato into the pan using your hands, then fry for 10 minutes.

Fry the onions gently in a little oil for 10 minutes, then add the other chopped vegetables and some herbs.

Stir in the carrot and courgettes, and fry for 20 minutes, stirring regularly, until soft but not mushy, then add the cooked (or fresh) beans and any of their remaining cooking water (they’ll soak most of it up). Top up with just enough cold water to cover the vegetables and bring to a boil.

Simmer for five minutes, then add the pasta and simmer gently until cooked.

Add the beans and their cooking water, bring up to a boil, then simmer for five minutes.

Meanwhile, in a mortar, mash the garlic with a pinch of coarse salt to a smooth paste, then gradually pound in the basil leaves. Using a fork, whisk in the cheese and then the oil.

Make the pistou: bash the garlic in a mortar with a pinch of salt, add the basil, pound to a paste, then whisk in the cheese and oil.

Season the soup to taste, then divide between bowls and top each serving with a generous dollop of pistou.

• Soupe au pistou is a Provençal classic: how do you make yours? And which other summer soups would you recommend?

• Felicity Cloake’s new book, One More Croissant For The Road, is published next week by Mudlark at £14.99. To order a copy at a special offer price of £11.49, go to guardianbookshop.com.