In the seven weeks since he became prime minister of Egypt, Mustapha Khalil has established himself as one of the country's most powerful figures.

His selection by President Anwar Sadat for the mission of conveying Egypt's latest peace proposals to Washington confirms the widespread impression here that Khalil is not only running the government with a firm hand but also carving out a role in foreign policy.

Unlike his predecessor, he has been deeply involved in deliberations over Egypt's policy in the negotiations with Israel and he has emerged as Sadat's conduit for briefing the press about the course of the talks.

Khalil, a 58-year-old engineer, was not plucked from obscurity to become prime minister when Sadat installed a new peace-oriented government after the Camp David agreements. He has been in and out of the Cabinet since 1954, and was a member of the National Security Council, Sadat'a panel of top advisers. In his capacity as first secretary of the Arab Socialist Union.

That was Egypt's only legal political organization under Sadat's predecessor, Gamal Abdel Nasser. Khalil, under Sadat's direction, presided over its dissolution and the establishment of other political parties. The day before he was named prime minister, Khalil joined Sadat's own National Democratic Party, which now dominates Egyptians political life.

For all his years in public life, however, Khalil has little diplomatic or negotiating experience. It came as no surprise here when it was announced that he would be accompanied on his trip to the United States and Europe by Osama Baz, who is firsrt undersecretary at the Foreign Ministry and has been involved in all the negotiations with Israel.

Khalil is an engineering graduate of Cairo University and holds a graduate degree from the University of Illinois. His specialty was railroads and Nasser made him minister of transport in 1954 after Khalil prepared for him a study of the country's transport problems.

He was later minister of housing and of communications, which gave him contact with some of Egypt's most intractable problems.

Dropped from the government in a dispute with Nasser's pro-Soviet advisers in 1966, he was out of public life until he came back in 1970 assigned to reorganize the country's information media. He recommended that the press and television be made independent of the government, which led to a new conflict with the pro-Soviet "Ali Sabri group" and to Khalil's resignation. Nasser died in 1970 and in the ensuing power struggle Sadat put Ali Sabri in prison and brought Khalil back to public life.

Khalil is a silver-haired, chain-smoking, mild-mannered, darked-suited man, not given to flights of rhetoric. He tolerates being telephoned at home by the press, but avoids any flamboyant traits that would make him the subject of their inquiries.