French security efforts to put the vigilance of British security to the test by placing explosives in the grounds of the French ambassador's residence was not without its comic aspects. A charade worthy of Inspector Clouseau was how one member of Parliament characterized it.

But the British government, not to mention Scotland Yard, were not amused. The affair was too close to the recent Brighton bomb attack that was aimed at the entire British Cabinet for the government not to feel deeply offended.

The result is that the more substantive Anglo-French summit in Paris at the end of next month, which was to have built on the goodwill of this London visit, will now have to take up the troublesome question of security. At least Whitehall seems determined that the matter will be discussed and that guarantees will be given that there will be no repetition of the problem.

The incident marred what had been hitherto been a highly successful trip. The circumstances could hardly have been more auspicious.

The French President was given the rare privilege of addressing both houses of Parliament. For the first time Buckingham Palace allowed the state banquet to be televised. And to add to the sense of historic occasion, the visit marked the 80th anniversary of the Entente Cordiale between Britain and France. For the French President there was also a sentimental celebration: the 40th anniversary of Mr. Mitterrand's journey across the English Channel from Dartmouth Harbor as a member of the French resistance during World War II.

Relations between Britain and France, frequently exasperated by Britain's European Community stance, have improved since the Fontainebleau summit in June. According to a French official, Britain is taking a more positive attitude toward Europe.

For Britain, there is the satisfaction that France was quick to back it in the Falklands war. On the Euro-missile issue, and especially the need for a balance of forces, Prime Minister Margaret Thatcher and President Mitterrand think alike.

If the Conservatives with their monetarist approach could conceive of choosing a favorite socialist, it would be Mitterrand. His need to adapt socialist principles to the hard economic realities of recession and unemployment have earned him such Tory commendations as pragmatic. In Conservative thinking that means ''sensible'' and ''realistic'' and is intended as a rebuke to the more doctrinnaire policies of Britain's Labour Party.