Egypt and Israel formally end 30 years of war today. They will also launch a new era of deep and direct American involvement in the politics and military security of the Middle East by signing their peace treaty on the White House lawn.

The 2 p.m. ceremony will emphasize the "Made in the U.S.A." stamp now imprinted on a treaty that was due to have been signed by Egypt's Anwar Sadat and Israel's Menachem Begin 15 months ago on the banks of the Suez Canal in Ismailia, Egypt.

The change of locale to Pennsylvania Avenue also underlines the extent to which President Sadat has succeeded in shifting the Palestinian problem from his shoulders to those of President Carter, who has repeatedly justified his sponsorship of the Egyptian-Israeli treaty by saying it will open the way for a regional peace that will include a solution for the Palestinians.

Carter has evidently agreed to thrust the United States directly into the middle of this problem in hopes of halting a quickening erosion of U.S. influence and power in the Middle East by shoring up Sadat's rule. Ironically, Arab countries closely allied to the United States and Sadat fear that the half-finished peace will ultimately destabilize the region and doom Sadat.

The documents the three leaders will sign and exchange today spell out in rich detail -- achieved by 15 months of high-level diplomacy and interminable haggling -- the nature of the Egyptian-Israeli peace that has been achieved. At the end of the three years of carefully phased steps called for by the treaty and its annexes, Sadat and Begin will have accomplished stunning gains for their countries.

Begin will have achieved a formal bilateral peace with the Arab world's largest nation and major military power, and greatly lessened the chances that the Arabs will ever again be able to fight Israel in a conventional war. In a CBS-TV appearance yesterday, the Israeli prime minister gave a glimpse of the vision he has of peace by calling on Sadat to open the borders between the two countries immediately after the signing.

Open borders would mean that Egyptians could visit the al-Aksa mosque in East Jerusalem "and we shall probably all run to the pyramids on which our forefathers invested so much effort," Begin said happily.

Egypt will get back all of the Sinai peninsula and its oil wells, an area conquered by Israel in the 1967 Six-Day War. By prolonging the negotiations after suddenly backing out of a nearly completed draft treaty in Ismailia in December 1977, Sadat has been able to get Begin to give wa yon key points, including the dismantling of civilian settlements in the Sinai and early evacuation of the coastal town of El Arish.

But more importantly for Sadat, the long delay has resulted in a highly visible American commitment to underwriting the peace agreement that has caused him to be denounced as a traitor by the Palestinians and their allies. He has sought to counter domestic and other Arab criticism by holding out two promises of the American role now.

One is of an American-induced era of prosperity for his economically desperate nation. After signing the framework agreements on peace at Camp David, Md., last September, Sadat told a group of Egyptians in Washington that new aid and trade would flow from the agreements, and specifically mentioned a U.S. commitment to provide an entire new telecommunications and telephone system to replace Egypt's brokendown network.

The other vision Sadat conjures up is of U.S. political muscle being used on Begin to resolve the Palestinian problem, which the Arab leader and Carter have described as the crux of the Arab-Israeli conflict but which is scarcely touched by the peace treaty and its accompanying documents.

The only firm commitment that Carter and Sadat were able to winkle out of Begin on the Palestinians was to open negotiations within a month after the signing of the bilateral treaty over the shape of autonomy that Israel will grant to the Palestinian inhabitants of the West Bank and Gaza Strip territories. The negotiations are due to be concluded within a year, opening a five-year period of local autonomy under Israeli rule.

Begin has publicly denounced as untrue Egyptian claims that the agreements will lead to an end of Israeli control of the West Bank and Gaza and the creation of a Palestinian state. Only a bruising confrontation between the United States and Israel in the second round of negotiations is likely to produce a settlement that the rest of the Arab world can publicly endorse, and Carter's ability to win such a confrontation appears to be lessening as the 1980 election campaign draws closer.

While the extensive negotiations that Egypt, Israel and the United States have conducted since Camp David have focused on technical questions of phased withdrawals from the Sinai and diplomatic language to express some tie between the Egyptian-Israeli treaty and the West Bank-Gaza negotiations, the real question that has occupied the political leaders has been how hard the United States would press Israel on the Palestinians in the second set of negotiations.

The Blair House talks stalled last November when the United States joined Egypt in pressing for a binding commitment at the time of the treaty signing to clearly defined and strong Palestinian local governing councils. The Israelis balked, and then won their case when Carter and Sadat dropped the demand in this month's make-or-break effort.

U.S. officials concede privately that the administration lowered the priority it had put on getting firm Israeli commitments on the Palestinian problem because of a new sense of urgency that Carter felt about getting the Egyptian-Israeli treaty as a way to stem a tide of reverses in the Middle East for his administration.

Those reverses included the collapse of the shah of Iran, leadership problems in Saudi Arabia that have resulted in strains between Washington and Riyadh, and a sudden erratic turn to Saudi actions and increasing Soviet involvement in South Yemen and the Horn of Africa. All of these pointed to a potential major shift of influence toward the Soviets that Carter felt had to be blocked, even if the Palestinians had to be put further into limbo.

Administration policymakers also apparently saw a chance to exploit the growing impression of regional instability in selling such a treaty to the other Arabs. New arms packages, visits to the region from U.S. warships and advanced aircraft and other steps underscored the importance of the U.S. defense shield in the area to any governments that might have been discomforted by the U.S. role in arranging the treaty.

But the changes in Iran have also cut across the peace negotiations in other ways that will greatly complicate Carter's task in the second round of negotiations. Iran's Ayatollah Ruhollah Khomeini has given strong and open support to the Palestine Liberation Organization, which is now developing broad Islamic support for the Palestinian cause.

Iran is one of the key voices in the Organization of Petroleum Exporting Countries, which meets today in Geneva to discuss a new price increase. Saudi Arabia, which in the past has been the primary force in OPEC for price moderation, is likely to signal its lack of happiness with the treaty by being more docile before the price hawks at this session.