The election campaign to choose has first mayor of Paris in 100 years has erupted into an unrelenting struggle inside the ruling French coalition over a strategy and a leader to confront the rising challenge to their rule from the nation's Socialists and Communists.

The Republican-Independent Party of France's president, Valery Giscard d'Estaing, and its parliamentary ally, the Gaullist party, made it clear today that they are locked in a no-holds-barred struggle for political supremacy on the right.

They capped a week of increasingly heavy skirmishing by trading bitter charges of being responsible for tapping telephones for political purposes. One of Giscard's closest political associates said the Gaullists appeared no longer to support the president.

The Gaullists are the largest party in Parliament. Their support is essential to Giscard's efforts to form governments and get legislation passed.

Gaullist leader Jacques Chirac provoked the bitter confrontation by his surprise announcement last month that he would run against Giscard's hand-picked candidate for the March 14 municipal election, Count Michel d-Ornano.

But public speeches by both men and private comments by their aides leave no doubt now that far more is involved than the choice of a mayor to replace the central government administrators.

Both leaders have committed their personal prestige to this battle, which began taking shape last August when Chirac angrily quit as Giscard's prime minister, largely because of strong differences on how the leftist challenge should be confronted.

Public opinion polls for the past 18 months consistently indicate that the Socialist-Communist coalition would for a new National Assembly. Those take out a small majority in elections elections are scheduled for 1978, but can be called at any time by the president.

The campaigns for the mayoralty of Paris and France's other municipalities have forced out into the open the conflicting strategies for the assembly contest and the next presidential elections, due in 1981.

The uproar this week is in some ways a sign that initially Chirac's strategy is working. He wants to dramatize the political dangers he sees while Giscard is intent for now on playing the threat from the left in a minor key.

Chirac quit as prime minister after Giscard refused to advance the parliamentary elections to last September. Chirac was convinced that the conservative coalition would make a better showing then by running a vigorous and classic anti-Communist campaign rather than sticking with two more years of Giscard's vacillating leadership.

This is exactly the kind of campaign Chirac has been running in Paris, arguing that Giscard's candidate was headed for a defeat that would have opened the way for victory by "the totalitarian forces of the left" in the parliamentary elections.

"Chirac does believe this is an all-or-nothing game, a senior Gaullist official says. "If the left gets control of the assembly, it could be the last election we would have. He is asking Giscard to emulate De Gaulle - to tell the electors clearly that if they choose the left in 1978, they choose chaos, for he will resign."

Two weeks ago, Giscard did exactly the opposite. On a television interview program, he said in the clearest terms yet that if the Socialists and Communists win 1978, he will remain on the job and seek some kind of undefined arrangement with them.

Giscard's advisers argue that a "meor-chaos" threat would "put everything on an election that will be basically decided by 1,000 people each in 30 to 50 swing districts in 1978. It wouldt freeze investment by business until the elections were over, and paralyze decision-making."

Giscard is gambling that his mind austrity plan and global economic recovery will show results here next year. Morever, his advisers doubt that what they call "the primitive kind of anti-communism that Chirac is trading in" can win the election.

Speaking at the Breton town of Ploermel a week ago, Giscard finally went on the attack. But he directed president's policies, all the while proindirectly accused of "opposing the as much fire against Chirac, whom he claiming his support for the presidential institution," as he did against the left.

Chirac struck back Monday in a speech in Saint Nazaire, in which he spoke of the "disarray", "uncertainty" and "weakness" that marked the coalition before he entered the race and claimed that "the authorities" had set out "to eliminate the Gaullists" politically in Paris and had opened the door to a "a current of anarchy and surrender" by the action.