SPYCATCHER By Peter Wright Viking. 392 pp. $19.95

IF PETER WRIGHT did not exist, John Le Carre' might have invented him. That would have been one way to turn Peter Wright's Spycatcher into a best seller. The other was for the British government first to send its top mandarin all the way to an Australian court to prevent the book's publication and then to start another legal battle over it in the United Kingdom. Surely Prime Minister Margaret Thatcher's misconceived rearguard action was inspired by principle rather than pragmatism.

Spycatcher is the autobiography of a retired senior intelligence officer of MI5 -- the British counterintelligence service -- who broke his pledge of absolute secrecy by writing a book full of revelations. These revelations are highly damaging to the service for which he worked and to Britain's relations with her allies, and they are no doubt full of interest to the KGB in Moscow. But as a thriller the book did not hold my attention.

Writing his book was an act of revenge, summed up by Wright in one sentence: "I learned a lesson I never forgot -- that MI5 expects its officers to remain loyal unto the grave without necessarily offering loyalty in return." This is a reference to the time when MI5 persuaded Wright to give up 15 years of his pension rights with the Admiralty and to join MI5 with the promise that it would compensate him for them. But when he retired, MI5 did not live up to this promise. Spycatcher is therefore above all a brazen and unscrupulous attempt to recoup the lost pension. It is also an attempt by Wright to make himself into a hero whose daunting efforts to reform MI5, and to dig for Soviet moles among its ranks, remain unappreciated. He carries this torch into his personal sunset by publishing an explosive book.

I am not sure whether to recommend this text for its facts or its fiction. There is ample evidence that many of Wright's claims spring from a febrile, resentful mind. But for an outsider it is impossible to judge where truth ends and fiction begins. Even insiders disagree, for instance, whether Sir Roger Hollis, the one-time director-general of MI5 and Wright's main target in his search for a Soviet mole, was a spy or not. What fascinated me most in reading Spycatcher were the insights it offers into the skills of Soviet intelligence and into what it means to spend a lifetime in the murky world of counter-espionage, among the shadows of Big Brothers and super-secret files. It is a world full of risks, dangers, personal jealousies and never-ceasing suspicions that the man in the office next to yours may be a Soviet agent. It is a situation that creates paranoia, corroding men's characters.

Not surprisingly, Wright says, many senior officers in MI5 needed psychiatric counseling to assist them in carrying the burdens of secrecy. "Those of us involved in the penetration issue were set apart, feared and mistrusted in equal measure. We were seen as men with grudges, as men with obsessions, unable to conceive of any interpretation other than Hollis being guilty." Wright is convinced that Sir Roger Hollis was the mysterious "fifth man" in the Burgess-Maclean-Philby-Blunt Cambridge spy ring. He cites enough evidence to show that even after the defection of three of them to the Soviet Union and the unmasking of Blunt, there was still a mole left within MI5 giving the Russians vital tips.

ONE OF the high points of the book -- always assuming we can trust Wright's account -- is the weird way in which Hollis, shortly before his retirement, sought Wright out to ask him why he believed him, Hollis, to be a Russian spy. Wright then gave him, chapter and verse, the basis of his allegations. Hollis listened patiently and after Wright had finished replied with a single sentence: "All I can say is that I am not a spy." Then he broke off the encounter by saying laconically: "Good to have had this chat . . ." All the official investigations, carried out on Wright's insistence, rejected Wright's allegations about Hollis' loyalty.

Perhaps the most controversial allegation Wright makes is that some members of MI5 came to believe that Prime Minister Harold Wilson was a Soviet agent, whereupon they thereafter not only spied on Wilson but tried to destabilize his government. There are enough credible witnesses to discredit this story, which the witnesses consider may have originated in a variety of political and personal resentments.

There is also a story about a plan for the CIA to absorb MI5 based on a secret review of the Anglo-American intelligence relationship by Gordon Gray and "Gerald" Coyne (his correct first name is Patrick). I asked Richard Helms, who at the time was deputy director of the CIA, about this: he told me that it "struck him as nonsense" and that the claim that Helms attended a lecture Wright gave at the CIA was quite untrue.

But, whatever the doubts about Wright's credibility, Spycatcher must be a very disturbing book to MI5 and the British Government and ought to be to the British public. It may hobble an organization whose usefulness in certain, carefully selected situations, however "dirty," most people willl agree, is essential to national security, especially when viewed against the activities of its Soviet counterpart.

There is also the obvious resentment that Wright, who belongs to the middle-class, holds against the "old boy" clubbishness that used to be more important in the organization than careful vetting and recruitment procedures. There is quite a moving and pointed reference to Peter Ustinov's father, "Klop," who, according to Wright, provided MI5 with "possibly the most important human-source intelligence Britain received in the pre-World War II period about the true state of German rearmament." When Wright visited him after the war, he found that instead of being able to live in honorable retirement, old Ustinov had no pension and lived in virtual poverty. Belated amends were made shortly before he died, for which Wright takes credit. Talking about his famous actor-son, father Ustinov is quoted as saying: "I would not want my boy to join this game of yours. The gentlemen run the business and the gentlemen have short memories . . ." Obviously "Klop" Ustinov had come to a conclusion similar to Wright's many years later.

Wright's life has been one of frustration, disappointment and defeat. Some of it may have been due to his unsympathetic personality, some to the pond he chose to swim in. As he put it: "It would have been nice to have crowned my career with a triumph, but the secret world is not so simple and at the end the shadows remained, as dense as before, shrouding the truth."

We dislike living in uncertainties, we yearn for safety, security and predictability and this book is one more proof that even the most dedicated men, using the most advance gadgetry available to penetrate the darkest corners of our world, live in a sea of uncertainties.

Henry Brandon was the Sunday Times of London's chief American correspondent for 35 years.