For the second time in six years, instability in the Middle East has triggered a ringing declaration from an American president that the United States will now sharply limit consumption of imported oil and invest billions to find alternative sources of energy at home.

Seen from abroad in policy terms, President Carter's determined commitment to an "energy-secure American" is likely to have some reassuring differences from Richard M. Nixon's failed "Project Independence." But it will also have some disturbing similarities.

The program and goals outlined by Carter in Washington and Kansas City represent welcome first sight for the major U.S. trading partners, and for key oil producers like Saudi Arabia and Kuwait, which want the United States to cut imports and buy much less of their oil.

Western Europe and Japan have consistently called for measures to reduce U.S. balance of payments deficits and thus to curb global inflation.

Effective conservation in the United States would also make life easier for Saudi Arabia's royal family and its allies in equally underpopulated and already rich oil countries. The Saudis fear pressure to produce more to meet America's growth in oil consumption will increase their political and social problems at home and in the Arab world.

But like Nixon in his Nov. 7, 1973, speech aimed at rallying the country against the Arab oil embargo, Carter has not even sketched in his wideranging energy speeches the probable foreign policy impact of his decisions.

He acknowledged much more starkly than Nixon that America's "particular vulnerability" to disruption of Middle East oil supplies will continue over the short term at least and force the United States to play "a shuffling game" with available supplies.

But Carter did not outline how he intends to use American influence and power abroad to try to contain instability in the Middle East and within the Organization of Petroleum Exporting Countries cartel to keep enough oil coming in to meet American needs during the interim period. And like Nixon in 1973 Carter gave scant attention to economic and political interdependence as an alternative to the ambitious new independence program.

Quick responses from Carter administration specialists yesterday emphasizing the major differences between Carter's energy-secure America and Project Independence suggested that the Nixon program and its failure had been intently reviewed in preparation for the Carter addresses on the same point.

"Let us pledge that by 1980 under Project Independence we shall be able to meet America's energy needs from America's own energy resources." Nixon said at a time when the United States was importing one out of every four barrels of crude oil consumed here. By the time Carter went on the air Sunday night the United States was importing one of every two barrels of oil consumed.

Administration officials emphasized that Nixon in 1973 was responding to that was then seen as temporary "political blackmail" by Arab oil producers angered at U.S. military resupply efforts for Israel in the 1973 war.

The Carter program, they continued, does not aim for an unrealistic quick fix that promises "full autonomy" from foreign oil suppliers. Instead, these officials feel that Carter was speaking against a backdrop of public awareness that the existing shortages represent a permanent change in the American way of life.

The president's reference in Kansas City to "a government shakeup in distant Iran" as the trigger for this summer's gasoline lines once again tied the U.S. energy crisis to instability in the Middle East.

In shaping his address, the president appeared to have taken foreign policy considerations into account in rejecting advice from his chief domestic adviser, Stuart Eizenstat, to shift blame for energy and inflation problems to "a clear enemy," OPEC.

His references to the oil producers cartel were relatively muted and his only mention of Saudi Arabia, the one country in OPEC that could instantly increase production to meet U.S. needs, was a complimentary one.

Carter praised Saudi Arabia's "recent positive decision" to increase production by up to 1 million barrels of oil a day as having "shown that forceful action by this country proving that we are going to save energy can encourage moderation on the part of some of the OPEC nations and make us better able to deal with all the others."

State Department spokesman Hodding Carter said later that the president appeared to be linking the Saudi decision to the conservation goals adopted at the Tokyo summit of industrialized nations.

The Saudis have increasingly linked their willingness to provide new oil suplies to the United States not to conservation or to a resumption of the north-south dialogue between producers and consumers they once championed but rather to the official American attitude toward the Palestinian problem. Saudi-U.S. relations have been strained since January because of the Egypt-Israel peace treaty.