President Anwar Sadat, in a burst of rhetoric, declared recently that Egypt has a plan to "wipe out" a million Israelis if Israel uses atomic weapons in a new Middle East war. This threat, which could have been brushed off not many years ago, fits in with a campaign that has been going on for weeks in an apparent attempt to restore Egypt's military credibility and use it for political leverage.

Through public statements, military exercises, information to the press and political gestures, Sadat and his closest advisers have been emphasizing Egypt's military preparedness and its willingness to use its armed power to attain its objectives. It is not just Israel that has been put on notice but also the leftist regimes in Africa that are hostile to Egypt and its ally, Sudan.

Egypt's assertion's of military prowess are in contrast to the prevailing mood of 1976, when Sadat was stressing what he said were the supply and equipment problems arising from the Soviet Union's decision to cut off arms deliveries.

He continues to insist that no new weapons or spare parts are coming in, although foreign military experts here question whether the difficulties are as serious as he has portrayed them. For the past three months, however, this theme has been secondary to that of Egypt's power and its willingness to use it.

Opinion here is divided about the reason for the shift. A widespread view is that Sadat's optimism about a regional peace settlement is waning and the possibility of a new war is now being taken seriously. Another theory is just the opposite - that Sadat believes there will be a Geneva peace conference and he wants to go to it in a position of strength.

The official view, which has never varied, was reiterated last month by the minister of War, Gen. Mohammed Gamassi, when he told graduating cadets at the naval college, "We are prepared for all the contingencies of war and peace . . . Egypt seeks lasting peace based on justice. Our armed forces will prove their worth once more if they must fight again."

The new stress on military capability began even before the election of the hard-line government of Menachem Begin in Israel. In April, the Egyptians staged a series of highly publicized military maneuvers that were reported in the local press with such banner headlines as "Waves of Mirage Jets Destroy Practice Targets."

Sultan Qaboos of Oman was taken to see navel exercises in the Mediterranean, again with great fanfare. Military analysts here say the Egyptian navy, never a major factor in the regional balance of power, is being improved rapidly under a new commander, Adm. Ashraf Rifaat.

Since then there have been these other developments:

Lt. Gen. Mohammed Aly Fahmy, chief of staff of the armed forces, warned that Egypt would fight on the side of Sudan if that country was attacked, a clear warning to Libya and Ethiopia. Egypt has concluded a defense pact and a strongly anti Communist alliance with Sudan, and this commitment to fight represents a departure from Sadat's previous policy that no Egyptians would fight elsewhere until the Sinal Peninsula was recovered from Israel.

Sadat sent Egyptian pilots and technicians to Zaire to help that country's air force in the brief war against Angolan-backed insurgents in Shaba Province.

Egyptian reporters were told that the Arab Authority for Military Industrialization, jointly operated by Egypt, Saudi Arabia, Qatar and the United Arab Emirates, would soon begin production of antitank missiles and was negotiating contracts for the manufacture of combat aircraft.

The government announced that it had received a shipment of spare parts for some of its Soviet-built equipment from China. While this appeared to be more a political slap at Moscow than a real military advance, it does appear that the Chinese assistance has enabled Egypt to put some aircraft back into operation.

Then on Wednesday, Egyptian reporters traveling with Sadat on a flight from Moroco asked him about the possibility that Israel possesses nuclear weapons, as is widely believed.

Sadat said he had "indisputable information" that the Israelis have such weapons. He said that if the Isrealis use them, Egypt might lose a million people, but that is only one of every 40 Egyptians. "My plan," he said, "is to take from them one million," or one of every three Israelis. He said he had a plan to retaliate against the heavily populated triangle from Haifa to Tel Aviv to Jerusalem.

Egypt does not have nuclear weapons, but it does have the Soviet-built Scud missile, which has a range of about 175 miles and could reach Tel Aviv from the Suez Canal. Armed with chemical or nerve gas warheads, which Egypt is believed to possess, they could inflict severe damage, experts say.