BONN, West Germany (AP) _ West Germany will close its embassy in Budapest on Monday because the staff's ability to assist hundreds of East German refugees seeking exit visas to the West is ''totally exhausted.''

Refugees have been holed up nearly two weeks at the Budapest embassy, as well as in West Germany's missions in East Berlin and Prague.

Foreign Ministry spokesman Claus Wunderlich, who made the announcement Sunday, refused to say how many East Germans were at the Budapest embassy.

News reports last week estimated 300 were in the embassy and said more were arriving each day. Many traveled to Budapest and were caught trying to escape to Austria after Budapest removed barriers along its Western border.

''The reception capacity for East German asylum seekers at the representation in Budapest is totally exhausted,'' the ministry said in a statement delivered to news agencies. ''The embassy must therefore be closed for the time being, beginning Monday, Aug. 14.''

The embassy will be closed to the public, and the refugees already there will be asked to leave and informed again that only East Germany can grant them exit visas, officials at the ministry said.

Bonn closed its East Berlin mission on Tuesday after 131 East Germans sought refuge there, and officials have said it will not be reopened until normal diplomatic operations can be resumed.

Eberhard Grashoff, spokesman for the mission, said 10 of the East Germans voluntarily left the facility Sunday but that the others were still camped on the protected mission grounds.

The West German mission in Prague, where about 20 East Germans are thought to have taken refuge, will remain open for the time being.

East Berlin's Communist leadership has said it will not punish those who sought refuge in West Germany, and Bonn authorities have told the East Germans they need permission from their government to leave for the West.

The refugee situation in Budapest developed this summer after Hungary dismantled the barriers on its border with Austria. At least 1,500 East Germans are estimated to have escaped to the West through Hungary since May.

Most of those at the West German Embassy in Budapest are East Germans who were allowed to travel to Hungary, then attempted to escape to Austria and were caught by Hungarian border guards.

The Hungarians have in some cases noted the failed escape attempt in the passports of the East Germans. Out of fear that they would be punished back home, the East Germans have sought West Germany's protection.

East Germans can obtain permission to travel to neighboring Hungary, a Warsaw Pact ally, with relative ease, but applicants for emigration visas often must wait years for an answer.

A Hamburg-based newspaper, The World on Sunday, said the West German intelligence service has determined that 1.5 million East Germans want to emigrate to the West, or nearly 10 percent of the 16 million population.

West Germany expects about 100,000 East Germans to make their way to West Germany by the end of the year, through legal emigration and escapes.

The recent increase in escape attempts is believed to be grounded in an increasing sense of hopelessness among East Germans.

Neighboring Hungary and Poland have followed the Soviet Union's lead and adopted market-oriented economic reforms and broadened personal freedoms. But East German leader Erich Honecker has shown no inclination to do so.

In a commentary on the eve of Sunday's 28th anniversary of the Berlin Wall's construction, the Communist Party newspaper Neues Deutschland accused the West of trying to ''economically plunder and destabilize East Germany.''