President Anwar Sadat of Egypt is showing increased uneasiness about the implications for his own country's security of the Libyan military and political presence in Chad and the planned merger of that Central African nation with Egypt's number one enemy, Libya.

The focus of his immediate concern is the effect of these two new developments on Sudan, which has just closed its borders to all foreigners other than diplomats and is moving troops westward to bolster its thin defenses along the 600-mile Chadian border, acording to Western diplomatic sources here.

In another sign of his concern, Sudanese President Jaafar Nimeri called today for a meeting of African leaders to take measures designed to "maintain the independence and unity" of Chad, the official Sudan News Agency reported from Khartoum, the Sudanese capital.

Egypt has traditionally regarded Sudan as an integral part of its own security system and has been linked to its southern neighbor in a mutual defense pact ever since an unsuccessful Libyan-backed coup attempt against Nimeri in July 1976.

The main fear here is that the Libyan leader, Col. Muammar Qaddafi, will seek to foment unrest in Sudan, using Chad as a base of operations, as part of a larger plan to destabilize the Sadat government. Qaddafi and Sadat are bitter enemies and each would be delighted to see the downfall of the other.

Like France, which has been accused here and elsewhere in Africa of standing by and doing nothing to prevent the Libyan march into Chad, Egypt has been caught off-guard and is visibly upset by the first successful projection of Qaddafi's military power into black Africa.

"It was a real shock to the Egyptians," remarked one Western diplomat. "They are still uncertain what to do about it."

In an interview earlier this week with French television, reported on the front pages of all Cairo's newspapers this morning, Sadat said that the Chadian-Libyan merger "threatens Sudan and what threatens Sudan threatens Egypt."

"It is a very dangerous situation," he added.

Asked what specifically Egypt plans to do about it, the Egyptian leader said he was awaiting the outcome of a special summit of the Organization of African Unity that was held in Lome, Togo, to consider the Chadian-Libyan merger.

The summit, attended by 11 heads of state and two foreign ministers, issued a communique yesterday condemning the merger over Libyan objections. But it failed to announce any concrete military or political steps that might serve to prevent the two countries from going ahead with their unity plan. Nimeri's appeal was seen as a call for followup to the Lome meeting.

Sadat indicated in his interview with French television that any direct action against Libya by Egypt would have to be part of a larger plan approved by the African organization. However, there has been intense speculation here that Sadat might decide to take some unilateral military action agains Libya as a way of forcing Qaddafi to withdraw his troops from Chad and punishing him for his decisive intervention in the civil war there.

With the help of 2,000 to 4,000 Libyan troops and a few Libyan tanks and Mig jet fighters, the embattled Chadian President Goukouni Queddei finally prevailed last month over the forces of his one-time defense minister and chief opponent, Hissene Habre, halting the 16-year-old Chadian civil war.

Egypt presently has 100,000 troops stationed along the Libyan border, more than enough to deal with Libya's 35,000-man Army, particularly with part of it now involved in Chad and more Libyan troops reportedly being sent there.

Twice before, in July 1977 and 1978, the two armies engaged in brief cross-border fighting, providing the precedent for the kind of action Sadat might be contemplating right now.

Speculation over possible Egyptian military action against Libya was heightened by an offhand comment Sadat made to reporters in Aswan on Tuesday that Egypt had not said "its last word yet" regarding the Chadian-Libyan merger.

One possibility open to Sadat short of initiating an open confrontation with Libya is to begin providing military assistance to the defeated Habre, whom Egypt and Sudan backed during the civil war. But sources here say his forces have largely disintegrated in the wake of their rout from the Chadian capital of Ndjamena in mid-Decedmber.

There have been reports of incidents in the western Darfur Province of Sudan, which borders on Chad, over the past two months. For example, earlier this month there was a demonstration in El Fasher over the appointment of a new governor who did not come from the province. According to diplomatic sources here, somewhere between two and 12 persons died in the ensuing clash with security forces.

Several other incidents in which a disputed number of Sudanese were killed took place in December in Muhajiriya near the Chadian border and in El Obeid, 200 miles southwest of Khartoum.